3. ◼Data is a collection of facts, such as numbers, words,
measurements, observations or even just descriptions of
things.
◼A picture, image, file, pdf can also be considered data.
What kind of information/data does
Facebook collect from Users?
DATA
3
4. ◼A collection of information organized in a way that allows the
quick selection, sorting, managing, and reorganization of
data.
How can data be stored/organized
on your smartphone?
DATABASE
4
5. DATABASE MANAGEMENT SYSTEM
◼A database management system (DBMS)
is system software for creating and
managing databases.
◼A DBMS makes it possible for end users to create, read, update, manage and
delete data in a database.
http://db-engines.com/en/ranking 5
6. ◼Database design is the process of producing a detailed DataBase Model
◼A database model defines how the logical structure of a database is modeled
◼The most popular example of a database model
is the Relational model.
◼The three level of data modeling are:
Conceptual data model identifies the highest-level relationships between different entities (ER-
Diagram)
Logical data model describes the data in as much detail as possible(Find the relationships
between different entities/ key, Normalization)
Physical data model represents how the model will be built in the database how data should be
structured and related in a specific DBMS
DATABASE DESIGN & MODEL
6
7. ◼ER-Diagram is a visual representation of data that describes how data is related to
each other
◼ERDs can be used to understand the business domain, clarify business requirements,
and connect business concepts to database structures
◼An ERD consist of four components :
Entity
Relationship
Cardinality
Attribute
https://www.youtube.com/watch?v=c0_9Y8QAstg
Where can ERD be placed in
SDLC?
Entity Relationship Diagram(ERD)
7
8. Entity
◼An entity is any singular, identifiable and separate object
◼An entity is any object in the system that we want to model
and store information about. such as person, places,
employee, student, lecturer, or events
◼ Entities are represented by rectangles
◼ Identify entities for a college system (KEA)
LECTURERSTUDENT DEPARTMENT COURSE SUBJECT
8
9. Exercises
Exercise 1
Identify entities for a hospital system
Exercise 2
Identify entities for a library management system
Exercise 3
Identify entities for Facebook
9
10. ◼A relationship shows how two entities share information in the database.
◼A relationship is represented by diamond shape
◼In some cases, entities can be self-linked.
For example, A lecturer
can supervise other
lecturer.
◼ Example: Relationships & Entities for KEA
Relationship
Course
LECTURER
Department
Student
Subject
Manager
10
11. Exercises
Exercise 4
Identify relationships between entities for the hospital system (from
exercise 1)
Exercise 5
Identify relationships between entities for the library management
system (from exercise 2)
Exercise 6
Identify relationships between entities for Facebook(from exercise
3) 11
12. ◼Cardinality is the number of instances of one entity that can be associated with each instance of
another entity
◼Cardinality must be one of the following types:
One to One
One Department run by one manager or one manager manages only one department
One to Many/ Many to One
Many lecturers Work in one Department or One Department has many lecturers
Many to Many
Many Lecturers Teach many Students or Many students
are taught by many lecturers
Identify cardinality for a college system (KEA)
Department
Student
Manager
DepartmentLecturer
Lecturer
11
1M
M M
Cardinality
12
13. Cardinality for a college system
Course
LECTURER
Department
Student
Subject Manager
M
1
M
M
1
1
M M1
M
1
M
13
14. Exercises
Exercise 7
Identify cardinalities between entities for the hospital system
Exercise 8
Identify cardinalities between entities for the library management
system
Exercise 9
Identify cardinalities between entities for Facebook
14
15. Attribute
◼Attributes are the properties of entities
◼Attributes are represented by ellipses
◼ Every ellipse represents one attribute and is directly connected to its entity (rectangle)
STUDENT
COURSE
Student_ID
Name
City
DOB
Street
Zip_Code
Course_ID
Name
Credits
Room
Gender
Age
Identify cardinality for a college system (KEA)
15
17. Exercises
Exercise 10
Identify attributes of the entities for the hospital system
Exercise 11
Identify attributes of the entities for the library management system
Exercise 12
Identify attributes of the entities for Facebook
17