Lecture 1
Lecture 1
Systems
SPRING 2025
Slide
1-2
Introduction
Course Books
Text Book:
Ramez Elmasri, Fundamentals of Database Systems (7th /8th Edition)
Link for Database books:
https://onlinepgc-my.sharepoint.com/:f:/g/personal/sadaf_baloch_ucp_edu_pk/EurZuqbVjzRLsZ2gVhpslfcBLN4Dbk
-X6R6GJtWBkShHkQ?e=6nIHdh
Marks Division:
Assignments (15%)
Quizzes (15%)
CP (10%)
Mid Term (20%)
Final Term (40%)
Slide
1-4
Make sure you check your email and announcement on portal regularly.
I keep on posting announcements for the deadlines.
No retakes
INTRODUCTION TO
DATABASES
Lecture 1
6
Database
Database
The collection of data
Properties of Databases
Some examples
Examples:
Banking:
For customer information, accounts, loans and banking transactions etc.
Airlines:
For reservations and schedule information.
Universities:
For student information, course registration and grades.
An example of a large commercial database is Amazon.com
Slide
1-9
DBMS
Database Management
System
Collection of interrelated
data and a set of programs
to access those data.
Goal of DBMS
To provide a way to store
and retrieve database
information that is both
convenient and efficient.
Slide 1-10
environment
12
Some points to ponder
Issues in filling
system.
14
Activity Time
Duplicates of data
Same piece of information present at multiple locations
17
2. Inconsistency
Design phases
of databases
23
How is a house constructed?
2. Conceptual Design
- These requirements are documented in detail to form a conceptual design
- Conceptual design can be represented and manipulated using some
computerized tool so that it can easily be maintained, modified and transformed to database
implementation.
Example: Entity Relationship Model
Slide 1-25
3. Logical Design
Conceptual design is transformed into logical design
Logical design can be expressed in a data model
Example: Relational Data Model
4. Physical Design
In this stage further specifications are provided for storing and
accessing the database.
Database design is implemented , populated with actual data
and continuously maintained to reflect the actual state of
miniworld.
Slide
2-26
Physical Model
Strong Entity vs Weak Entity
Representation
Section
Attributes representation in ERD
(Oval)
Properties of an entity
id
Student
name
Types of an attribute
Types of attributes
Key attribute
Composite attribute
Derived attribute
Simple attribute
Multivalued attribute
Attributes
Month
date
DOB
yea
Age r
CGPA
Hobby
Roll No Student
Types of keys
Relationship representation in ERD
(Diamond)
Is
Please note: Readability is Left to Right & Top to bottom taught
by
Teacher
Wrong structure
Teacher
Is
taught
by
Cardinality Participation
One to many (1:N) Total Participation
One to one (1:1) Partial participation
Many to many (M:N)
Relationship: cardinality
Faculty Courses
Teaches
1:M
1
M
Faculty Works Department
for
M:N
N M
Faculty Courses
Teaches
1:1
1 1
Faculty Is head Department
of
Relationship: Particitaion
Total or partial
works Department
Faculty
M:N
M N
Faculty Teaches Courses
1:1
1
1 Is head
Faculty Department
of
Attributes of relationship
Students Course
Enrolls
Grade
Recursive Relationship: Rolenames
supervisee
Employee
Supervisor
1 is M
supervis
or of
Identifying relationship
The company is organized into departments. Each department has a unique name, a
unique number, and a particular employee who manages the department. We keep
track of the start date when that employee began managing the department. A
department may have several locations.
A department controls a number of projects, each of which has a unique name, a
unique number, and a single location.
We store each employee’s name, Social Security number,2 address, salary, gender ,
and birth date. An employee is assigned to one department, but may work on several
projects, which are not necessarily controlled by the same department. We keep track
of the current number of hours per week that an employee works on each project. We
also keep track of the direct supervisor of each employee (who is another employee).
We want to keep track of the dependents of each employee for insurance purposes.
We keep each dependent’s first name, gender, birth date, and relationship to the
employee.
Mention cardinality & participation
Identify Weak entities
Identify relationship attributes
The company is organized into departments. Each department has a unique name, a
unique number, and a particular employee who manages the department. We keep track
of the start date when that employee began managing the department. A department may
have several locations.
A department controls a number of projects, each of which has a unique name, a unique
number, and a single location.
We store each employee’s name, Social Security number,2 address, salary, gender , and
birth date. An employee is assigned to one department, but may work on several projects,
which are not necessarily controlled by the same department. We keep track of the current
number of hours per week that an employee works on each project. We also keep track of
the direct supervisor of each employee (who is another employee).
We want to keep track of the dependents of each employee for insurance purposes. We
keep each dependent’s first name, gender, birth date, and relationship to the employee.
48
Database Users
Database Users
Categories of End-users
Categories of End-users
Categories of End-users
Tool developers
Design and implement tools—the software packages that facilitate database
modeling and design, database system design, and improved performance.
Main
inhibitors (costs) of using a
DBMS:
– High initial investment and possible need
for additional hardware.
Whena DBMS may be
unnecessary:
– If the database and applications are
simple, well defined, and not expected to
change.
– If access to data by multiple users is not
required.