4. TOPICS
3/14/2023 UNIT I Database systems & ER Model 4
⚫The Evolution of DB systems and DBMS
⚫Overviewof a DBMS
⚫View of data
⚫Data Models
⚫DB System Architecture
⚫Data Models
⚫Entity Relationship model
⚫ER Model
⚫Objects-Attributes and its type
⚫Entityand Relationship
⚫Design issuesof ER model
⚫Constraints
5. History of Database Systems
3/14/2023 UNIT I Database systems & ER Model 5
⚫ 1950s and early 1960s:
⚫ Data processing using magnetic tapes forstorage
⚫ Tapes provided only sequential access
⚫ Punched cards for input
⚫ Late 1960s and 1970s:
⚫ Hard disks allowed directaccess todata
⚫ Networkand hierarchical data models in widespread use
⚫ Ted Codd defines the relational data model
⚫ Would win theACM Turing Award forthiswork
⚫ IBM Research begins System R prototype
⚫ UC Berkeley begins Ingresprototype
⚫ High-performance (fortheera) transactionprocessing
6. History (cont.)
3/14/2023 UNIT I Database systems & ER Model 6
⚫ 1980s:
⚫ Research relational prototypes evolve intocommercial systems
⚫ SQL becomes industrial standard
⚫ Parallel and distributed databasesystems
⚫ Object-oriented databasesystems
⚫ 1990s:
⚫ Largedecisionsupportand data-mining applications
⚫ Large multi-terabytedatawarehouses
⚫ Emergenceof Webcommerce
⚫ Early 2000s:
⚫ XML and XQuerystandards
⚫ Automated databaseadministration
⚫ Later 2000s:
⚫ Giantdatastoragesystems
⚫ Google Big Table, Yahoo PNuts, Amazon, ..
7. The Evolution of DB systems and
DBMS
⚫1960s: (Electronic) Datacollection, databasecreation,
IMS (hierarchical database system by IBM) and
network DBMS
⚫1970s: Relational data model, relational DBMS
implementation
⚫ 1980s: RDBMS, advanced data models (extended-
relational, OO, deductive, etc.) Application-oriented
DBMS (spatial, scientific, engineering, etc.)
3/14/2023 UNIT I Database systems & ER Model 7
8. The Evolution of DB systems and
DBMS
3/14/2023 UNIT I Database systems & ER Model 8
⚫ 1990s: Data mining, datawarehousing, multimediadatabases,
and Webdatabases
⚫ 2000 –
⚫ Stream data managementand mining
⚫ Data mining and itsapplications
⚫ Web technology
Data integration,
XML
Social Networks (Facebook, etc.)
Cloud Computing
global information systems
*Emerging in-housesolutions
*In Memory Databases
*Big Data
9. Database Management System
(DBMS)
3/14/2023 UNIT I Database systems & ER Model 9
⚫ DBMS contains information abouta particularenterprise
⚫ Collection of interrelated data
⚫ Setof programs toaccessthedata
⚫ An environment that is both convenient and efficient to use
⚫ Database Applications:
⚫ Banking: transactions
⚫ Airlines: reservations, schedules
⚫ Universities: registration, grades
⚫ Sales: customers, products, purchases
⚫ Online retailers: order tracking, customized recommendations
⚫ Manufacturing: production, inventory, orders, supplychain
⚫ Human resources: employee records, salaries, tax deductions
⚫ Databasescan bevery large.
⚫ Databases touchall aspects of our lives
10. University Database Example
3/14/2023 UNIT I Database systems & ER Model 10
⚫ Application program examples
⚫ Add new students, instructors, and courses
⚫ Registerstudents forcourses, and generateclassrosters
⚫ Assigngrades to students, compute grade point averages (GPA) and
generatetranscripts
⚫ In theearlydays, databaseapplicationswere builtdirectlyon top of file
systems
11. Drawbacks of using file systems to store data
3/14/2023 UNIT I Database systems & ER Model 11
⚫Data redundancyand inconsistency
⚫ Multiple file formats, duplicationof information
in different files
⚫Difficulty in accessing data
⚫ Need towritea new program tocarry out each
new task
⚫Data isolation — multiple files and formats
⚫Integrity problems
⚫ Integrityconstraints (e.g., account balance > 0)
become “buried” in program code rather than
being stated explicitly
⚫ Hard toadd new constraints orchangeexisting
ones
12. Drawbacks of using file systems to store data (Cont.)
3/14/2023 UNIT I Database systems & ER Model 12
⚫ Atomicityof updates
⚫ Failures may leave database in an inconsistentstatewith partial
updates carried out
⚫ Example: Transferof funds fromoneaccount toanothershould
eithercompleteor not happen atall
⚫ Concurrentaccess by multiple users
⚫ Concurrentaccess needed forperformance
⚫ Uncontrolled concurrentaccesses can lead to inconsistencies
⚫ Example: Two people reading a balance (say 100) and
updating it bywithdrawing money (say 50 each) at the same
time
⚫ Securityproblems
⚫ Hard toprovideuseraccess tosome, but notall, data
Database systems offersolutions toall theabove
problems
13. Levels of Abstraction
3/14/2023 UNIT I Database systems & ER Model 13
⚫ Physical level: describes howa record (e.g., customer) is stored.
⚫ Logical level: describesdata stored in database, and the relationships
among thedata.
type instructor = record
ID : string;
name : string;
dept_name : string;
salary : integer;
end;
⚫ View level: application programs hide details of data types. Views can also
hide information (such asan employee’s salary) forsecuritypurposes.
14. View of Data
An architecture for a database system
3/14/2023 UNIT I Database systems & ER Model 14
15. Instances and Schemas
⚫ Similarto types and variables in programming languages
⚫ Schema – the logical structure of thedatabase
⚫ Example: The databaseconsists of information abouta setof customers and
accounts and the relationship between them
⚫ Analogous to type information of avariable in a program
⚫ Physical schema: databasedesign at the physical level
⚫ Logical schema: databasedesign at the logical level
⚫ Instance – theactual content of thedatabaseata particularpoint in time
⚫ Analogous to thevalueof avariable
⚫ Physical Data Independence – theability to modify the physical schemawithout
changing the logical schema
⚫ Applications depend on the logical schema
⚫ In general, the interfaces between thevarious levels and components should bewell
defined so thatchanges in some parts do not seriously influence others.
3/14/2023 UNIT I Database systems & ER Model 15
16. DBMS Architecture
⚫The DBMS design depends upon its architecture. The
basic client/server architecture is used to deal with a
large number of PCs, web servers, database servers and
othercomponents thatareconnected with networks.
⚫The client/server architecture consists of many PCs and
aworkstation which areconnected via the network.
⚫DBMS architecture depends upon how users are
connected to thedatabase toget theirrequestdone.
19. Database Architecture
3/14/2023 UNIT I Database systems & ER Model 19
Thearchitectureof adatabasesystems is greatly influenced by
the underlying computersystemon which the database is running:
⚫ Centralized
⚫ Client-server
⚫ Parallel (multi-processor)
⚫ Distributed
20. Storage Management
3/14/2023 UNIT I Database systems & ER Model 20
⚫ Storage manager is a program module that provides the interface
between the low-level datastored in thedatabaseand theapplication
programsand queries submitted to the system.
⚫ Thestorage manager is responsibleto the following tasks:
⚫ Interaction with the file manager
⚫ Efficient storing, retrieving and updating of data
⚫ Issues:
⚫ Storage access
⚫ Fileorganization
⚫ Indexing and hashing
21. Query Processing
1. Parsing and translation
2. Optimization
3. Evaluation
3/14/2023 UNIT I Database systems & ER Model 21
22. Query Processing (Cont.)
3/14/2023 UNIT I Database systems & ER Model 22
⚫ Alternative waysof evaluating a given query
⚫ Equivalentexpressions
⚫ Different algorithms foreachoperation
⚫ Costdifference between agood and a bad wayof evaluating aquerycan be
enormous
⚫ Need toestimate thecostof operations
⚫ Depends criticallyon statistical information about relationswhich the
database must maintain
⚫ Need toestimate statistics for intermediate resultstocompute costof
complex expressions
23. Transaction Management
3/14/2023 UNIT I Database systems & ER Model 23
⚫ What if thesystem fails?
⚫ What if more than one user is concurrently updating the same data?
⚫ A transaction is acollection of operations that performsa single logical
function in a databaseapplication
⚫ Transaction-management component ensures that the database
remains in aconsistent (correct) statedespite system failures (e.g., power
failures and operating systemcrashes) and transaction failures.
⚫ Concurrency-control manager controls the interaction among the
concurrent transactions, toensure theconsistency of thedatabase.
25. 1-TierArchitecture
• In this architecture, the database is directly available
to the user. It means the user can directly sit on the
DBMS and uses it.
• Any changes done here will directly be done on the
database itself. It doesn't provide a handy tool for
end users.
• The 1-Tier architecture is used for development of
the local application, where programmers can
directly communicate with the database for the
26. 2-TierArchitecture
• The 2-Tier architecture is same as basic
client-server. In the two-tier architecture,
applications on the client end can directly
communicate with the database at the
server side. For this interaction, API's like:
ODBC, JDBC are used.
• The user interfaces and application
programsare runon theclient-side.
• The server side is responsible to provide
the functionalities like: query processing
and transaction management.
• To communicate with the DBMS, client-
side application establishes a connection
with the serverside.
27. 3-TierArchitecture
• The 3-Tier architecture contains
another layer between the client
and server. In this architecture,
client can't directly
communicatewith the server.
• The application on the client-
end interacts with an
application server which further
communicates with the
databasesystem.
• End user has no idea about the
existence of the database
beyond the application server.
The database also has no idea
about any other user beyond
theapplication.
• The 3-Tier architecture is used
in caseof largewebapplication.
28. Data Models
⚫ A collection of tools fordescribing
⚫ Data
⚫ Data relationships
⚫ Data semantics
⚫ Data constraints
⚫ Relational model
⚫ Entity-Relationship data model (mainly fordatabasedesign)
⚫ Object-based data models (Object-oriented and Object-relational)
⚫ Semi structured data model (XML)
⚫ Otherolder models:
⚫ Network model
⚫ Hierarchical model
3/14/2023 UNIT I Database systems & ER Model 28
29. • Data Model is the modeling of the data description, data
semantics, and consistencyconstraintsof thedata.
• It provides the conceptual tools for describing the design
of a database at each level of data abstraction. Therefore,
there are following four data models used for
understanding the structureof thedatabase:
30. Relational Data Model
⚫This type of model designs the data in the form of
rows and columns within a table. Thus, a relational
model uses tables for representing data and in-
between relationships.
⚫Tables are alsocalled relations.
⚫This model was initially described by Edgar F. Codd,
in 1969.
⚫The relational data model is the widely used model
which is primarily used by commercial data
31. Entity-RelationshipData Model
⚫ An ER model is the logical representation of data as objects and
relationships among them. These objects are known as entities, and
relationship is an associationamong theseentities.
⚫ This model was designed by Peter Chen and published in 1976
papers.
⚫ Itwas widely used in databasedesigning.
⚫ A set of attributes describe the entities. For example, student_name,
student_id describes the 'student' entity. A set of the same type of
entities is known as an 'Entity set', and the set of the same type of
relationships is known as 'relationshipset'.
32. model with notions of
and object identity, as
Object-based Data Model
⚫An extension of the ER
functions, encapsulation,
well.
⚫This model supports a rich type system that
includesstructured and collection types.
⚫Thus, in 1980s, various database systems following
theobject-oriented approach weredeveloped.
⚫Here, the objects are nothing but the data carrying
its properties.
33. Semi structured Data Model
⚫This type of data model is different from the other three
data models.
⚫The semi structured data model allows the data
specifications at places where the individual data items of
thesame type may havedifferentattributes sets.
⚫The Extensible Markup Language, also known as XML, is
widely used forrepresenting the semi structured data.
⚫Although XML was initially designed for including the
markup information to the text document, it gains
importance because of its application in the exchange of
data.
34. The Entity-Relationship Model
⚫ Models an enterpriseas a collection of entities and relationships
⚫ Entity: a “thing” or “object” in theenterprise that is distinguishable
from otherobjects
⚫ Described bya setof attributes
⚫ Relationship: an associationamong several entities
⚫ Represented diagrammatically byan entity-relationship diagram:
What happened to dept_name of instructor and student?
3/14/2023 UNIT I Database systems & ER Model 34
35. Object-Relational Data Models
3/14/2023 UNIT I Database systems & ER Model 35
⚫ Relational model: flat, “atomic” values
⚫ Object Relational Data Models
⚫ Extend the relational data model by including objectorientation and
constructs todeal with added data types.
⚫ Allowattributes of tuples to have complex types, including non-
atomicvalues such as nested relations.
⚫ Preserverelational foundations, in particular thedeclarativeaccess to
data, whileextending modeling power.
⚫ Provide upward compatibility with existing relational languages.
36. XML: Extensible Markup
Language
3/14/2023 UNIT I Database systems & ER Model 36
⚫ Defined by the WWW Consortium (W3C)
⚫ Originally intended asadocument markup language notadatabase
language
⚫ Theability to specify new tags, and tocreate nested tag structures
made XML a greatway toexchange data, not justdocuments
⚫ XML has become the basis forall newgeneration data interchange
formats.
⚫ A widevarietyof tools is available for parsing, browsing and querying
XML documents/data
37. ●
3/14/2023 UNIT I Database systems & ER Model 37
EntityRelationshipModel
● EntityRelationshipDiagram(ERD)
● ExtendedFeaturesofERD
ER
38. 1.ENTITYRELATIONSHIPMODEL
3/14/2023 UNIT I Database systems & ER Model 38
● ERModel-Basic Concepts
Entity Attributes and its types
Entity-set and keys
Relationship And MappingCardinality
●
●
●
39. ERModel-BasicConcepts
3/14/2023 UNIT I Database systems & ER Model 39
The ER model defines the most relevant steps.
It works around real-world entities and the
associations among them.
At view level, the ER model is considered ago adoption
for designing databases.
Requirement Analysis
● Conceptual Database Design
●Logical Database Design
40. Attributes
●
⚫ Entitiesare represented by meansof theirproperties, called
attributes.
⚫ All attributes havevalues. Forexample, astudent entity may
have name, class, and ageasattributes.
⚫ Thereexistsadomainorrangeof values thatcan be assigned to
attributes. Forexample, a student' s namecan‘t be a numeric
value. It has to be alphabetic. A student'sagecan 't be negative,
etc.
●
3/14/2023 UNIT I Database systems & ER Model 40
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57. Types of Attributes
3/14/2023 UNIT I Database systems & ER Model 57
●⚫
●
●⚫
⚫ Simple attribute−Simple attributes areatomicvalues, which can 't bedivided further. For
example, a student's phone number is an atomicvalueof10 digits.
Compositeatribute−Composite attributes are made of more than one simple attribute. For
example , a student's complete name may have first name and last-named.
●
⚫ Derived attribute−Derived attributes are theattributes thatdon't exist in the physical
database, but theirvaluesarederived from otherattributes present in thedatabase. For
example, average_salary in a department should not be saved directly in the database,
instead it can bederived.Foranotherexample,age can bederived from data_of_birth.
⚫ Single-valueattribute−Single-value attributes contain singlevalue.
Forexample− Social_Security_Number.
⚫ Multivalued attribute−Multivalued attributes maycontain morethan one
● values.Forexample, a person can have morethan one phonenumber,email_ad res,etc.
58. Entity-Set and Keys
3/14/2023 UNIT I Database systems & ER Model 58
●
Key is an attribute or collection of attributes that uniquely identifies an entity
among entity set. For example, the roll_number of a student makes him/her
identifiable among students.
There are mainly three types of keys:
SuperKey− A set of attributes (one or more) that collectively identifies an
entity in an entity set.
CandidateKey− A minimal super key is called a candidate key. An entity set
may have more than one candidate key.
PrimaryKey− A primary key is one of the candidate keys chosen by the
database designer to uniquely identify the entity set.
●
●
59. M a p ping Cardinalities
3/14/2023 UNIT I Database systems & ER Model 59
Cardinality defines the number of entities in one
entity set , which can be associated with the number
of entities of other set via relationship set.
60. Types of Cardinalities
1.One-to-one
One entity from entity set A can be
associated with almost one entity of
entity set Band viceversa.
2.One-to-many
One entity from entity set A can be
associated with more than one entities of
entity set B however an entity from entity
set B , can be associated with almost one
entity
3/14/2023 UNIT I Database systems & ER Model 60
61. TypesofCardinalities(cont… . )
● Many toOne
More than one entities from entitysetA can
beasociatedwithatmostoneentityof
entitysetB,howeveranentityfrom entity
setBcanbeasociatedwithmorethanone entityfrom
entitysetA.
● ManytoMany
Oneentityfrom Acanbeasociated
withmorethanoneentityfrom B
andviceversa.
3/14/2023 UNIT I Database systems & ER Model 61
64. SYMBOLSANDNOTATIONS
hich you
● Entities:An entity is an object or concept about w
want to store information.
Aweakentityisanentitythatmust
definedbyaforeignkeyrelationshipwith
anotherentityasitcan otbeuniquelyidentifiedbyits
ownattributesalone.
3/14/2023 UNIT I Database systems & ER Model 64
66. Introduction
3/14/2023 UNIT I Database systems & ER Model 66
⚫The ER Model has the power of expressing data base
entities in a conceptual hierarchical manner.As the
hierarchy goes up, it generalizes the view of entities, and
as we go dep in the hierarchy, it gives us the detail of
every entity included.
⚫Going up in this structure is called generalization,
where entities are clubbed together to represent re
generalized view. For example, a particular student
named Kabindra can be generalized along with all the
students.The entity shall be a student, and further,the
student is a person.
⚫There verse is called specialization where a person is a
student,and that student is Kabindra.
67. Generalization
Ingeneralization, a number of
entities are brought together into
one generalized entity based on
their similar characteristics. For
example: Kabindra, Mukesh, Gopal,
ShivChandra can all be generalized
as member of this Group.
Members of this group
Kabindra
Mukesh Gopal
ShivChandra
3/14/2023 UNIT I Database systems & ER Model 67
68. Specialization
Specialization is the opposite of generalization. In
specialization, a group of entities i s divided in to
sub- groups based on their characteristics.
Take a group ‘Person’ for example.
A person has name, date of birth, gender, etc.
These properties are commoninal persons, human
beings. But in a company, persons can be identified
as employee, employer, customer, or vendor, basedon
what role they play in the company.
PERSON
TEACHER
STUDENT
ISA
3/14/2023 UNIT I Database systems & ER Model 68
69. Inheritance
3/14/2023 UNIT I Database systems & ER Model 69
⚫We use all the above features of ER-Model in order to create
classes of objects in object-oriented programming.
⚫The details of entities are generaly hidden from the user; this
process known as abstraction.
⚫Inheritance is an important feature of
Specialization.
Generali
z
ation and
⚫It allows lower-level entities to inherit the attributes of higher-
level entities.
⚫For example,the atributes of a Person class such as name, age,
and gender can be inherited by lower-level entities such as
Student or Teacher.
72. Constraints on ER model
⚫Constraints are used for modeling limitations on the
relations between entities.
⚫There are two types of constraints on the Entity
Relationship (ER) model −
o Mapping cardinality orcardinality ratio.
o Participationconstraints.
73. Mapping Cardinality
⚫It is expressed as the number of entities to which
anotherentitycan be associated viaa relationshipset.
⚫For the binary relationship set there are entity set A and
B then the mapping cardinality can be one of the
following −
One-to-one
One-to-many
Many-to-one
Many-to-many
75. One-to-manyrelationship
⚫An entity set A is associated with any number of
entities in B with a possibility of zero and an entity
in B is associated with at mostoneentity in A.
76. Many-to-onerelationship
⚫An entity set A is associated with at most one entity
in B and an entityset in B can beassociated with any
numberof entities in A with a possibilityof zero.
77. Many-to-manyrelationship
⚫An entity set A is associated with any number of entities
in B with a possibility of zero and an entity in B is
associated with any number of entities in A with a
possibilityof zero.
78. Participation Constraints
constraints are two types as mentioned
⚫Participate
below −
Total participation
are explained in the
Partial Participation
⚫The participation constraints
diagram below −
⚫Here, the customer to Loan is partial participation and
the loan to thecustomer is total participation.
79. Total participation
⚫The participation of an entity set E in a relationship set R is
said to be total if every entity in E Participates in at least one
relationship in R.
⚫For Example − Participation of loan in the relationship
borrower is total participation.
Partial Participation
⚫If only some of the entities in E participate in relationship R,
then the participation of E in R is said to be partial
participation.
⚫For example − Participation of customers in the relationship
borrower is partial participation.
80. Conclusion
3/14/2023 UNIT I Database systems & ER Model 80
So,in this presentation, we studied about Data
Models and its parts,
i.E Entity Relationship Models, Entity Relationship
Diagram and its Extended Features. Beside this,we
also learn about the use of them in database system
the application, which the information technology
field use as one of the major software in computer
field.