Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
87 views

Unit-1 L5-DBMS Data Models

The document discusses key concepts and architecture of database systems. It covers topics such as data models, schemas, instances, database state, and client/server architecture. Specifically, it describes conceptual, physical, and implementation data models. It provides examples of entity relationship diagrams and relational models. It also explains the differences between a database schema and state, and how a schema represents the structure while instances change the state.

Uploaded by

Fahim Shaik
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views

Unit-1 L5-DBMS Data Models

The document discusses key concepts and architecture of database systems. It covers topics such as data models, schemas, instances, database state, and client/server architecture. Specifically, it describes conceptual, physical, and implementation data models. It provides examples of entity relationship diagrams and relational models. It also explains the differences between a database schema and state, and how a schema represents the structure while instances change the state.

Uploaded by

Fahim Shaik
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Database System

Concepts
and
Architecture
G.Manikandan
SAP / ICT / SOC
SASTRA
Data models
Schemas
Instances

3/8/2021 10:34:51 AM INT102 – DBMS – G.Manikandan / ICT 2


Client / Server Architecture

3/8/2021 10:34:51 AM INT102 – DBMS – G.Manikandan / ICT 3


3/8/2021 10:34:51 AM INT102 – DBMS – G.Manikandan / ICT 4
Data Model
 One fundamental characteristic of the database
approach is that it provides some level of data
abstraction.

 Data abstraction generally refers to the suppression


of details of data organization and storage

 Highlighting of the essential features for an improved


understanding of data.

 Data abstraction - Different users can perceive data at


their preferred level of detail.

3/8/2021 10:34:51 AM INT102 – DBMS – G.Manikandan / ICT 5


Data Models
 A set of concepts to describe the structure (data
types, relationships) of a database, and certain
constraints that the database should obey.

 Data models also include a set of basic operations for


specifying retrievals and updates on the database.

 Also include concepts in the data model to specify the


dynamic aspect or behavior of a database application.

 This allows the database designer to specify a set of


valid user-defined operations. (COMPUTE_GPA)

3/8/2021 10:34:51 AM INT102 – DBMS – G.Manikandan / ICT 6


Categories of Data
Models

3/8/2021 10:34:51 AM INT102 – DBMS – G.Manikandan / ICT 7


Categories of Data Models
 Conceptual (high-level, semantic)
 provide concepts that are close to the way many
users perceive data,
 Physical (low-level, internal)
 provide concepts that describe the details of how
data is stored on the computer storage media,
typically magnetic disks.
 Implementation (record-oriented)
 which provide concepts that may be easily
understood by end users
 Representational data models hide many details of
data storage on disk but can be implemented on a
computer system directly.
3/8/2021 10:34:51 AM INT102 – DBMS – G.Manikandan / ICT 8
Conceptual Data Model
 Conceptual data models use concepts such as
entities, attributes, and relationships.

 An entity represents a real-world object or concept


 such as an employee or a project from the mini world that is
described in the database.

 An attribute represents some property of interest that further describes an


entity,
 such as the employee’s name or salary.

 A relationship among two or more entities represents an association


among the entities,
 for example, a works-on relationship between an employee and a
project.

3/8/2021 10:34:51 AM INT102 – DBMS – G.Manikandan / ICT 9


Example ER Model

3/8/2021 10:34:51 AM INT102 – DBMS – G.Manikandan / ICT 10


Representational Data Model
 Representational or implementation data models are
the models used most frequently in traditional
commercial DBMSs.

 These include the so-called legacy data models—


the network and hierarchical

 Representational data models represent data by


using record structures and hence are sometimes
called record-based data models.

3/8/2021 10:34:52 AM INT102 – DBMS – G.Manikandan / ICT 11


Hierarchical (Tree) Model
Network Model

3/8/2021 10:34:52 AM INT102 – DBMS – G.Manikandan / ICT 13


Relational Models
Physical Data Model
 Physical data models describe how data is stored as
