DBMS Unit-1
DBMS Unit-1
&
ENGINEERING
UNIT-I
Course Name: Database Management System
Rows
A Sample Relational Database
Data Definition Language (DDL)
• Specification notation for defining the database schema
Example: create table instructor (
ID char(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2))
Database
Database System Internals
Database Architecture
(44553,22222) advisor
Relationship Set advisor
Relationship Sets (Cont.)
• An attribute can also be associated with a relationship set.
• For instance, the advisor relationship set between entity sets instructor
and student may have the attribute date which tracks when the student
started being associated with the advisor
Degree of a Relationship Set
• binary relationship
– involve two entity sets (or degree two).
– most relationship sets in a database system are binary.
• Relationships between more than two entity sets are
rare. Most relationships are binary. (More on this
later.)
Example: students work on research projects under the
guidance of an instructor.
relationship proj_guide is a ternary relationship between
instructor, student, and project
Mapping Cardinality Constraints
• Express the number of entities to which another entity
can be associated via a relationship set.
• Most useful in describing binary relationship sets.
• For a binary relationship set the mapping cardinality
must be one of the following types:
– One to one
– One to many
– Many to one
– Many to many
Mapping Cardinalities
Total participation (indicated by double line): every entity in the entity set participates in at least one relationship in the relationship set