Re: PostgreSQL Object-Oriented Database? - Mailing list pgsql-general

From Bill Moran
Subject Re: PostgreSQL Object-Oriented Database?
Date
Msg-id 20090427103523.afb0ef6c.wmoran@potentialtech.com
Whole thread Raw
In response to PostgreSQL Object-Oriented Database?  ("Robert Pepersack" <RPepersack@mdinsurance.state.md.us>)
Responses Re: PostgreSQL Object-Oriented Database?
List pgsql-general
In response to "Robert Pepersack" <RPepersack@mdinsurance.state.md.us>:

> Hi,
>
> Thanks in advance for your help.
>
> I have a lot of experience with object-oriented programming and relational databases, but I'm new to PostgreSQL.
>
> My agency has a contractor that created a PostgreSQL database that he calls "object-oriented".  I noticed that the
contractorhas more than one value in a column separated by commas.  In the relational world, this obviously violates
firstnormal form.  When I asked about it, he said that it's because PostgreSQL is an "object-oriented database".  I'm
veryskeptical. 
>
> Can someone tell me if this guy is right?

PostgreSQL supports an array type for any base column type.  It's not
always the _best_ way to do things, but (in my experience) it's sometimes
better to use an array column than to do an additional one-to-many table.

Whether or not it's good design is highly dependent on the nature of
the data.

In psql, do \d on the table, if the field type is postfixed with a
[], then it's an array datatype:
http://www.postgresql.org/docs/8.3/static/arrays.html

--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/

pgsql-general by date:

Previous
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: PostgreSQL Object-Oriented Database?
Next
From: Richard Broersma
Date:
Subject: Re: PostgreSQL Object-Oriented Database?