SlideShare a Scribd company logo
1 of 37
Database Concept
Part # 2
OUTLINE
 Database Concepts
 Database Management System
Architecture
 ERD model
 Entity Relationship Notation
 Understand concepts of cardinality ratio
 Understand concepts of Participation
Part # 2
Database Concepts
 Data:
 Known facts that can be recorded.
 Database:
 A collection of related data.
 For Example:
 Names, telephone numbers, and addresses of the people you
know.
 You may have recorded this data in an indexed address book
 or you may have stored it on a hard drive, using a personal
computer and software such as Microsoft Access.
 This collection of related data with an implicit meaning is a
database.
3
Part # 2
Database Concepts
 Data models:
 A group of concepts that describe the database structure that
contain different data types, relationships and constraints.
 Entity:
 Describing a real world object.
 Example: employee, student, and courses.
 It corresponds to a table that contains a collection of attributes.
 The entity can be a person, place, event or an object that help
the organization to maintain its data.
4
Part # 2
Database Concepts
 Attribute:
 It can be described as a property to the entity.
 For example, if we have an entity is called an employee, this
entity can have attributes such as name, age and salary.
 An attribute corresponds to a column or field in a table.
 The number of attributes is called the degree.
 Tuple:
 corresponds to a row in a table.
5
Part # 2
Database Concepts
 Relationship:
 It describes how entities related to each other.
 Primary key:
 An attribute which is a unique identifier in a table.
 The primary key can be consisting of one attribute or combination of
attributes which called a composite key.
 The value of the primary key cannot be repeated in the same column.
 Foreign Key:
 Is an attribute or set of attributes in a table that matches the primary key of
another table.
 Used to represent relationship between tuples of two relations.
 Composite Key:
 a primary key that consists of more than one attribute
6
Part # 2
Example
4170010
4182000
4182034
4188134
4189860
4192134
StudentNo
Al-Saleh
Al-Ghanem
Al-Fahad
Saod
Rashed
Al-Fahad
LName
Amal
Nora
Laila
Amal
Rana
Rania
FName Initial
M.
A.
A.
F.
I.
M.
DOB
04-06-78
02-12-79
01-11-74
22-04-73
30-01-78
19-03-79
GPA
3.91
4.20
4.01
3.01
2.31
3.50
STUDENT
Attributes
Tuples
Degree
Relation Name
Part # 2
Example
Relation Name ?……………………...........
Number of Tuples?…………………………
Example of Attribute: ………………………
Degree of relation?…………………………
Primary Key?.............................................
Part # 2
Data Types
Part # 2
Data Types
Part # 2
Properties of Entities
• The Entity has a name that is distinct from all other
Entity names in the relational database.
• Each attribute has a distinct name.
• The values of an attribute are all of the same
domain.
• Each tuple is distinct. There are no duplicate tuples.
• The order of attributes has no significance.
• The order of tuples has no significance.
Part # 2
Database Concepts
12
Database Management System (DBMS): software that is
used to create, maintain and update databases. It has an
interface which can be menu based or graphic based or form
based or can be a collection of all these forms.
Database administrators (DBA):
Responsible for the whole database including construction,
implementation, access privileges and authorization.
Part # 2
Database Management System
Architecture
The DBMS has three main
levels they are:
1- Internal level: that describes
the physical data model,
2- Conceptual level: Describes
structure of the whole database
for a community of users.
3- External level: Describes part
of the database that a particular
user group is interested in.
and hide other parts.
13
Figure 2.1 shows the three main levels
of the database Architecture
USER
VIEW
EXTENAL
LEVEL
CONCEPTUAL
LEVEL
INTERNA
LEVEL
Part # 2
Data Independence
 Capacity to change the schema at one level of a
database system Without having to change the
schema at the next higher level
 Types of data independence :
 Logical
 Physical
Part # 2
Types of data independence
 Logical
 is the capacity to change
