Lec 5 - DBMS-2024
Lec 5 - DBMS-2024
Database Management
Systems
Lecture 5
Hamza Shaukat
[email protected]
Slide 3- 2
10
11
Simple
▪ Each entity has a single atomic value for the attribute. For
example, SSN or Sex.
Composite
▪ The attribute may be composed of several components. For
example:
– Address(Apt#, House#, Street, City, State, ZipCode, Country),
or
– Name(FirstName, MiddleName, LastName).
– Composition may form a hierarchy where some
components are themselves composite.
Multi-valued
▪ An entity may have multiple values for that attribute. For
example, Color of a CAR or PreviousDegrees of a
STUDENT.
– Denoted as {Color} or {PreviousDegrees}.
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
29
30
31
32
It specifies that each entity in the entity set must compulsorily participate in at
least one relationship instance in that relationship set.
That is why, it is also called as mandatory participation.
Total participation is represented using a double line between the entity set
and relationship set.
33
It specifies that each entity in the entity set may or may not participate in the
relationship instance in that relationship set.
That is why, it is also called as optional participation.
Partial participation is represented using a single line between the entity set
and relationship set.
34
1. one-to-one
2. one-to-many
3. many-to-one
4. many-to-many
35
36
37
38
39
40
41
Slide 3- 43
Slide 3- 44
Slide 3- 45
Slide 3- 46
Slide 3- 47
Slide 3- 48
Slide 3- 49
1 N
Slide 3- 50
1 1
Slide 3- 51
1 N
Positio
n descriptio
PID Pname iid
n
Slide 3- 52
1 1
Slide 3- 53
1 1
1 1 1 N
1 N
Slide 3- 54