Itse 2347
Download
1 / 13

Referential Integrity - PowerPoint PPT Presentation


  • 369 Views
  • Uploaded on

Basic Understanding of Referential Integrity

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Referential Integrity' - rlc6009


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Itse 2347 l.jpg

ITSE 2347

Referential Integrity


Referential integrity l.jpg
Referential Integrity

Referential Integrityis an optional system of rules that guarantees the relationships are valid and the databases will remain intact as data is entered, edited, or deleted.


Referential integrity3 l.jpg
Referential Integrity

Basic RulesFor every record in a child table ( the “many” side) one and only one matching record must be in the parent table ( the “one” side).


Referential integrity4 l.jpg
Referential Integrity

Example Look at a Parent/Child relationship.

Without a Parent there is no Child.


Referential integrity5 l.jpg
Referential Integrity

Example In order to have a work order you would need a customer that would be receiving the work.

The Customer would be the Parent.

The Work order would be the Child.


Referential integrity6 l.jpg
Referential Integrity

Before you can set referential integrity the following conditions must be met.


Referential integrity conditions l.jpg
Referential Integrity/ Conditions

  • The matching field in the parent table is the primary key or has a unique value.

  • Related Field are the same data type.

  • Both tables are in the same Database.


Referential integrity conditions8 l.jpg
Referential Integrity/ Conditions

  • Every record has one and only one matching record in the table.


Tables can be joined in three ways l.jpg
Tables can be joined in three ways

  • One-to-One

  • One-to-Many

  • Many-to-Many


A one to many relationship l.jpg
A one-to-many relationship

A one-to-many relationship exists when one table has many records associated with a given value but the related table has only one record for that value.

  • The table with one record is called the primary table

  • The table with many records is called the related table



A one to many relationship12 l.jpg
A one-to-many relationship

One Employer------Many Positions


A one to many relationship13 l.jpg
A one-to-many relationship

We can’t remove the Employer table because it would delete all of the employers from the Position table.


ad