Intro to DBMS
Intro to DBMS
Introduction To Database
Management System
Basic Definitions
Inventory Employee
Vendor Invoice Customer
file file
file file file
Database Approach
Order Dept. Accounting Payroll
Dept. Dept.
A B C
Ordering
Invoicing Payroll
filing
System System
System
• Self-describing nature
• Database Administrator
• Database Designer
• End User
• Tool Developers
ü For performance monitoring (SQL Server Profiler)
ü Natural language or graphical interface (SQL Lite
D/b browser)
Requirements
2. Department controls a number of projects, each of
which has
a unique name, a unique number and a single locatio
n.
3. We need to store each employee's name, number, add
ress,
salary, gender,and date of birth. An employee is assign
ed to one
department but may work on several projects, which
are not
necessarily controlled by the same department.
Requirements
4. We want to keep track of the dependents of each
employee for insurance purposes. We keep each
dependent's first name, Gender, date of birth
and relationship to employee
Requirements
5. We keep track of the number of hours per week
that an employee works on each project. We also
keep track of the direct supervisor of each employee
Requirements
Basic Concepts
Entity:
Thing in the real world with an independent
existence.
e.g. A particular person, a car
A Company, a job, a university course
Attributes:
Particular properties that describe an entity
ATOMIC
COMPOSITE ATTRIBUTE
ATTRIBUTE
SINGLE-VALUED
MNAME LNAME ATTRIBUTE
GENDER
FNAME
NAME SALARY
ENO PHONE
EMPLOYEE NO
DOB
STORED
ATTRIBUTE AGE
MULTI-VALUED
ADDRESS ATTRIBUTE
DERIVED
ATTRIBUTE
Composite Vs Atomic/Simple
Attributes
Atomic Attributes : Attributes that are not divisible.
ü Value of composite attribute is concatenation of the
values of constituent atomic attributes
Example Pin Number
Composite Composite
Phone MultiValued
Address
ü Uniqueness constraint
r1
d1
e1
e2 r2 d2
e3 d3
r3
e4 RELATIONSHIPd4
SET
r4
e5 .
. .
r5
. .
. .
RELATIONSHIP
.
INSTANCES .
Relationship Type, Set and Instances
Relationship Constraints
Participation
Cardinality Ratio
Constraints
Structural Constraints
Cardinality Ratio