Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Databases as objects

Re: Databases as objects

From: Neo <neo55592_at_hotmail.com>
Date: 21 Dec 2006 19:13:11 -0800
Message-ID: <1166757191.832581.62130@a3g2000cwd.googlegroups.com>


> What I'm trying to suggest... that the database is an object, which should hide its data and only be used through its interface, just like they do with other objects in their models.

Suppose we have a simple application that deals with 5 persons with the some attributes: name, age, ss#.

One way to implement this is to create 5 instances of the person class in C++ where each instance has the desired attributes. The programmer needn't worried how the objects are stored and recalled as some mapping software takes care of that behind the scenes. A line of code might look like this:

print (john.age, john.ss#);

Another way is for a C++ application to connect to an RMDB and create a relation named T_Person with attributes name, age and ss#. Similar code might look like this:

rs = ado.execute("SELECT * FROM T_Person WHERE name='john'"); Print (rs.field("age"), rs.field("ss#"));

Each of the above methods have advantages and disadvantages that make it more appropriate for a particular requirement. When you have two systems/methodologies at work, there is likey to be some type of impedance mismatch in feature, flexibility, performance, etc. Received on Thu Dec 21 2006 - 21:13:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US