Nuevamente con la Orientacion a Objetos

Lists: pgsql-es-ayuda
From: Cristofer Nicolas Reyes Aguilera <crreyes(at)inf(dot)utfsm(dot)cl>
To: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Nuevamente con la Orientacion a Objetos
Date: 2004-11-23 22:25:02
Message-ID: 200411231925.11197.crreyes@inf.utfsm.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-es-ayuda

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Me gustaria saber si PostgreSQL tiene la capacidad de crear y administrar
bases de datos OO, o si existe alguna manera de "simular" esta
caracteristica.

Saludos!
- --
Cristofer Reyes Aguilera linux-user #353991
http://www.inf.utfsm.cl/~crreyes
Laboratorio de Computacion, Departamento de Informatica, UTFSM
crreyes (at) inf (dot) utfsm (dot) cl
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBo7jEjvuTr7tY3e8RAp3MAJ47ZT2OYarwBp438nqAsTMRemfGwwCfRn/g
IIrtUdb1kyV2Q0YCnhhSxDU=
=lwT7
-----END PGP SIGNATURE-----


From: Jaime Casanova <systemguards(at)yahoo(dot)com>
To: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Nuevamente con la Orientacion a Objetos
Date: 2004-11-24 04:54:55
Message-ID: 20041124045455.7850.qmail@web50007.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-es-ayuda

--- Cristofer Nicolas Reyes Aguilera
> Hash: SHA1
>
> Me gustaria saber si PostgreSQL tiene la capacidad
> de crear y administrar
> bases de datos OO, o si existe alguna manera de
> "simular" esta
> caracteristica.
>

CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ]
TABLE table_name (
{ column_name data_type [ DEFAULT default_expr ] [
column_constraint [ ... ] ]
| table_constraint
| LIKE parent_table [ { INCLUDING | EXCLUDING }
DEFAULTS ] } [, ... ]
)
[ INHERITS ( parent_table [, ... ] ) ]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ WITH OIDS | WITHOUT OIDS ]
[ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]
[ TABLESPACE tablespace ]

Atentamente,
Jaime Casanova

_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com


From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Jaime Casanova <systemguards(at)yahoo(dot)com>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Nuevamente con la Orientacion a Objetos
Date: 2004-11-24 23:59:08
Message-ID: 20041124235908.GA4049@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-es-ayuda

On Tue, Nov 23, 2004 at 10:54:55PM -0600, Jaime Casanova wrote:
> --- Cristofer Nicolas Reyes Aguilera
> > Hash: SHA1
> >
> > Me gustaria saber si PostgreSQL tiene la capacidad
> > de crear y administrar
> > bases de datos OO, o si existe alguna manera de
> > "simular" esta
> > caracteristica.
> >
>
> CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ]
> TABLE table_name (
> { column_name data_type [ DEFAULT default_expr ] [
> column_constraint [ ... ] ]
> | table_constraint
> | LIKE parent_table [ { INCLUDING | EXCLUDING }
> DEFAULTS ] } [, ... ]
> )
> [ INHERITS ( parent_table [, ... ] ) ]
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> [ WITH OIDS | WITHOUT OIDS ]
> [ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]
> [ TABLESPACE tablespace ]

Ojo con eso, hay muchas "infelicidades" ... ver por ej. el asunto de las
restricciones UNIQUE o las llaves foraneas (en el fondo todo es un mismo
problema: no hay indices de mas de una tabla).

De hecho yo prefiero mantenerme lo mas lejos posible de la herencia ...

En cualquier caso, hay que tener muy en cuenta que Postgres es un
ORDBMS, no un OODBMS. Son cosas muy distintas.

--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
Criptografía: Poderosa técnica algorítmica de codificación que es
empleada en la creación de manuales de computadores.