files in the computer by representing information such
as record formats, record orderings, and access paths.

 An access path is a search structure that makes the


search for particular database records efficient, such
as indexing or hashing.

 An index is an example of an access path that allows


direct access to data using an index term or a keyword.

 Index may be organized in a linear, hierarchical (tree-


structured), or some other fashion.

3/8/2021 10:34:52 AM INT102 – DBMS – G.Manikandan / ICT 15


Schemas, Instances
and
Database State

3/8/2021 10:34:52 AM INT102 – DBMS – G.Manikandan / ICT 16


Student Database

3/8/2021 10:34:52 AM INT102 – DBMS – G.Manikandan / ICT 17


Schema diagram for the Student database
Database Schema
 In a data model,
 It is important to distinguish between the description of the
database and the database itself.

 The description of a database is called the database schema,


which is specified during database design and is not expected
to change frequently.

 Most data models have certain conventions for displaying


schemas as diagrams.

 A displayed schema is called a schema diagram.

 The diagram displays the structure of each record type but not the
actual instances of records.
 Each object in the schema—such as STUDENT / COURSE — a
schema construct.
3/8/2021 10:34:52 AM INT102 – DBMS – G.Manikandan / ICT 19
Schema Diagram - Limitations
 A schema diagram displays only some aspects of a schema
 such as the names of record types and data items

 Other aspects are not specified in the schema diagram;

 Figure shows neither the data type of each data item nor
the relationships among the various files.
 Many types of constraints are not represented in schema
diagrams.

 A constraint such as students majoring in computer


science must take CS1310 before the end of their
sophomore year is quite difficult to represent
diagrammatically.

3/8/2021 10:34:52 AM INT102 – DBMS – G.Manikandan / ICT 20


Database state
 The actual data in a database may change quite frequently.
 For example, the database changes every time we add a new
student or enter a new grade.

 The data in the database at a particular moment in time is


called a database state or snapshot.
 It is also called the current set of occurrences or
instances in the database.

 Every time we insert or delete a record or change the


value of a data item in a record, we change one state of
the database into another state.

3/8/2021 10:34:52 AM INT102 – DBMS – G.Manikandan / ICT 21


Database Schema vs Database State
 When we define a new database
 we specify its database schema only to the DBMS.
 The corresponding database state is the empty state with no data.

 Get - initial state of the database when the database is first


populated or loaded with the initial data.

 From then on,


 every time an update operation is applied to the database
 we get another database state.
 At any point in time, the database has a current state.

 DBMS is responsible for ensuring that every state of the database is


a valid state— that is, a state that satisfies the structure and
constraints specified in the schema.
3/8/2021 10:34:52 AM INT102 – DBMS – G.Manikandan / ICT 22
Intension and Extension
 Hence,
 specifying a correct schema to the DBMS is extremely
important and
 the schema must be designed with utmost care.

 The DBMS stores the descriptions of the schema


constructs and constraints—also called the meta-data—
in the DBMS catalog so that DBMS software can refer
to the schema whenever it needs to.

 The schema is called the intension, and a database


state is called an extension of the schema.

3/8/2021 10:34:52 AM INT102 – DBMS – G.Manikandan / ICT 23


Schema Evolution
 The schema is not supposed to change frequently

 It is not uncommon that changes occasionally need to be applied to


the schema as the application requirements change.

 For example,
 we may decide that another data item needs to be stored for
each record in a file, such as adding the Date_of_birth to the
STUDENT schema.

 This is known as schema evolution.

 Most modern DBMSs include some operations for schema


evolution that can be applied while the database is operational.

3/8/2021 10:34:53 AM INT102 – DBMS – G.Manikandan / ICT 24


 Client / Server Architecture
 Data Model
 Categories of Data Models
 Schemas
 Instances
 Database State

3/8/2021 10:34:53 AM INT102 – DBMS – G.Manikandan / ICT 25


3/8/2021 10:34:53 AM INT102 – DBMS – G.Manikandan / ICT 26

You might also like