March 19, 2013 at 6:05 pm
We are creating an address database to maintain student address info.
I have two tables like this :
The address table is a master table that holds all addresses. The studHomeAddress table will hold all students and their address- the addressID comes from the master address table. The primary key of the Address table is Address ID, the PK for studHomeAddress table is studentID and AddressID,
we are going to have a screen for user to add or edit for each of the two tables.
They can add and edit records, for both of the tables.
For the first table Address, I think it is no problem. For the second table, if we want to change the address of the student to another one, then the AddressID will be changed for this record, but it is the PK, the PK for the row will be changed. Is that an OK design?
Thanks,
March 19, 2013 at 6:11 pm
I guess your StudentAddress table is a link table between Address and Student tables, right?
If so, when you edit the link you better delete and insert "link" rows if they change, not update them.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy