![]() |
|
![]() | ||
|
Subject:
OBJECT-RELATIONAL DATABASE SYSTEMS
Category: Computers Asked by: zahra1234-ga List Price: $2.00 |
Posted:
29 Oct 2005 15:30 PDT
Expires: 28 Nov 2005 14:30 PST Question ID: 586529 |
What is the difference between referential integrity and the indexes that support it? |
![]() | ||
|
There is no answer at this time. |
![]() | ||
|
Subject:
Re: OBJECT-RELATIONAL DATABASE SYSTEMS
From: jstar-ga on 01 Nov 2005 23:31 PST |
REFERENTIAL INTEGRITY is a database concept that ensures that relationships between tables remain consistent. When one table has a foreign key to another table, the concept of referential integrity states that you may not add a record to the table that contains the foreign key unless there is a corresponding record in the linked table. It also includes the techniques known as cascading update and cascading delete, which ensure that changes made to the linked table are reflected in the primary table. An INDEX is a database feature used for locating data quickly within a table. Indexes are defined by selecting a set of commonly searched attribute(s) on a table and using the appropriate platform-specific mechanism to create an index As you can see there is a great divide. First is just a concept and the second one is a feature that accomplish to locate data as quick as possible. They don't have anything in common. |
Subject:
Re: OBJECT-RELATIONAL DATABASE SYSTEMS
From: johnfredcee-ga on 16 Nov 2005 03:53 PST |
It's possible to add a constraint on a column (which may be an index column) in order to maintain referential integrity, if the column is a foreign key: and keys are usually (but not always) indexed for fast lookup, because they will have the value that uniquely identifies a row in the table.. is this what you were thinking of? E.g (SQL 3) CREATE TABLE department (department_number CHAR(4) CONSTRAINT prim_dept PRIMARY_KEY, department_name VARCHAR(10)); ALTER TABLE employee ADD (CONSTRAINT emp_dept_fkey FOREIGN KEY(department_number) REFERENCES department(department_number)); |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |