Data Models, Schemas and
Instances
A
characteristic of the database approach is that it provides a level of data
abstraction, by hiding details of data storage that are not needed by most
users.
A data
model is a collection of concepts that can be used to describe the structure of
a database. The model provides the
necessary means to achieve the abstraction.
The
structure of a database is characterized by data types, relationships, and
constraints that hold for the data.
Models also include a set of operations for specifying retrievals and
updates.
Data models
are changing to include concepts to specify the behaviour of the database
application. This allows designers to
specify a set of user defined operations that are allowed.
Categories of Data Models
Data models
can be categorized in multiple ways.
- High level/conceptual data models – provide concepts close to the way users
perceive the data.
- Physical data models – provide concepts that describe the details of how data is stored
in the computer. These concepts are
generally meant for the specialist, and not the end user.
- Representational data models – provide concepts that may be understood
by the end user but not far removed from the way data is organized.
Conceptual
data models use concepts such as entities, attributes and relationships.
- Entity
– represents a real world object or concept
- Attribute
- represents property of interest that describes an entity, such as name
or salary.
- Relationships – among two or more entities, represents an association among two
or more entities.
Representational data models are used most frequently in
commercial DBMSs. They include
relational data models, and legacy models such as network and hierarchical
models.
Physical data models describe how data is stored in
files by representing record formats, record orderings and access paths.
Object data models – a group of higher level implementation data
models closer to conceptual data models.
Schemas, Instances and
Database State
The
description of a database is called the database schema. The schema is specified during database
design, and is not expected to change frequently.
Data models
have conventions for displaying schemas as diagrams. A displayed schema is called a schema
diagram.
Each object
in the schema is called a schema construct.
Schema
diagrams display only some aspects of a schema, such as names and some
constraints.
The data in
a database may change frequently, every time records are added or updated. The data in the database at a given moment in
time is called the database state or
snapshot.
Database
Schema vs Database State
When a
database is defined, the schema is specified to the DBMS. The database state at this point is in the
empty state, with no data.
The initial
state of the database is when the database is first populated or loaded with
the initial data. Every time data is
added/removed/updated, there is a new database state.
The DBMS is
responsible for ensuring every state is a valid
state, a state that satisfies the structure and constraints specified in
the schema.
The DBMS
stores the descriptions of the schema constructs and constraints, called the
meta data, in the DBMS catalogue.
The schema
is called the intension, and the database state an extension of the schema.
Three Schema Architecture
and Data Independence
Remember
from the previous chapters, three of the main characteristics of database
systems, these are:
- Insulation of programs and data
- Support of multiple views
- Use of a catalogue to store the
database description (schema)
The three
schema architecture helps to achieve these characteristics.
To read the Full topic Download the The File
a
Buy IBPS CWE Common Written Examination: Recruitment of Specialist Officers from Flipkart.com
0 comments:
Post a Comment