You are on page 1of 19

DBMS

DBMS
Files :
Advantages of Database

FOR ANALYSIS. TO FETCH DATA TIME


COMPLEXITY
Entity
Entity:
A Thing in a real world with independent existence  Own identity.

Entity
Existence

Physical Conceptual

House, Course,
Person Job
Attributes
Attributes:
Properties that describe entities.

Types of Attributes.
Types of Attributes:
Composite
Attribute Compose of two attributes

Unique
Attribute Unique key (P.K,F.K)

Multi valued
Attribute
A attribute having multiple value
Types of Attributes:
Single value
Attribute
Attribute having Single value age

Derived Attribute derived from


Attribute
another attribute age
Stored Attribute derived another attribute
Attribute Date of Birth
Types of Attributes:

Complex Mixture of Complex attribute and


Attribute Multivalued attribute

Null Values
Unknown Values ,Missing
Values
Entity Type:
A single student is a single entity but there are lot of students with same attribute are known as
entity type

Entity Type  Student

Attributes  Student name ID AGE SEM.


Azlan Naveed F18604001 22 7
Samrah Riaz F18604002 21 7
Shanzay Azeem F18604003 22 7
Muhammad Talha 23 7
Asgher F18604004
Entity Set:
Collection of entities of a particular entity type at a point in time.
Example: we want students lie in some range (22-23)

Entity Type  Student

Attributes  Student name ID AGE SEM.


Azlan Naveed F18604001 22 7
Shanzay Azeem F18604003 22 7
Muhammad Talha 23 7
Asgher F18604004
Relationship :
Relation among two or more entities.
Example : teacher teaches student.
Degree of Relationship

1. Unary relationship

2. Binary Relationship

3. Ternary Relationship
Relationship Constraint:
1. Cardinality Ratio
Max. number of relationship that an entity can participate in.
Possible cardinality ratios of a binary relationship is:
1:1 , 1:N , N:1 , M:N
Cardinality Ratio :
Cardinality Ratio :
Relationship Constraint:
Participate Constraint

Specifies whether existence of an entity depend on its or being related to another entity.

Types

Total Partial
Participatio Participatio
n n
Participate Constraint :

You might also like