| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Should I use database foreign keys and indexes
I recently had a discussion with several web application developers
where I work about the use of foreign keys and table indexes.
I always thought that they were both basic elements of relational database modeling and should be included in all of your database designs. I was suprised that they felt that foreign keys and indexes add unnecessary complexity to a database and that they never use foreign key constraints and rarely use indexes as a primary key. I would like to know your thoughts on using foreign keys and indexes in a database. The pros and cons I have thought of thus far are:
Foreign Keys Constraints:
Pro:
Provide referential integrity
Con:
May have to disable when you are doing mass updates
Table Indexes as Primary Key:
Pro:
Unique reference to the table so that a change to a datafield doesn't require a change to all tables that reference it Con:
May have to do a table join to search on a particular table field
Please add any comments you have.
Thanks,
Carl Received on Wed Jul 10 2002 - 16:13:46 CDT
![]() |
![]() |