Database modeling question

From: Vortexmind <vortexmind_at_gmail.com>
Date: 2 Nov 2006 13:54:48 -0800
Message-ID: <1162504488.614856.12790_at_m73g2000cwd.googlegroups.com>



Hi
I'm trying to model a database but I'm having troubles sorting out my ideas. Can anyone help?

I have "Airplanes" & "Weapons" (and specialized weapons such as Guns, Bombs and so on that "extend" from Weapons). What I need to do is to describe "Configurations" of weapons, such as:

  1. An "Airplane" can have 0 to many "Configurations" (0 means unarmed Airplane)
  2. A Configuration is composed by 1 or more Weapons
  3. I have to keep track of some attributes for each weapon in a given
    "Configuration". These attributes are not related to the weapon itself
    as they are related to the particular "Configuration" they're being used into.

For example: we have "Airplane" A and weapons B,C and D.

"Airplane" A has 2 "Configurations"

1) B and D
2) B and C

In 1) B has 100 rounds and D has 200 rounds In 2) B has 150 rounds and D has 90 rounds

Now, how can i realize it in a pratical way?

For now, I have made three tables. Two of them represent Airplane and Weapon. The third one is the many-to-many relationship
"Aircraft_mount_Weapon" . In this intermediary table I can place all
the attributes for each weapon ... but I cannot find a pratical way to group the weapons in Configurations as descrived above. I thought about placing a "config_number" attribute in the "Aircraft_Mount_Weapon" so that I can tag each airplane-weapon association with an ID that represents the configuration ... but this can lead to some overhead with similar configurations ... do you have some better ideas?

Thank you for any help!
Vortexmind Received on Thu Nov 02 2006 - 22:54:48 CET

Original text of this message