Tuesday, 21 August 2012

Primary Keys

  • A Primary Key is an attribute that uniquely identifies a single object within the entity collection.
    • Example: a student's student ID is unique as no other student will have the same ID number. 
    • identifier key
    • each entity should have at least one primary key.
  • Primary Keys are drawn as normal attributes but with the name of the attribute underlined.
  • Primary Keys cannot be null, a null value is an empty value (0 and spaces are values and is NOT the same as a null value.)
  • Each entity must have at least one Primary Key. 
  • If there is no obvious attribute to use as a primary key, we can usually just create some sort of ID number.


No comments:

Post a Comment