Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

DB and Math Relations - Database Management - Lecture Slides, Slides of Introduction to Database Management Systems

DB and Math Relations, Properties of DB, Order of columns, Mathematical relation, Degree and Cardinality, Relations Keys, Integrity Constraints are the main points of this lecture.

Typology: Slides

2011/2012

Uploaded on 11/03/2012

dharmaraaj
dharmaraaj 🇮🇳

4.4

(65)

153 documents

1 / 23

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Database
Management
System
Lecture - 15
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17

Partial preview of the text

Download DB and Math Relations - Database Management - Lecture Slides and more Slides Introduction to Database Management Systems in PDF only on Docsity!

Database

Management

System

Lecture - 15

DB and Math Relations

Properties of DB relations are similar to those of Mathematical relations, except

The order of columns in Mathematical relation does matter

Relations Keys

The concept of key and all different types of keys are applicable to the Relations

Foreign Key: An attribute of a table B that is primary key in another table A

Foreign Key

Consider table EMP and DEPT

EMP (empId, empName, qual, depId)

DEPT (depId, depName, numEmp)

Foreign Key Example

Significance of Constraints

Constraints help to maintain the correctness, validity or integrity of the database Like null constrains, default value, domain constraint

Designing Logical DB

Logical DB design is obtained from conceptual DB design

Generally involves transforming E-R data model to relational data model

We have studied both DMs, now how to perform transformation

Transforming Rules

Straightforward rules exist

Can be performed manually as well as automatically

Evaluate even if you use some tool, since multiple options exist

Mapping Regular ET

Composite Attributes

Since tables can contain only

atomic values composite attributes need to be represented as a separate relation

Quality becomes a limitation

Multi-valued Attributes

An ET with a multi-valued

attribute is transformed into two relations

One contains the entity type and

second the muli-valued attribute

Multi-valued Attribute

The PK of the second relation is the PK of first relation and the attribute value itself

Values are accessed through reference of the PK, that also serves as FK

Mapping Weak ETs

Identifier dependency: relation

for weak entity type is created and the PK of the strong ET is used as a whole or part of the relation against weak ET

Identifier Dependency

Example