the conceptual schema
without having to change
external schemas or
application programs.
 Physical
 is the capacity to change
the internal schema
without having to change
the conceptual schema.
Part # 2
What is ERD model?
 ERD stands for the Entity Relationship Diagram that describes
the representation of data including entities, attributes and
relationships within an organization. It is considered one of the
critical phases in the designing of databases.
Figure 2.2 shows a simple example for an ERD for a school
16
Part # 2
Entity Relationship Notation
 There are common notations used all over the world for
the database.
 There are many tools help designers to draw the ERD
with its different notations such as Microsoft Visio or
the Oracle Designers.
 Most of these tools eliminate the diamond relationship
and show the attributes inside the entity rectangle
related to these attributes.
17
Part # 2
18
 The major activity of this phase is identifying:
 Relationships
 Entities
 Attributes
Entity Relationship Notation
Part # 2
Notations for ER Diagram
Part # 2
Notations for ER Diagram
 In the ER Model, the notations 1-1, 1-M, M-M used to represent the
Cardinality ratio.
 the participation is representing as double line for the total
participation and one line for the partial participation as shown in
Figure 2.5.
20
Figure 2.5 shows database notation used in this course
Part # 2
 Strong entity: can be defined as the entity that can stand alone
without the needs for other entities such as the student entity, the
department entity and the Instructor entity and is represented by a
single rectangle.
21
Figure 2.6 shows an ERD with strong entities
Part # 2
 Weak entity: is the opposite of the strong entity which can be
defined as the entity that depends on another entity .it can be
represented in the ERD as a doubled line rectangle. The relation
between the weak entity and the owner entity is called the identifying
relationship and is represented in the ERD as doubled line diamond
22
Figure2.7 shows an ERD with a weak entity
Notations for ER Diagram
Part # 2
 Multi-valued attribute: This can be defined as the attribute that can
have more than one value such as spoken languages "Arabic and
English" can be represented in the ERD as an ellipse with double lines.
23
Figure 2.9 shows a multi-valued attribute
Notations for ER Diagram
Part # 2
 Derived attribute: an attribute that can be calculated from another
attribute, such as the age attribute which can be calculated from the
date of birth attribute
24
Figure 2.10 shows a derived attribute
Notations for ER Diagram
Part # 2
ERD Example
25
Part # 2
Activity 1
 Identify entities and attributes?
 Cars
 Phone Number
 Salary
 Products
 Date
 Height
 Employees
26
Part # 2
Activity 2
 Assume that you are designing a database
for school, what are the possible Entities,
Attributes and Keyes for the database?
27
Part # 2
What is the cardinality ratio
28
 It can be defined as the number of instances of an
entity that can be associated, participated or in a
relationship with another entity.
 It can be divided into Three main types :
o One to One (1:1)
o One to Many (1: M)
o Many to Many (M: M )
Part # 2
29
 A department must have only one employee, while the
employee must work in only one department .
Figure 2.14 shows I-I relationship
Example #1
Part # 2
 A department may have numbers of employee and each
employee must work only in one department
Figure 2.13 shows I-M relationship
30
Example #2
Part # 2
31
Example #3
 A department may have many employees, while the
employee may work in more than department.
Figure 2.15 shows M-M relationship with partial participation
Part # 2
32
What is the Participation
 Participation in database is used to describe how
the degree of participation that the entity will have
in the relationship.
 There are two main types of participation:
o Total participation : represented by two lines
o Partial participation : represented by only single
line.
Part # 2
 1- A department must employ an employee and the
employee must be employed by a department.
Figure 2.17 shows total participation from both sides
33
Participation Examples
Part # 2
 2- A department must employ an employee, while the
employee need not to be employed by a department
Figure 2.18 shows total participation from one side and partial participation from another side
34
Participation Examples
Part # 2
 3-A department may not need to employee any employee
