Docsity

Relational Database Model - Database Management and Design - Lecture Slides, Slides of Introduction to Database Management Systems

Partial preview of the text

Download Relational Database Model - Database Management and Design - Lecture Slides and more Slides Introduction to Database Management Systems in PDF only on Docsity!

Relational Database Model

In this chapter, you will learn:

  • That the relational database model takes a logical view of data
  • That the relational model’s basic components are entities, attributes, and relationships among entities
  • How entities and their attributes are organized into tables

A Logical View of Data

  • Relational model
    • Enables us to view data logically rather than physically
    • Reminds us of simpler file concept of data storage
  • Table
    • Has advantages of structural and data independence
    • Resembles a file from conceptual point of view
    • Easier to understand than its hierarchical and network database predecessors

Tables and Their

Characteristics

  • Table : two-dimensional structure composed of rows and columns
  • Contains group of related entities an entity set - Terms entity set and table are often used interchangeably

Characteristics of a Relational Table

Table 3.

STUDENT Table Attribute Values

Student Classification

Keys (continued)

  • Composite key
    • Composed of more than one attribute
  • Key attribute
    • Any attribute that is part of a key
  • Superkey
    • Any key that uniquely identifies each entity
  • Candidate key
    • A superkey without redundancies

Controlled Redundancy

  • Makes the relational database work
  • Tables within the database share common attributes that enable us to link tables together
  • Multiple occurrences of values in a table are not redundant when they are required to make the relationship work
  • Redundancy is unnecessary duplication of data Docsity.com

An Example of a

Simple Relational Database

Keys (continued)

  • Foreign key (FK)
    • An attribute whose values match primary key values in the related table
  • Referential integrity
    • FK contains a value that refers to an existing valid tuple (row) in another relation
  • Secondary key
    • Key used strictly for data retrieval purposes

Relational Database Keys

An Illustration of Integrity

Rules

A Dummy Variable Value

Used as a Flag