473,738 Members | 5,934 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 6204
> 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
1673
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 mechanism, but is now becoming a complete ODBMS. Some details are available here: ...
34
7105
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
9266
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
3335
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
1849
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 in the DB. But the problem is that I need to know the ID of the object as soon as it is created,...
3
2079
by: pratham | last post by:
If i understand correct? is strong typed DataSet is ORM implementation by Microsoft? Expecting comments .. please Praveen
24
2094
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
1553
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 internals and features of the
13
1612
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 variables with its parameters, and returns the result of the query. I would like to get some opinions...
0
8788
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9476
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9263
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8210
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6053
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2193
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.