CST8215 - Week 2 - CST8215 Week 2 Basics of Database Design...

This preview shows page 1 - 9 out of 26 pages.

CST8215 Week 2
Basics of Database Design Types of tables Types of relations E-R Diagrams Basic parts of tables Naming conventions
Types of tables AKA Entities Reference tables Used to hold static data Normally has 2 – 4 fields and is always a parent. Regular Tables Contains standard data Normally has several fields Can be a parent and/or a child
Attributes AKA Fields Attribute–property or characteristic of an entity or relationship type Classifications of attributes: Required versus Optional Attributes Simple versus Composite Attribute Single-Valued versus Multivalued Attribute Stored versus Derived Attributes Identifier Attributes
E-R Model Constructs Entities: Entity instance–person, place, object, event, concept (often corresponds to a row in a table) Entity Type–collection of entities (often corresponds to a table) Relationships: Relationship instance–link between entities (corresponds to primary key-foreign key equivalencies in related tables) Relationship type–category of relationship…link between entity types Attributes: Properties or characteristics of an entity or relationship type (often corresponds to a field in a table)
Entities Entity – a person, a place, an object, an event, or a concept in the user environment about which the organization wishes to maintain data Entity type – a collection of entities that share common properties or characteristics Entity instance – A single occurrence of an entity type
An Entity… SHOULD BE: An object that will have many instances in the database An object that will be composed of multiple attributes An object that we are trying to model SHOULD NOT BE: A user of the database system An output of the database system (e.g., a report)
Required vs. Optional Attributes Required – must have a value for

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture