then when desigining of tables instead of keeping foreign key and making the design complex
can we give each table a unique primary key and then link it instead of creating several foreign keys when there are large number of tables
Using constraints is a good thing, it is after all one of the main reasons you would use a relational database to store your data (the clue is in the name). Does it make your data model complex? Not really. And doing otherwise means your data is open to corruption; your other idea is very bad design.
suppose we have ID column as a primary key in one table and foreign key in another table. Is it mandatory that we have to name it ID in another table?
Joined: Jan 08, 2009
Thank you so much for your clarification.
subject: can we join 2 diffrent tables in SQL. which does not have a foriegn key?