and the employee needs not to be employed by a
department
Figure 2.19 shows partial participation from both sides
35
Participation Examples
Part # 2
Activity 3
36
What are the cardinality and participation types that are
suitable for this relation?
Part # 2
37

More Related Content

Similar to DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx

Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship modelJafar Nesargi
 
DBMS_unit2_Notes.pdf
DBMS_unit2_Notes.pdfDBMS_unit2_Notes.pdf
DBMS_unit2_Notes.pdfssuserf71896
 
Download different material from slide share
Download different material from slide shareDownload different material from slide share
Download different material from slide sharefanta teferi
 
E-R model unit(Iv)
E-R model unit(Iv)E-R model unit(Iv)
E-R model unit(Iv)PadmapriyaA6
 
ER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMSER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMSRubal Sagwal
 
Module 2 dbms.pptx
Module 2 dbms.pptxModule 2 dbms.pptx
Module 2 dbms.pptxVijishK
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxsantosh96234
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...Mustafa Kamel Mohammadi
 
Impact of Normalization in Future
Impact of Normalization in FutureImpact of Normalization in Future
Impact of Normalization in Futureijtsrd
 
Database Design and the ER Model, Indexing and Hashing
Database Design and the ER Model, Indexing and HashingDatabase Design and the ER Model, Indexing and Hashing
Database Design and the ER Model, Indexing and HashingPrabu U
 
Database Management System
Database Management System Database Management System
Database Management System FellowBuddy.com
 
ECEG 4702-Class7-Entity-Relationship modeling.pptx
ECEG 4702-Class7-Entity-Relationship modeling.pptxECEG 4702-Class7-Entity-Relationship modeling.pptx
ECEG 4702-Class7-Entity-Relationship modeling.pptxmiftah88
 
DATA BASE MANAGEMENT SYSTEM - SHORT NOTES
DATA BASE MANAGEMENT SYSTEM - SHORT NOTESDATA BASE MANAGEMENT SYSTEM - SHORT NOTES
DATA BASE MANAGEMENT SYSTEM - SHORT NOTESsuthi
 

Similar to DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx (20)

database1
database1database1
database1
 
Datamodels.pptx
Datamodels.pptxDatamodels.pptx
Datamodels.pptx
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship model
 
DBMS_unit2_Notes.pdf
DBMS_unit2_Notes.pdfDBMS_unit2_Notes.pdf
DBMS_unit2_Notes.pdf
 
Download different material from slide share
Download different material from slide shareDownload different material from slide share
Download different material from slide share
 
E-R model unit(Iv)
E-R model unit(Iv)E-R model unit(Iv)
E-R model unit(Iv)
 
ER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMSER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMS
 
ER model
ER modelER model
ER model
 
DBMS Part-2.pptx
DBMS Part-2.pptxDBMS Part-2.pptx
DBMS Part-2.pptx
 
Module 2 dbms.pptx
Module 2 dbms.pptxModule 2 dbms.pptx
Module 2 dbms.pptx
 
Db lec 02_new
Db lec 02_newDb lec 02_new
Db lec 02_new
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptx
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
 
Impact of Normalization in Future
Impact of Normalization in FutureImpact of Normalization in Future
Impact of Normalization in Future
 
Database Design and the ER Model, Indexing and Hashing
Database Design and the ER Model, Indexing and HashingDatabase Design and the ER Model, Indexing and Hashing
Database Design and the ER Model, Indexing and Hashing
 
Unit-2.pdf
Unit-2.pdfUnit-2.pdf
Unit-2.pdf
 
L7 er2
L7 er2L7 er2
L7 er2
 
Database Management System
Database Management System Database Management System
Database Management System
 
ECEG 4702-Class7-Entity-Relationship modeling.pptx
ECEG 4702-Class7-Entity-Relationship modeling.pptxECEG 4702-Class7-Entity-Relationship modeling.pptx
ECEG 4702-Class7-Entity-Relationship modeling.pptx
 
