I am a student, trying my hand for the first time 2 design a db- database for computer inventory, but with no success. Here is my design...
I need a table containing info about a computer model,the OS running
on the comp, hard drives it contains, the network addresses and the
primary and secondary users. I have a lot of many-many relationships
within this table.
1.Each comp can have one or more OS - as in a Mac running both OS 9
and OS x.
and each OS is present on many comps.
2.A comp can have 1 or more hard drives with varying capacity.
3.Each comp has a slew of network addresses - IP, Mac address of
pccard, MAC address of wireless, Mac address of integrated network
The table structure so far:
Comp_details (Comp id primary key
os id foreign key references comp_os)
Now, what i've thought of is to resolve the many -many relations by
creating a table for the relations.
The part I am most confused about is the hard drives and Network
addresses. A comp may or may not have more than 1 hard disk. Same goes forthe Network addresses. So, it makes sense to create a separate table for the relation -
in the case of hard disc and Network addresses..
This would be too tiresome since I have almost 600-700 comps to deal
with. Also, the no. of addresses will run into thousands.
Should I just go ahead and create 2 columns for hard disks in
comp_details table as Hard_disk_1 and hard_disk_2 and create 4 columns for addr as mac_1, mac_2, mac_3, ip ?
This violates the normalization rules..
I am at odds as to how to proceed from here...sorry abt the message length.Couldn't put it more succintly than this.
Please help. Thanks in advance for all your pointers.