Lecture 7
Lecture 7
Lecture 7
Previous Lecture Content
Schemas, Mappings, and Instances
DBMS architectures
1-Tier, 2-Tier, 3-Tier
Data Models
Lecture Content
Data Models (cont..)
Functions of DBMS
The Entity Relationship Model
Data Models
• Network model
• A network database model is a database model that allows multiple records to
be linked to the same owner file.
• The model can be seen as an upside down tree where the branches are the
member information linked to the owner, which is the bottom of the tree.
• The multiple linkages which this information allows the network database
model to be very flexible.
• In addition, the relationship that the information has in the network database
model is defined as many-to-many relationship because one owner file can be
linked to many member files and vice versa.
Database Languages
• Data Definition Language (DDL)
• Allows the DBA or user to describe and name entities,
attributes, and relationships required for the application
together with any associated integrity and security constraints.
• DDL is a descriptive language for defining and constructing the
database.
• Allows users to specify the data types and structures and the
constraints on the data to be stored in the DB.
• DDL compiler generates the meta-data (describes objects in
database and make it easier for manipulation) that is stored in the
data dictionary.
• Because the hierarchical database model was highly flaw, Bachman decided to
create a database that is similar to the hierarchical database but with more
flexibility and less faults.
• Relational Model
(will be covered in new chapter)
Functions of a DBMS
• Data Storage, Retrieval, and Update: the ability to store, retrieve and
update data in the database.
• A User-Accessible Catalog: catalog, which describes the data items,
should be accessible to users.
• Transaction Support: ensure that either all the updates corresponding to
a given transaction are made or none of them is made.
• Concurrency Control Services: database updated correctly when
multiple users are updating the database concurrently.
• Recovery Services: recovering for the database in the event that it is
damaged
Functions of a DBMS
• Authorization Services: only authorized users can access the database.
• Integrity Services: ensure that both data in the database and changes are
following certain rules.
• Support for data communication: capable of integrating with
communication software.
• Services to Promote Data Independence: support independence of
programs from actual structure of the database.
• Utility Services.
• Import and export facilities
• monitoring facilities ,.. etc.
THE E-R MODEL
9
Sample E-R Diagram
Entity
Relationship
Cardinality
10
E-R Model Constructs
• Entity: A person, place, object, event, concept in the user
environment about which the organization wishes to maintain data
• Given a noun name
• Person: EMPLOYEE, STUDENT, FACULTY
• Place: STORE, CLASS ROOM, HOSTEL
• Object: COMPUTER, PROJECTOR, PEN
• Event: REGISTRATION, RENEWAL, SALE, GRADUATION
• Concept: MESS ACCOUNT, EXTRAS, PROJECT
• Entity Type – collection of entities that share common properties or
characteristics
• Name is singular
• Described only once in database
• Ex: STUDENT(ID-No,NAME)
• Entity instance – A single occurrence of an entity type
• Each entity type will have many instances
• Ex: (200A1PS111,RAVI), (2003B1A1112,KIRAN)
11
E-R Model Constructs
• Attribute - property or characteristic of an entity type that is of interest to
the organization
• Ex: STUDENT (Idno, Name, Hostel, Roo_No, Cgpa)
12