DATA BASE MANAGEMENT SYSTEM - SHORT NOTES
DATA BASE MANAGEMENT SYSTEM - SHORT NOTESDATA BASE MANAGEMENT SYSTEM - SHORT NOTES
DATA BASE MANAGEMENT SYSTEM - SHORT NOTES
 

More from ZahouAmel1

2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...ZahouAmel1
 
1-Lect_1.pptxLecture 5 array in PHP.pptx
1-Lect_1.pptxLecture 5 array in PHP.pptx1-Lect_1.pptxLecture 5 array in PHP.pptx
1-Lect_1.pptxLecture 5 array in PHP.pptxZahouAmel1
 
Lecture 8 PHP and MYSQL part 2.ppType Classificationtx
Lecture 8 PHP and MYSQL part 2.ppType ClassificationtxLecture 8 PHP and MYSQL part 2.ppType Classificationtx
Lecture 8 PHP and MYSQL part 2.ppType ClassificationtxZahouAmel1
 
Lecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType ClassificationLecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType ClassificationZahouAmel1
 
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvZahouAmel1
 
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvZahouAmel1
 
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvZahouAmel1
 
Lec 1 Introduction to Computer and Information Technology #1.pptx
Lec 1 Introduction to Computer and Information Technology #1.pptxLec 1 Introduction to Computer and Information Technology #1.pptx
Lec 1 Introduction to Computer and Information Technology #1.pptxZahouAmel1
 
DB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpyDB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpyZahouAmel1
 
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxZahouAmel1
 
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptxZahouAmel1
 
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols
5-LEC- 5.pptxTransport Layer. Transport Layer ProtocolsZahouAmel1
 
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...ZahouAmel1
 
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...ZahouAmel1
 
7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork Layer7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork LayerZahouAmel1
 
8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptxZahouAmel1
 
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptxZahouAmel1
 
9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink LayerZahouAmel1
 

More from ZahouAmel1 (18)

2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
2- lec_2.pptxDesigning with Type, SpacingDesigning with Type, SpacingDesignin...
 
1-Lect_1.pptxLecture 5 array in PHP.pptx
1-Lect_1.pptxLecture 5 array in PHP.pptx1-Lect_1.pptxLecture 5 array in PHP.pptx
1-Lect_1.pptxLecture 5 array in PHP.pptx
 
Lecture 8 PHP and MYSQL part 2.ppType Classificationtx
Lecture 8 PHP and MYSQL part 2.ppType ClassificationtxLecture 8 PHP and MYSQL part 2.ppType Classificationtx
Lecture 8 PHP and MYSQL part 2.ppType Classificationtx
 
Lecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType ClassificationLecture 9 CSS part 1.pptxType Classification
Lecture 9 CSS part 1.pptxType Classification
 
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
 
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
 
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
 
Lec 1 Introduction to Computer and Information Technology #1.pptx
Lec 1 Introduction to Computer and Information Technology #1.pptxLec 1 Introduction to Computer and Information Technology #1.pptx
Lec 1 Introduction to Computer and Information Technology #1.pptx
 
DB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpyDB- lec2.pptxUpdatedpython.pptxUpdatedpy
DB- lec2.pptxUpdatedpython.pptxUpdatedpy
 
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
Updatedpython.pptxUpdatedpython.pptxUpdatedpython.pptx
 
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
 
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols5-LEC- 5.pptxTransport Layer.  Transport Layer Protocols
5-LEC- 5.pptxTransport Layer. Transport Layer Protocols
 
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
 
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
7-Lect_7 .pptxNetwork Layer. Addressing Subnetting Mask (default and subnet) ...
 
7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork Layer7-Lect_7 .pptxNetwork LayerNetwork Layer
7-Lect_7 .pptxNetwork LayerNetwork Layer
 
8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx
 
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
9-Lect_9-1.pptx9-Lect_9-1.pptx9-Lect_9-1.pptx
 
9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer
 

