Docsity

Introduction to Relational Database Management System (RDBMS) and Relational Data Model, Slides of Introduction to Database Management Systems

Partial preview of the text

Download Introduction to Relational Database Management System (RDBMS) and Relational Data Model and more Slides Introduction to Database Management Systems in PDF only on Docsity!

Database

Management

System

Lecture - 14

Logical Database

Design

Two Major Strengths

Simplicity

Strong Mathematical Foundation

Relational Data Model

Presented by E. F. Codd in 1970, then of IBM

Before Relational Data Model, two older data models were in use; Hierarchical, Network

Basic of RDM

RDM used mainly for external, conceptual, and to some extent physical schema Separation of conceptual and physical levels makes manipulation much easier, contrary to previous data models

Basic of RDM

RDM used for external, conceptual, and to some extent physical schema The basic structure is relation Both entities and relationships are modeled using tables/relations

Basics of RDM

Columns represent attributes and rows represent records

Rows, records and tuples all these terms are used interchangeably

Basic Properties of a Table

  1. Each cell of a table contains atomic/single value
  2. Each column has a distinct name; the name of the attribute it represents

Basic Properties of a Table

  1. The order of the rows is immaterial
  2. Each row/tuple/record is distinct, no two rows can be same

A table

stID stName clName doB sex S001 M. Suhail MCS 12/6/84 M S002 M. Shahid BCS 3/9/86 M S003 Naila S. MCS 7/8/85 F S004 Rubab A. MBA 23/4/86 F S005 Ehsan M. BBA 22/7/88 M

Mathematical Relations Consider two sets  A = {x, y} B = {2, 4, 6}  Cartesian product of these sets  A X B= {(x,2), (x,4), (x,6), (y,2), (y,4), (y,6)}

Mathematical Relations

A relation is some subset of this Cartesian product, For example,  R1= {(x,2), (y,2),(x,6),(x,4)}  R2 = {(x,4), (y,6), (y,4)}

Database Relations

Thinking in some real

world scenario

 Name = {Ali, Sana, Ahmed, Sara}  Age = {15,16,17,18,…….,25}

Database Relations

Cartesian product of Name & Age

Name X Age= {(Ali,15), (Sana,15), (Ahmed,15), (Sara,15), …., (Ahmed,25), (Sara,25)}

CLASS = {(Ali, 18), (Sana, 17), (Ali, 20), (Ahmed, 19)} Docsity.com