newbie sql database deisgn

ironvid

Registered User.
Local time
Today, 10:22
Joined
Aug 14, 2003
Messages
18
Thanks to everone in forums for help with my access frontend

If anyone can help with my ms sql 2000 backend I have this question:-

I am designing two tables :

Batch
Documnets

In both tables i have a field called "page"
How can I design the page field in the batch table to be updated with the information from the page field in the documents table automaticlly?

please make it simple still a newbie

thanks....
 
I didn't explain very well

Where the contents of another field match

Name (unique Key)

So where the name value fields match between the batch & documents table the contents from the page field in the document field will be inserted into the page field in the batch table.

hope that makes sense
 
You are duplicating data. You do not need the Page field in both tables. The preferred solution is to remove the Page field from the "many-side" table. You can get the Page field whenever you need it by joining to the one-side table.

Since this duplication violates third normal form, there is no built in method to update the redundant data. You would need to create database triggers where you would force the update.
 

Users who are viewing this thread

Back
Top Bottom