Recently uploaded

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

DB-Lec1.pptxUpdatedpython.pptxUpdatedpython.pptx

  • 2. Part # 2 OUTLINE  Database Concepts  Database Management System Architecture  ERD model  Entity Relationship Notation  Understand concepts of cardinality ratio  Understand concepts of Participation
  • 3. Part # 2 Database Concepts  Data:  Known facts that can be recorded.  Database:  A collection of related data.  For Example:  Names, telephone numbers, and addresses of the people you know.  You may have recorded this data in an indexed address book  or you may have stored it on a hard drive, using a personal computer and software such as Microsoft Access.  This collection of related data with an implicit meaning is a database. 3
  • 4. Part # 2 Database Concepts  Data models:  A group of concepts that describe the database structure that contain different data types, relationships and constraints.  Entity:  Describing a real world object.  Example: employee, student, and courses.  It corresponds to a table that contains a collection of attributes.  The entity can be a person, place, event or an object that help the organization to maintain its data. 4
  • 5. Part # 2 Database Concepts  Attribute:  It can be described as a property to the entity.  For example, if we have an entity is called an employee, this entity can have attributes such as name, age and salary.  An attribute corresponds to a column or field in a table.  The number of attributes is called the degree.  Tuple:  corresponds to a row in a table. 5
  • 6. Part # 2 Database Concepts  Relationship:  It describes how entities related to each other.  Primary key:  An attribute which is a unique identifier in a table.  The primary key can be consisting of one attribute or combination of attributes which called a composite key.  The value of the primary key cannot be repeated in the same column.  Foreign Key:  Is an attribute or set of attributes in a table that matches the primary key of another table.  Used to represent relationship between tuples of two relations.  Composite Key:  a primary key that consists of more than one attribute 6
  • 7. Part # 2 Example 4170010 4182000 4182034 4188134 4189860 4192134 StudentNo Al-Saleh Al-Ghanem Al-Fahad Saod Rashed Al-Fahad LName Amal Nora Laila Amal Rana Rania FName Initial M. A. A. F. I. M. DOB 04-06-78 02-12-79 01-11-74 22-04-73 30-01-78 19-03-79 GPA 3.91 4.20 4.01 3.01 2.31 3.50 STUDENT Attributes Tuples Degree Relation Name
  • 8. Part # 2 Example Relation Name ?……………………........... Number of Tuples?………………………… Example of Attribute: ……………………… Degree of relation?………………………… Primary Key?.............................................
  • 10. Part # 2 Data Types
  • 11. Part # 2 Properties of Entities • The Entity has a name that is distinct from all other Entity names in the relational database. • Each attribute has a distinct name. • The values of an attribute are all of the same domain. • Each tuple is distinct. There are no duplicate tuples. • The order of attributes has no significance. • The order of tuples has no significance.
  • 12. Part # 2 Database Concepts 12 Database Management System (DBMS): software that is used to create, maintain and update databases. It has an interface which can be menu based or graphic based or form based or can be a collection of all these forms. Database administrators (DBA): Responsible for the whole database including construction, implementation, access privileges and authorization.
  • 13. Part # 2 Database Management System Architecture The DBMS has three main levels they are: 1- Internal level: that describes the physical data model, 2- Conceptual level: Describes structure of the whole database for a community of users. 3- External level: Describes part of the database that a particular user group is interested in. and hide other parts. 13 Figure 2.1 shows the three main levels of the database Architecture USER VIEW EXTENAL LEVEL CONCEPTUAL LEVEL INTERNA LEVEL
  • 14. Part # 2 Data Independence  Capacity to change the schema at one level of a database system Without having to change the schema at the next higher level  Types of data independence :  Logical  Physical
  • 15. Part # 2 Types of data independence  Logical  is the capacity to change the conceptual schema without having to change external schemas or application programs.  Physical  is the capacity to change the internal schema without having to change the conceptual schema.
  • 16. Part # 2 What is ERD model?  ERD stands for the Entity Relationship Diagram that describes the representation of data including entities, attributes and relationships within an organization. It is considered one of the critical phases in the designing of databases. Figure 2.2 shows a simple example for an ERD for a school 16
  • 17. Part # 2 Entity Relationship Notation  There are common notations used all over the world for the database.  There are many tools help designers to draw the ERD with its different notations such as Microsoft Visio or the Oracle Designers.  Most of these tools eliminate the diamond relationship and show the attributes inside the entity rectangle related to these attributes. 17
  • 18. Part # 2 18  The major activity of this phase is identifying:  Relationships  Entities  Attributes Entity Relationship Notation
  • 19. Part # 2 Notations for ER Diagram
  • 20. Part # 2 Notations for ER Diagram  In the ER Model, the notations 1-1, 1-M, M-M used to represent the Cardinality ratio.  the participation is representing as double line for the total participation and one line for the partial participation as shown in Figure 2.5. 20 Figure 2.5 shows database notation used in this course
  • 21. Part # 2  Strong entity: can be defined as the entity that can stand alone without the needs for other entities such as the student entity, the department entity and the Instructor entity and is represented by a single rectangle. 21 Figure 2.6 shows an ERD with strong entities
  • 22. Part # 2  Weak entity: is the opposite of the strong entity which can be defined as the entity that depends on another entity .it can be represented in the ERD as a doubled line rectangle. The relation between the weak entity and the owner entity is called the identifying relationship and is represented in the ERD as doubled line diamond 22 Figure2.7 shows an ERD with a weak entity Notations for ER Diagram
  • 23. Part # 2  Multi-valued attribute: This can be defined as the attribute that can have more than one value such as spoken languages "Arabic and English" can be represented in the ERD as an ellipse with double lines. 23 Figure 2.9 shows a multi-valued attribute Notations for ER Diagram
  • 24. Part # 2  Derived attribute: an attribute that can be calculated from another attribute, such as the age attribute which can be calculated from the date of birth attribute 24 Figure 2.10 shows a derived attribute Notations for ER Diagram
  • 25. Part # 2 ERD Example 25
  • 26. Part # 2 Activity 1  Identify entities and attributes?  Cars  Phone Number  Salary  Products  Date  Height  Employees 26
  • 27. Part # 2 Activity 2  Assume that you are designing a database for school, what are the possible Entities, Attributes and Keyes for the database? 27
  • 28. Part # 2 What is the cardinality ratio 28  It can be defined as the number of instances of an entity that can be associated, participated or in a relationship with another entity.  It can be divided into Three main types : o One to One (1:1) o One to Many (1: M) o Many to Many (M: M )
  • 29. Part # 2 29  A department must have only one employee, while the employee must work in only one department . Figure 2.14 shows I-I relationship Example #1
  • 30. Part # 2  A department may have numbers of employee and each employee must work only in one department Figure 2.13 shows I-M relationship 30 Example #2
  • 31. Part # 2 31 Example #3  A department may have many employees, while the employee may work in more than department. Figure 2.15 shows M-M relationship with partial participation
  • 32. Part # 2 32 What is the Participation  Participation in database is used to describe how the degree of participation that the entity will have in the relationship.  There are two main types of participation: o Total participation : represented by two lines o Partial participation : represented by only single line.
  • 33. Part # 2  1- A department must employ an employee and the employee must be employed by a department. Figure 2.17 shows total participation from both sides 33 Participation Examples
  • 34. Part # 2  2- A department must employ an employee, while the employee need not to be employed by a department Figure 2.18 shows total participation from one side and partial participation from another side 34 Participation Examples
  • 35. Part # 2  3-A department may not need to employee any employee and the employee needs not to be employed by a department Figure 2.19 shows partial participation from both sides 35 Participation Examples
  • 36. Part # 2 Activity 3 36 What are the cardinality and participation types that are suitable for this relation?