No relationships!

j0se

Registered User.
Local time
Today, 16:27
Joined
Jan 15, 2003
Messages
57
would having a db with several tables and NOT setting any relationships up in the relationships window affect the db in any way?

i have such a db, which originally had all the relationships set etc. however, as i encountered errors and had to replace tables and delete entries, i must have at some point deleted all the relationships.

i just relaised that the db now has no relatioships set up (all the primary keys are still in the tables) so i'm wondering if this matters?

cheers
Jose
 
Yes and No.

Providing you create relationships in your queries then you don't need to have them in the relationships window for the queries to work.

However, you can't enforce referential integrity or cascade deletes or updates without this.

On a purely pragmatic point, I use the relationships window to remind me of the structure of the db. That needs the joins to show to make sense of it.
 
that makes sense

cheers for that!
:)
 
The point of relationships is to ensure referential integrity. There is no other reason for them. If you don't care if you have orphan records and you don't need the power of cascade delete, then don't bother.

I on the other hand ALWAYS create relationships to enforce RI because even though I am the best programmer that I know, I still make mistakes and those mistakes can lead to bad data. Bad data can lead to bad business decisions. Bad business decisions lead to ....

The only type of database where you would not enforce RI is a data warehouse or data mart. In these databases, there is no UI to update data. Data is refreshed periodocially from the "production" data base so you don't have to worry about making update mistakes. These databases still require primary keys and indexes because they help speed up joins and searches.
 

Users who are viewing this thread

Back
Top Bottom