Re: Database design problem - resolving many-many relationships
Date: 28 May 2002 14:12:38 -0700
Message-ID: <a6e74506.0205281312.1ec3fdb0_at_posting.google.com>
> I am a database newbie and am trying hard to design a database for > computer inventory, but with no success.
The problem you are encountering results from your need for a varying number of properties per record and variable number of values per property. You would need to break the design into many tables to achieve the desired flexiblity.
In XDb, a simple oodb, an instance of each class can have varying
number of properties and each property can have varing number of
values (or references).
Below are the main classes to implement your design. Note:
"." indicates property
-> reference to object
[] indicates object's class
Comp_Cls
.Name
.Model
->DEll GX1
.OS
->NT vX
->WIN95 vY
.HD
->WD40MB
->WD20MB
.NetDevice
IntgNIC
.IP = 1.2.3.4
PC_NIC1
.IP = 1.2.3.4
PC_NIC2
.IP = 1.2.3.4
WirelessNIC
.IP = 1.2.3.4
.User
->John
->Mary
OS_Cls
.Name
.Version
User_Cls
.Name
HD_Cls
.Mfg
.Capacity
NIC_Cls
.IP
IntgNIC [NIC]
.IP
PC_NIC [NIC]
.IP
WirelessNIC [NIC]
.IP
IP_Cls
.Address
For more info, see www.xdb1.com Received on Tue May 28 2002 - 23:12:38 CEST