M
mkj
Hi,
I am creating a database that stores IP addresses for various devices
(network switches, computers etc) on the network. I had hoped to be able to
have one table in the middle that stores an IP address to a serial number.
Seperate tables, one for computers and one for switches would link to this
table to get the IP address for the device's serial number.
Unfortunatly, after I've created the relationships, when I add a new
computer to one table and it's ip address to the other, a message appears
saying that I need a matching serial number in the switches table.
I can only get around this by turning off referential integrity on the
relationships, but that feels wrong. Is there another way?
The tables in my test are:
Table: T_IPAddresses,
Fields: ID{PK}, SerialNo, IPAddress
Table: T_Computers,
Fields: SerialNo{PK}, PCName
Table: T_Switches,
Fields: SerialNo{PK}, NumberOfPorts
There is a 1-many relationship between T_Computers(SerialNo) and
T_IPAddresses(SerialNo), and another 1-many relationship between
T_Switches(SerialNo) and T_IPAddresses(SerialNo).
Cheers,
I am creating a database that stores IP addresses for various devices
(network switches, computers etc) on the network. I had hoped to be able to
have one table in the middle that stores an IP address to a serial number.
Seperate tables, one for computers and one for switches would link to this
table to get the IP address for the device's serial number.
Unfortunatly, after I've created the relationships, when I add a new
computer to one table and it's ip address to the other, a message appears
saying that I need a matching serial number in the switches table.
I can only get around this by turning off referential integrity on the
relationships, but that feels wrong. Is there another way?
The tables in my test are:
Table: T_IPAddresses,
Fields: ID{PK}, SerialNo, IPAddress
Table: T_Computers,
Fields: SerialNo{PK}, PCName
Table: T_Switches,
Fields: SerialNo{PK}, NumberOfPorts
There is a 1-many relationship between T_Computers(SerialNo) and
T_IPAddresses(SerialNo), and another 1-many relationship between
T_Switches(SerialNo) and T_IPAddresses(SerialNo).
Cheers,