Notices
Notice: Exam Form BE IV/II & BAR V/II (Back) for 2076 Magh
Routine: BE IV/II & BAR V/II - 2076 Magh
Result: BCE I/II exam held on 2076 Bhadra
Result: All (except BCE & BEI) I/II exam held on 2076 Bhadra
Notice: Exam Center for Barrier Exam (2076 Poush), 1st Part
View All
View Old Questions
Computer Engineering(BCT)
Electrical Engineering(BEL)
Electronics and Communication(BEX)
View All
View Syllabus
Computer Engineering(BCT)
Electrical Engineering(BEL)
Electronics and Communication(BEX)
View All

Notes of Database Management System [CT 652]

Data Models

 

Logical, Physical and Conceptual Models

A data model is an abstract model that organizes element of data and depicts how they relate to each other and to the properties of the real world. It explicitly determines the structure of data.


Perspectives of Data Model

Conceptual data model
Conceptual data model describes the semantics of a domain, providing concepts for presenting data in ways that are close to the way people perceive data. It consists of entity classes for a domain and the relationship assertion from showing association between pairs of entity classes

Logical Data model
Logical data model describes the semantics as represented by a particular data manipulation technology. It includes descriptions of tables and columns, object oriented classes, primary and foreign keys.

Physical data model
Physical data model describes the physical means by which data are stored. It includes partitions, CPUs, table spaces and so on


Case Study - Conceptual Data Model

Conceptual Data Model

physical_fdXHTm4


Case Study - Logical Data Model

Logical Data Model

logical_1p9g6EB


Case Study - Physical Data Model

Physical Data Model

conceptual_xsURUJL


ER Model

E-R model is based on the notion of real world entities and relationships among them. It is used generally for conceptual design of database. The E-R model creates entity set, relationship set, general attributes and constraints.

ermodel


Entity and Entity Sets

- An entity is an object in the real world with an independent existence that can be differentiated from other objects. For e.g. car, lecturar, course, etc
-An entity set is a collection of an entity type of a particular point of time.
-An entity type is a collection of similar entities.


Types of Entites

Based on strength, entities are classified as:
1. An entity is weak if its tables are existence dependent. (I.e. it cannot exist without a relationship with another entity) Its primary key is derived from the primary key of the parent entity.
2. An entity is strong if it can exist apart from all of its related entities. It may not have foreign key or the foreign key may contain nulls.


Relationship and Relationship Sets

- Relationships are the link that holds the entities together which connect related information between entities.
-A relationship is weak if the primary key or the related key does not contain primary key as a component of parent entity.
-A relationship is strong if the primary key of the related entity contains primary key component of parent entity.


Example

Customer (CID, CNAME)
Order (OID, CID, DATE)
Weak Relationship

Course (CCODE, DCODE)
Class (CCODE, SECTION, TIME)
Strong relationships


Types of Relationships

1. One to many (1:m)
- Here one entity relates to other entity such that single instance of an entity is related to many instances of another entity, e.g. one department has many employees

2. One to One (1:1)
- Here one entity relates to other entity such that single instance of an entity is related to single instance of another entity, e.g. one student has one student card

3. Many to Many (M:N)
-It can be directly implemented
-It is important by breaking up to produce a set of 1: m relationships.


Attributes and Keys

attr

-Attributes are the fields that describe the entity.
-Each attribute has a name and is associated with an entity.
-Simple attributes are those attributes with a single value.
-Composite attributes are those attributes that consists of a hierarchy of attributes. E.g. Address = {59 + ‘Mark sheet ‘+ ‘KingsFord’ }
-Multivalues attributes are those having a set of values for each entity.
-Desired attributes are those with values calculated from other attributes.
-key is the attribute or group of attributes whose values can be used to uniquely identify an individual entity in an entity set.

Sponsored Ads