Re: Implementation of object database in relational database
Date: 26 May 2005 07:45:43 -0700
Message-ID: <1117118743.169480.60450_at_f14g2000cwb.googlegroups.com>
> Does aybody know any articles or any other info of implementations > of object databases using relational databases? > I'd be really greatfull of any informations.
What do you mean by "object"? Code + data? Are are the object's properties and methods similar or quite diverse? While not impossible, it is impractical to store code and data or collections of diverse objects in relational dbs.
An example at www.xrdb.com/example/ex123.asp shows how to store 10 diverse computer systems using a simple but flexible database. Below script stores and queries the first computer system, a Dell computer with a 133 Mhz motherboard with dual 2.0 GHz processors, 20 GB IDE hard drive and 7.1 speaker system that can handle 1000 watts peak. The computer has 3 slots, the first has a 2/10 MBit network card, the second with an audio card with 3 sampling rates. The third slot is empty. See script for additional specifications.
// Create various types.
(CREATE type inst *device)
(CREATE type inst *serial#)
(CREATE type inst *mfg)
(CREATE type inst *model#)
(CREATE type inst *computer & dir item it)
(CREATE type inst *slots)
(CREATE type inst *motherboard)
(CREATE type inst *"bus speed")
(CREATE type inst *cpu)
(CREATE type inst *"cpu type")
(CREATE type inst *"clock rate")
(CREATE type inst *"hard disk")
(CREATE type inst *"disk type")
(CREATE type inst *capacity)
(CREATE type inst *"buffer size")
(CREATE type inst *"rotational speed")
(CREATE type inst *"seek time")
(CREATE type inst *slot)
(CREATE type inst *"slot type")
(CREATE type inst *position#)
(CREATE verb inst *has)
(CREATE type inst *"network adapter")
(CREATE type inst *"transfer rate")
(CREATE type inst *"audio adapter")
(CREATE type inst *"sampling rate")
(CREATE type inst *"speaker system")
(CREATE type inst *"speaker system type")
(CREATE type inst *efficiency)
(CREATE type inst *"continuous power")
(CREATE type inst *"peak power")
(CREATE type inst *spec)
(CREATE type inst *qty)
(CREATE type inst *unit)
// Create a computer with a 133 Mhz motherboard // with dual 2.0 GHz processors, 20 GB IDE hard drive // and 7.1 speaker system that can handle 1000 watts peak. // The computer has 3 slots, // the first with 2/10 MBit network card, // the second with audio card with 3 sampling rates. // The third slot is empty.
(CREATE device inst *
& computer inst it
& it mfg +dell
& it model# +"optiplex gx100"
& it serial# +DM68967A687
& it has (CREATE device inst *
& motherboard inst it
& it serial# +HG455U37Q
& it "bus speed" (CREATE spec inst *
& it qty +133
& it unit +mhz)
& it has (CREATE device inst *
& cpu inst it
& it mfg +intel
& it "cpu type" +pentium
& it serial# +VWR37876
& it "clock rate" (CREATE spec inst *
& it qty +2
& it unit +ghz))
& it has (CREATE device inst *
& cpu inst it
& it "cpu type" +pentium
& it serial# +VQR3736
& it "clock rate" (spec inst *
& * qty 2
& * unit ghz)))
& it has (CREATE device inst *
& "hard disk" inst it
& it mfg +ibm
& it "disk type" +ide
& it capacity (CREATE spec inst *
& it qty +20
& it unit +gb)
& it "buffer size" (CREATE spec inst *
& it qty +2
& it unit +mb)
& it "rotational speed" (CREATE spec inst *
& it qty +10000
& it unit +rpm)
& it "seek time" (CREATE spec inst *
& it qty +10
& it unit +ms))
& it has (CREATE slot inst *
& it position# +1
& it "slot type" +pci
& it has (CREATE device inst *
& "network adapter" inst it
& it mfg +smc
& it serial# +Y68347
& it "transfer rate" (CREATE spec inst *
& it qty +2
& it unit +mbit)
& it "transfer rate" (CREATE spec inst *
& it qty +10
& it unit +mbit)))
& it has (CREATE slot inst *
& it position# +2
& it "slot type" +pci
& it has (CREATE device inst *
& "audio adapter" inst it
& it mfg +"creative labs"
& it model# +SB6887i
& it "sampling rate" (CREATE spec inst *
& it qty +22
& it unit +khz)
& it "sampling rate" (CREATE spec inst *
& it qty +44
& it unit +khz)
& it "sampling rate" (CREATE spec inst *
& it qty +88
& it unit +khz)))
& it has (CREATE slot inst *
& it position# +3
& it "slot type" +scsi)
& it has (CREATE device inst *
& "speaker system" inst it
& it "speaker system type" +7.1
& it efficiency (CREATE spec inst *
& it qty +97
& it unit +db/watt)
& it "continuous power" (CREATE spec inst *
& it qty +200
& it unit +watt)
& it "peak power" (CREATE spec inst *
& it qty +1000
& it unit +watt))
)
// Find computer that has a mother board // that has a cpu whose serial# is VQR3736. // Finds above computer.
(SELECT * has (* has (* serial# VQR3736)))
Received on Thu May 26 2005 - 16:45:43 CEST
