Docsity

Relational data model (;, Lecture notes of Database Management Systems (DBMS)

Partial preview of the text

Download Relational data model (; and more Lecture notes Database Management Systems (DBMS) in PDF only on Docsity!

Database Systems: Design,

Implementation, and

Management

Eighth Edition

The Relational Database Model

Objectives

  • (^) In this chapter, you will learn:
    • (^) That the relational database model offers a logical view of data
    • (^) About the relational model’s basic component: relations
    • (^) That relations are logical constructs composed of rows (tuples) and columns (attributes)
    • (^) That relations are implemented as tables in a relational DBMS

A Logical View of Data

  • (^) Relational model
    • (^) View data logically rather than physically
  • (^) Table
    • (^) Structural and data independence
    • (^) Resembles a file conceptually
  • (^) Relational database model easier to understand than hierarchical and network models

Tables and Their Characteristics

  • (^) Logical view of relational database based on relation - (^) Relation thought of as a table
  • (^) Table: two-dimensional structure composed of rows and columns - (^) Persistent representation of logical relation
  • (^) Contains group of related entities = an entity set

Keys

  • (^) Each row in a table must be uniquely identifiable
  • (^) Key is one or more attributes that determine other attributes
  • (^) Key’s role is based on determination
    • (^) If you know the value of attribute A, you can determine the value of attribute B
  • (^) Functional independence:
    • (^) Attribute B functionally dependent on A if all rows in table that agree in value for A also agree in value for B

Keys (continued)

  • (^) Nulls :
    • (^) No data entry
    • (^) Not permitted in primary key
    • (^) Should be avoided in other attributes
    • (^) Can represent
      • (^) An unknown attribute value
      • (^) A known, but missing, attribute value
      • (^) A “not applicable” condition

Keys (continued)

  • (^) Nulls :
    • (^) Can create problems when functions such as COUNT, AVERAGE, and SUM are used
    • (^) Can create logical problems when relational tables are linked

13

16

Integrity Rules

  • (^) Many RDBMs enforce integrity rules automatically
  • (^) Safer to ensure application design conforms to entity and referential integrity rules
  • (^) Designers use flags to avoid nulls
    • (^) Flags indicate absence of some value

The Data Dictionary

  • (^) Data dictionary
    • (^) Provides detailed accounting of all tables found within the user/designer-created database
    • (^) Contains (at least) all the attribute names and characteristics for each table in the system
    • (^) Contains metadata: data about data