Profile Picture
IT Made Easy
The site provides some rough IT Notes that make your life easier. The site currently has notes on HTML, CSS, Regex, OOPS, JS, JQuery, PHP, Java, ASP.NET, C#, Database, Linux, URL Rewrite, SEO, Project Management and Hosting. Please do share this site if you like.

Physical and Relational Data Model


A candidate key is a combination of attributes that can be uniquely used to identify a database record without any extraneous data. Each table may have one or more candidate keys. One of these candidate keys is selected as the table primary key.

Any candidate key which is not a primary key is called an alternate key

Primary key is a unique identifier for a table.

  1. Should be unique
  2. Should not hold null (undefined)
  3. Should not change value for its lifetime

If it has more than one attribute it is called composite key

Foreign key is a primary key in a different table. Diagrammatically, a foreign key is depicted as a line with an arrow at one end.

Fields are the columns in databases. They can also be a piece of specific information from a record

A table is a row and column arrangement of data

Referential Integrity says that

  1. We may not add a record to the table that contains the foreign key unless there is a corresponding record in the linked table
  2. Cascading update has to be implemented meaning when a record in the linked table changes, all foreign keys in the Employees table must be modified using a cascading update
  3. Cascading delete has to be implemented meaning when a record in the linked table changes, all records in the linking table must be deleted using a cascading delete.

IT Notes

by VinodSebastian

IT Downloads