Professional Documents
Culture Documents
Rest of Unit 1
Rest of Unit 1
dferent authorizathion to difterent users. Thus we are able to hide certain information fronm
somne users For example, in a banking system, payroll personnel need to see only that part of
the database that has information about the various bank employees. They do not need access
to mormation about customer accounts. This type of restriction is essential for security
parpase. But file prooessing system do not allow us to create user accounts thus all users have
egual access to the data. Due to this it is difficult to maintain security of flat file systems. Besides
this file processing systems do not have any provisions for periodic backup of data and
recovery from data loss which are provided by database management systems.
Despite of the number of drawbacks of flat-file systems they are beneficial in many situations
and database management systems may not be much suitable in such situations. Benefits of file
processing systems or we can limitations of daabase management systems are described below
Based on above discussion we can say that database management systems arte always not
suiable to use. Flat file systems are more suitable to use rather than database management
systems in following situations:
When system to be developed is simple and small
When we need to manage few data (up to 2-3 data files)
When security is not major concern
When concurrent access is not needed
Airlines and railways: Airlines and railways use online databases for reservation, and for
transactions.
registration, result, and
type of each field. For example, employee information in a company database may be stored in
Employee (Eid: string, Ename: string, Address: string, Salary: integer, age: integer)
The preceding schema says that each record in the Students relation has five fields, with field
names and types as indicated. Once created, database schema is not expected to chang:
to the level ot
frequently. Database systems have several schemas partitioned according
abstraction such as physical and logical schema. Database administrator is responsible for
Physical Level
Internal Level
ad
ex
Stored database
data abstraction
Fig: Three levels of
Lover
1.7.2 Logical level
Cconce ptual
what data are stored in the
of data abstraction which describes
level
It is the next higher those data. It is also known as conceptual
level at
exist among
database, and what relationships level describes the
schema (conceptual schema). Logical
the schema at this level is called logical the conceptual
a relational DBMS,
of the data model of the DBMS. In
stored data in terms
stored in the database. Programmers
relations (tables) that are
schema is described by using do not need to
this level of abstraction. Database users
works at
and database administrator
have knowledge of this level.
Texternal Lenel
1.7.3 View level
database and hides some
The correspondence between a particular external view and the conceptual view is called
external/conceptual mapping. For example, field names can be changed; several conceptual
fields can be combined into a single external field; and so on. When modification is done to the
conceptual schema (i.e tables) only the external/conceptual mapping need to be changed, if the
DBMS fully supports the concept of data independence.
The correspondence between the conceptual view and the stored database is called
conceptual/internal mapping It specifies how conceptual records and relations (files) are
represented at the internal level. If a change is made to the storage structure definition, then the
conceptual/internal mapping must be changed accordingly, so that the conceptual schema can
remain invariant. It is the responsibility of the DBA to manage such changes.
1.9 Database Languages
Languages that are used to interact with dalabase management systems are called database
languages. DBMS provides two languages: Data-Definition Language (DDL) and Data
Manipulation Language (DML).
1.9.1 Data Definition Language (DDL)
Database language that is used to create, delete or modify database schema is called data
definition language. DDL statements are converted into equivalent low level statements by
DDL interpreter. DDL is used by the database administrators or database
the conceptual schema of a database. In many DBMSs, the DDL is designers to specify
also used to define internal
and externai schemas (views). Results of DDL statements are
recorded in
dictionary. Structured query language supports following DDL statements:special
file called data
Language (DML)
.9.2 Data Manipulation from database is
called
Database language
update, and retrieve data
that enables insert, delete, data manipulation
data manipulation language (DML). Query
language is only a part of
low level statements by DML
are converted into equivalent
language. DML statements DML statements:
Structured query language supports following
compiler.
Insert statement
Delete statement
Update statement
Select statement
Example of a DML statement is given below:
Insert into Employee values ("A01", 456000, "Patan");
relation
Execution of above DML statement causes one record to be insertion into the employee
and hence causes database instance to be changed. There are basically two classes of DML:
Procedural DMLs: In procedural DMLS, a user specifies what data are required and
how to get those data. These are normally low level data manipulation languages
Relational algebra is an example of procedural DML.
Nonprocedural DMLs: In nonprocedural DMLs a user specifies what data are needed
without specifying how to get those data. These are normaly high level dat
manipulation languages. Structured query language (5QL) is an example of
nonprocedural DML.
Part of data manipulation language that can be used to retrieve data from the database is called
query language and the DML statement that is used to retrieve data is called query. Example of
SQL query is given below:
SELECT
FROM account
WHERE balance <1000
Execution of this statement retrieves the records of all accounts in which balance is below 1000.