[Previo por Fecha] [Siguiente por Fecha] [Previo por Hilo] [Siguiente por Hilo]

[Hilos de Discusión] [Fecha] [Tema] [Autor]

[Sop.Tec.LinuxPPP] Ayuda sobre postgres



Saludos lista.
Ya se que esta lista no es de postgres pero si por fuera de la lista me
pueden ayudar con una DB que estoy creando se los agradeceria mucho.

Asi mismo las sugerencias que me puedan brindar se los agradecere

Tengo 4 tablas que estan de la siguiente forma:

inventario=> \d
Database    = inventario
 +------------------+----------------------------------+----------+
 |  Owner           |             Relation             |   Type   |
 +------------------+----------------------------------+----------+
 | sevega           | Ubicacion_pkey                   | index    |
 | sevega           | equipo                           | table    |
 | sevega           | equipo_pkey                      | index    |
 | sevega           | pga_forms                        | table    |
 | sevega           | pga_layout                       | table    |
 | sevega           | pga_queries                      | table    |
 | sevega           | pga_reports                      | table    |
 | sevega           | pga_schema                       | table    |
 | sevega           | pga_scripts                      | table    |
 | sevega           | proveedor                        | table    |
 | sevega           | proveedor_pkey                   | index    |
 | sevega           | responsable                      | table    |
 | sevega           | responsable_pkey                 | index    |
 | sevega           | ubicacion                        | table    |
 +------------------+----------------------------------+----------+

inventario=> \d equipo
Table    = equipo
+----------------------------------+----------------------------------+-------+

|              Field               |              Type                |
Length|
+----------------------------------+----------------------------------+-------+

| EqMarca                          | char() not null
|    40 |
| EqModelo                         | char() not null
|    40 |
| EqProcedencia                    | char()
|    30 |
| EqObs                            | text
|   var |
+----------------------------------+----------------------------------+-------+

Index:    equipo_pkey

inventario=> \d proveedor
Table    = proveedor
+----------------------------------+----------------------------------+-------+

|              Field               |              Type                |
Length|
+----------------------------------+----------------------------------+-------+

| ProvProveedor                    | char() not null
|    40 |
| ProvDir                          | char() not null
|    40 |
| ProvTel                          | char()
|    14 |
| ProvExt                          | char()
|     4 |
| ProvFax                          | char()
|    14 |
| ProvCell                         | char()
|    14 |
| ProvPager                        | char()
|     8 |
| ProvEmail                        | char()
|    30 |
| ProvObs                          | text
|   var |
| ProvNombre                       | char() not null
|    30 |
+----------------------------------+----------------------------------+-------+

Index:    proveedor_pkey

inventario=> \d responsable
Table    = responsable
+----------------------------------+----------------------------------+-------+

|              Field               |              Type                |
Length|
+----------------------------------+----------------------------------+-------+

| ResResponsable                   | char() not null
|    30 |
| ResTel                           | char()
|    14 |
| ResExt                           | char()
|     4 |
| ResFax                           | char()
|    14 |
| ResCell                          | char()
|    14 |
| ResPager                         | char()
|     8 |
| ResEmail                         | char()
|    30 |
| ResObs                           | text
|   var |
+----------------------------------+----------------------------------+-------+

Index:    responsable_pkey

inventario=> \d ubicacion
Table    = ubicacion
+----------------------------------+----------------------------------+-------+

|              Field               |              Type                |
Length|
+----------------------------------+----------------------------------+-------+

| UbUbicacion                      | char() not null
|    40 |
| UbDireccion                      | char() not null
|    40 |
| UbHoraAcceso                     | varchar() not null
|    20 |
| UbNombre                         | char() not null
|    30 |
| UbTel                            | char()
|    14 |
| UbExt                            | char()
|     4 |
| UbFax                            | char()
|    14 |
| UbCell                           | char()
|    14 |
| UbPager                          | char()
|     8 |
| UbObs                            | text
|   var |
+----------------------------------+----------------------------------+-------+

Index:    Ubicacion_pkey

Ok como ven son tablas separadas, pero como puedo unirlas o
relacionarlas?
Creo que debo de crear otra tabla con la informacion necesaria de cada
una de las tablas que estan arriba pero no se como?

En realidad no se si estoy haciendo lo correcto o si me debo de
regresar.
Que sugerencias me dan ustedes?

hasta pronto
sevega

---------------------------------------------------------------------
Lista de soporte de LinuxPPP
 Reglas de la lista en http://pepe.net.mx/reglas.html



[Hilos de Discusión] [Fecha] [Tema] [Autor]