DATABASE Environment
Instance or occurrences:
Database change over time as information is inserted
and deleted.
The collection of information stored in the database
at a particular moment is an instance of the
database.
ex: Each row in the database i.e. a set of related
data’s.
Schema or intension:
The description of a database is called the
schema or intension.
The overall design of the database is the database
schema.
Three layer architecture
Internal level: which describe the physical storage
structure of database it use Physical data model and
describe how data is stored in a computer, representing
information such as record structures, record orderings
and access path.
b) Conceptual Database: describe the structure of whole
database for users. This describes what data is stored in
the database and the relationships among data.
c) The external-view level: include a number of external
schema. Each view describe part of the database that
particular group of user have access to.
View
A database view is a searchable object in
a database that is defined by a query.
Though a view doesn't store data, some refer
to a views as “virtual tables,” you can query
a view like you can a table.
A view can combine data from two or more
table, using joins, and also just contain a
subset of information.
Data Model
Data model is a collection of conceptual tools for
describing data, data relationships, data semantics,
and consistency constraints.
Categorize of data Model:
Object base data Model
Record base Data Model
Physical data Model
Physical Data Model - describes how data is stored
in a computer, representing information such as
record structures, record orderings and access path.
Categorize of data Model
Record data model - In this model data is organized in the
form of records with a fixed number of fields.
3 types of record-based models:
Hierarchical model
Network data Model
Relational data Model
Object-based Model
this Model use concept such as entities, attribute, and
relationship.
An Entity is distinct object (a person,place,[Link],
event) in organization to represent in database.
Some of object base model are
Entity-Relationship
Semantic
Physical Data Model
describes how data is stored in a computer,
representing information such as record
structures, record orderings and access path.
Relationship model
The E-R model based on the perception that
the real world consists of basic objects called
entities, and relationship among these
entities. Entities are described in the
database by a set of attributes.
A relationship is an association among
various entities.
The Relational model
uses collection of tables to represent both
data and the relationships among these data.
Each table has multiple columns and each
column has unique name. It is based on
mathematical relations.
Object-based Model
This model is an extension of E-R model.
Object-relational data model combines the
features of the object-oriented model and
relational model.
Database Languages
A database system provides a data definition
language and a data manipulation language.
Data Definition Language (DDL)
Used to specify the database schema. It
allows the users to define a database, specify
the data type, structure, constraints on the
data stored in the database
The database schema is specified by a set of
definitions expressed by a special language
called a DDL.
The result of compilation of the DDL
statements is a set of tables stored in a
specific files collectively called system
catalog
When a table is defined in DDL, a data
dictionary or data directory is created. A data
dictionary contains metadata-data about data.
A database consults data dictionary before
adding or modifying actual data called system
catalog.
A special type of DDL called data storage and.
The data values stored in the database must
satisfy certain consistency definition
language specifies storage structures and
access methods used by database system
constraints.
The result of compilation of the DDL
statements is a set of tables stored in a specific
file collectively.
Data Manipulation Language (DML)
-This allows the users to manipulate the data
stored like insert, update, delete or retrieve
data.
A DML is the language that enables users to
access or manipulate data as organized by
the appropriate data model.
They are of two types:
1. Procedural DML: requires user to specify
what data are needed and how to get the
data. It manipulates the database record by
record.
2. Declarative DML: requires user to specify
what data are needed without specifying
how to get those data. It can operate on sets
of records. E.g. SQL
Query is a statement requesting the retrieval
of information.
The portion of a DML that involves
information retrieval is called a query
language.
4GL
-It stands for 4th generation Languages.
This is a non-procedural language.
Form Generators: It allows the user to define
what the screen looks like , what information is to
be displayed and where on the screen it should
be displayed.
Report Generators: It provides the facility to
create reports from data stored in the database.
Application generator
Graphical Generator:
Form Generators:
It allows the user to define what the screen
looks like, what information is to be displayed
and where on the screen it should be
displayed.
Report Generators
It provides the facility to create reports from
data stored in the database.
Graphics Generators
It helps to retrieve data from the database
and display the data as a graph.
Interfaces
Naive user usually use the User interface to
interacting with database it may include the
following:
1) Menu base interface
2) Form-base interface
3) Graphic User interface
4) Natural language interface
The picture below describe data interface
and its relation with other part of database
Data System End
Administrators Developers Users
CASE User Application
tools Interface Program s
Repository DBMS Database
Function of Database
[Link] storage , retrieval, and update:
A DBMS must furnish the user with ability to store, retrieve,and update
data.
2. A user accessible catalog
A cataloged in which description of data item are stored and which is
accessible to user
3. Transaction support
A DBMS must furnish a mechanism that will ensure either that all update
corresponding to given transaction are made or none of them is made.
[Link] control services
A DBMS must furnish a mechanism to ensure that database is update
correctly when multiple user are updating the database concurrency
services
Function of Database
[Link] services
A DBMS must furnish a mechanism to ensure that
database will recover in case of data damage.
[Link] services
A DBMS must furnish a mechanism to ensure that
only authorize user can access the database.
[Link] for data communication
A DBMS must be capable of integrating with
communication software.
Function of Database
[Link] to promote data independence
A DBMS must include facilities to support the
independence of programs from the actual
structure of database
[Link] Service:
A DBMS should provide a set of utilities
services