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

From Robert Pepersack
Subject Re: PostgreSQL Object-Oriented Database?
Date
Msg-id 49F5992A.1915.0068.0@mdinsurance.state.md.us
Whole thread Raw
In response to Re: PostgreSQL Object-Oriented Database?  (Bill Moran <wmoran@potentialtech.com>)
Responses Re: PostgreSQL Object-Oriented Database?
List pgsql-general
I read the document on array data types.  Do they have anything at all to do with PostgreSQL being "object-oriented"?
 
Also, these comma-delimited fields make creating reports with our reporting tool impossible.

>>> Bill Moran <wmoran@potentialtech.com> 4/27/2009 10:35 AM >>>
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 contractor has more than one value in a column separated by commas.  In the relational world, this obviously violates first normal form.  When I asked about it, he said that it's because PostgreSQL is an "object-oriented database".  I'm very skeptical.

> 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/

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Whit Armstrong
Date:
Subject: find column OID types with information schema?
Next
From: Tom Lane
Date:
Subject: Re: find column OID types with information schema?