473,569 Members | 2,916 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Object Relational features in PostgreSQL

Hi everyone. I just finished a course on PostgreSQL and I found out that
PostgreSQL doesn't provide any object relational features (as claimed in
the official documentation), except table inheritance and very limited
user defined types (I defined a UDT with 2 attributes and couldn't use
it in a table, and the trainer said it must contain 1 attribute at most
so that it can be used (as a column) in tables)



So my question is whether there is (or will be) any support for (any of)
the following:

More flexible user defined types and support for these in tables

Type inheritance

REF and DEREF data types

Nested tables

Polymorphism and more flexible casting of objects (like the TREAT
function, not only the ONLY function)

Typed tables (create table X of type Y)

Object views

User defined functions (encapsulated in the body of a user defined type)



I would be really thankful for any fast reply, because I need to report
to the management whether a migration to PostgreSQL is both efficient
and possible or not.






Nov 22 '05 #1
3 6174
> Hi everyone. I just finished a course on PostgreSQL and I found out that
PostgreSQL doesn't provide any object relational features (as claimed in
the official documentation), except table inheritance and very limited
user defined types (I defined a UDT with 2 attributes and couldn't use
it in a table, and the trainer said it must contain 1 attribute at most
so that it can be used (as a column) in tables)
So my question is whether there is (or will be) any support for (any of)
the following:

More flexible user defined types and support for these in tables

Type inheritance

REF and DEREF data types

Nested tables Postgres has arrays - will that work? After all a table is just an array :)

Polymorphism and more flexible casting of objects (like the TREAT
function, not only the ONLY function)

Typed tables (create table X of type Y)

Object views Postgres has views.

User defined functions (encapsulated in the body of a user defined type) Postgres has api's in several different languages -
http://www.postgresql.org/docs/curre...ic/xplang.html
The best thing about it is you can write your own functions tailored to
your needs.

I would be really thankful for any fast reply, because I need to report
to the management whether a migration to PostgreSQL is both efficient
and possible or not.


It would be helpful to know what db you're comparing it against so a more
informed response can be provided. I think a lot of your anwers are out
there - you need to get both feet wet and solve a specific problem with it
to determine if it's right for your needs.

The docs http://www.postgresql.org/docs/ provide a great deal of
information which should help you. Also the mailing lists at
http://www.postgresql.org/lists.html are very helpful and answer many
questions of those new to postgres.

Regards,

Fred

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 22 '05 #2

--- Robert Abi Saab <RS***@ccc.gr > wrote:
So my question is whether there is (or will be) any
support for (any of)
the following:

More flexible user defined types and support for
these in tables

Type inheritance

REF and DEREF data types

Nested tables

Polymorphism and more flexible casting of objects
(like the TREAT
function, not only the ONLY function)

Typed tables (create table X of type Y)

Object views

User defined functions (encapsulated in the body of
a user defined type)

I would be really thankful for any fast reply,
because I need to report
to the management whether a migration to PostgreSQL
is both efficient
and possible or not.


Out of curiosity, what makes these features
indispensable to your project? Are you seeking to
migrate from a DBMS that already supports those
features, and if so, what is that?

_______________ _______________ ____
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 22 '05 #3
This will be the topic of a talk I'll be giving at OSCON in July.

The extent of Object implementation in PostgreSQL
is not as simplistic as your analysis makes it. The Object
side of object-relational includes creating datatypes which in
turn are first class objects to be used in a relational database system.
Those first class objects have structure (class), functions
(methods, operators and indexes). The relatively recent addition
of DOMAIN support enable creating subclasses of existing types,
usually base types.

PG's implementation of inheritance is not a full OO
definition of inheritance and is contrary to Codd&Date&Darwi n's
specifications for inheritance. There were other ORDBMS that did
differently or to deeper extents.

For a good understanding of some of the features you are mentioning
and as a comparison to PostgreSQL's implementation see
Paul G. Brown's book "Object-Relational Database Management: A Plumber's Guide".

I would be happy to help with additional information about the
extent of the O part or ORDBMS to help your management team.

elein
=============== =============== =============== ===============
el***@varlena.c om Varlena, LLC www.varlena.com

PostgreSQL Consulting, Support & Training

PostgreSQL General Bits http://www.varlena.com/GeneralBits/
=============== =============== =============== =============== =
"Sometimes we are confronted with more data than we can really use,
and it may be wisest to forget and to destroy most of it"
-- Donald Knuth, The Art of Computer Programming
On Mon, Jan 26, 2004 at 10:01:19AM +0200, Robert Abi Saab wrote:
Hi everyone. I just finished a course on PostgreSQL and I found out that
PostgreSQL doesn??t provide any object relational features (as claimed in the
official documentation), except table inheritance and very limited user defined
types (I defined a UDT with 2 attributes and couldn??t use it in a table, and
the trainer said it must contain 1 attribute at most so that it can be used (as
a column) in tables)

So my question is whether there is (or will be) any support for (any of) the
following:

More flexible user defined types and support for these in tables

Type inheritance SEE Domains
REF and DEREF data types
See OIDS
Nested tables
See row types and/or arrays. Row types are not currently valid
to store in a column.
Polymorphism and more flexible casting of objects (like the TREAT function, not
only the ONLY function)

Typed tables (create table X of type Y)
See named types.
Object views
We have this but you may not recognize it as such.
User defined functions (encapsulated in the body of a user defined type)
This is an implementation detail. The functions are linked to
the type in the type definition.

I would be really thankful for any fast reply, because I need to report to the
management whether a migration to PostgreSQL is both efficient and possible or
not.




---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1666
by: Patrick K. O'Brien | last post by:
I'm working on an ODBMS written in Python, for Python, and was wondering if anyone was interested. In particular, I'd like to know what features would be useful, and what types of use cases people would have for a simple, but feature-rich object database. The system that I'm developing is PyPerSyst, which began as a simple persistence...
34
7051
by: yensao | last post by:
Hi, I have a hard time to understand difference and similarities between Relational database model and the Object-Oriented model. Can somebody help me with this? Thank you in advance. Yensao
11
9223
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in C++. I find my self sometimes, trying Object app = Object(); Object *app = Object(); Object app = new Object();
49
3282
by: Mike MacSween | last post by:
I frequently hear that there isn't a commercially available dbms that fully implements the relational model. Why not? And which product comes closest. Mike MacSween
2
1841
by: nacho222 | last post by:
I'm currently in the middle of writing a persistence framework, and I have to make a design decission. The framework will take care of all the saving and restoring objects, and also the relationships between them. Obviously, I need a way to identify objects uniquely. Now, one way would be to use an autogenerated id from a autoincremental field...
3
2066
by: pratham | last post by:
If i understand correct? is strong typed DataSet is ORM implementation by Microsoft? Expecting comments .. please Praveen
24
2075
by: sonos | last post by:
Hi, I am working on a program to archive data to disk. At what point is it best to use a relational database like MySQL as the backend instead of a C program alone? Thanks to any and all replies.
17
1524
by: Aaron Watters | last post by:
I've been poking around the world of object-relational mappers and it inspired me to coin a corellary to the the famous quote on regular expressions: "You have objects and a database: that's 2 problems. So: get an object-relational mapper: now you have 2**3 problems." That is to say I feel that they all make me learn so much about the...
13
1597
by: sulyokpeti | last post by:
I have made a simple python module to handle SQL databases: https://fedorahosted.org/pySQLFace/wiki Its goal to separate relational database stuff (SQL) from algorythmic code (python). A SQLFace is a facade initialized with a configuration file (XML). It provides callable command objects for each sql query. The call substitutes template...
0
7693
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7665
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6277
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2105
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.