Обсуждение: I'm in a fix... please help quick

Поиск
Список
Период
Сортировка

I'm in a fix... please help quick

От
liliwow
Дата:
Please quick help, because I'm in a fix 

1 Tables: mounted device, the elements included in the devices, the link
elements with devices (including the number of elements in the device),
installation steps. 
2 The counting of the number of elements needed to perform the contract
assembly of a certain number of devices (eg, 100 units of computers in the
configuration 1).



--
View this message in context: http://postgresql.1045698.n5.nabble.com/I-m-in-a-fix-please-help-quick-tp5796044.html
Sent from the PostgreSQL - pgadmin support mailing list archive at Nabble.com.



Re: I'm in a fix... please help quick

От
Ian Lawrence Barwick
Дата:
2014-03-14 18:09 GMT+09:00 liliwow <emka1994@gmail.com>:
> Please quick help, because I'm in a fix
>
> 1 Tables: mounted device, the elements included in the devices, the link
> elements with devices (including the number of elements in the device),
> installation steps.
> 2 The counting of the number of elements needed to perform the contract
> assembly of a certain number of devices (eg, 100 units of computers in the
> configuration 1).

If this is some kind of database-related college assignment, you really should
be asking on a more general list like pgsql-novices, not a support list for a
particular tool. And you should explain what you are trying to find out
and what steps you have taken so far to solve the problem.

Regards

Ian Barwick



Re: I'm in a fix... please help quick

От
Darren Duncan
Дата:
On 2014-03-14, 2:09 AM, liliwow wrote:
> Please quick help, because I'm in a fix
>
> 1 Tables: mounted device, the elements included in the devices, the link
> elements with devices (including the number of elements in the device),
> installation steps.
> 2 The counting of the number of elements needed to perform the contract
> assembly of a certain number of devices (eg, 100 units of computers in the
> configuration 1).

Generally speaking, generic assembly-of-parts queries, eg how many X do I need 
to make a Y, this tends to be recursive and so you probably want to use a WITH 
RECURSIVE somewhere in your query; such as that is what lets you do this query 
without having to write procedural code or a query that only works for a 
specific number of levels. -- Darren Duncan