0% found this document useful (0 votes)
11 views12 pages

Lecture 7

Lecture notes

Uploaded by

Shoaib Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views12 pages

Lecture 7

Lecture notes

Uploaded by

Shoaib Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 12

Database systems

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.

Pearson Education © 2009 5


Data Models
• Network model
• The network database model was invented in 1969 as an enhancement of the
already existing database model, the hierarchical database model.

• 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

• A logical representation of the data for an organization or for a


business area
• Expressed in terms of entities, relationships among entities, and the
attributes of entities and relationships

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)

• Relationship: an association representing an interaction among the


instances of one or more entity types that is of interest to the organization
• Given a verb phrase name

• Relationship type: A meaningful association between entity types


• Ex: STUDENT registers COURSE
• FACULTY teaches COURSE
• STUDENT awarded SCHOLARSHIP

• Relationship Instance – An association between entity instances


• Ex: 2005A1PS111 awarded MCN
• 2003A4PS123 awarded Pratibha
• 2004B1A2111 not awarded MCN

12

You might also like