FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

REferencial Integrity in databases

 


akshar
Can someone tell me what exactly referencial integrity means in the field of databases. What other integrities exist and source of more information about them.
mOrpheuS
akshar wrote:
Can someone tell me what exactly referencial integrity means in the field of databases. What other integrities exist and source of more information about them.

The data stored in a database is often interrelated.

Let's take a forum system for example ...
one table in the database may store details about forum sections, another about threads, another about posts and yet another about users.

The "posts" table contains a reference to a row in the "users" table, which tells us which user had made a particular post.
This is known as reference.

These references should ideally be all valid, but there can be cases when references are lost.
Eg., a row in the "posts" table refers to a user that doesn't exist in the "users" table.

When all the data references are valid, we have good referential integrity.

Other integreties may include key uniquenesses (eg., there can't be two users with the same username), data validity (eg., the first post date cannot be earlier than the date of registration of the first user) etc.


Search for "referential integrity concepts" on google to find more reference material. Cool
akshar
thnx for that elaborate explaination
Reply to topic    Frihost Forum Index -> Computers -> Software

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.