Tuesday, 21 August 2012

Converting from ERD

  • To convert an ER diagram to the relational model, we have to identify how a relational model represents each component of our ERD.
  • To start, the entity itself becomes a table, with the entity name becoming the schema's name.
    • note: each entity in the ERD is a separate table in the relational model.
    • note:Schema is another name for a database or collection of tables.
  • Each attribute in our ERD becomes a column in the relational model
  • The attribute's name is the heading for each column.
    • Column names should be only be one word, use an underscore(_) to separate words if needed.
  • Primary keys should be placed in the first column and underlined just like in our ERD.
  • Free to insert data into our table/ Each tuple(row) represents an instance of the entity.
  • ExampleL each tuple in a student table is a separate studet, with all data on the row referring to the same student.
  • We do not always need to show the data in the schema, there will be times we will only draw the schema structure of the table.
  • This allows us to draw schema quickly
Reminders:
  • Each entity in an ERD is a separate table in the relational model
  • Each table must at least have a primary or composite key.
  • Each cell in the table can contain a maximum of one value.
  • Each row in a table refers to an individual instance of the entity. 

No comments:

Post a Comment