Unit 1 Dbms 17cic53 Notes QB
Unit 1 Dbms 17cic53 Notes QB
UNIT 1
Database Concepts and Architecture
Data
Data is raw fact or figures or entity.
When activities in the organization takes place, the effect of these activities need to be recorded which is known as
Data.
Information
Processed data is called information
The purpose of data processing is to generate the information required for carrying out the business activities
Database
It is a collection related data
The database can be of any size and of varying complexity.
A database may be generated and maintained manually or it may be computerized.
Page 1
Database Systems 17CIC53
A typical large database may have a life cycle of many years, so the DBMS must be able to maintain the
database system by allowing the system to evolve as requirements change over time.
Page 2
Database Systems 17CIC53
The catalog is used by the DBMS software and also by database users who need information
about the database structure. A general-purpose DBMS software package is not written for a
specific database application. Therefore, it must refer to the catalog to know the structure of the
files in a specific database, such as the type and format of data it will access. The DBMS software
must work equally well with any number of database applications—for example, a university
database, a banking database, or a company database—as long as the database definition is stored
in the catalog.
In traditional file processing, data definition is typically part of the application programs
themselves. Hence, these programs are constrained to work with only one specific database, whose
structure is declared in the application programs.
In traditional file processing, the structure of data files is embedded in the application
programs, so any changes to the structure of a file may require changing all programs that access
that file. By contrast, DBMS access programs do not require such changes in most cases. The
structure of data files is stored in the DBMS catalog separately from the access programs. This
property is called as program-data independence.
In some types of database systems, such as object-oriented and object-relational systems users can
define operations on data as part of the database definitions. An operation (also called a function
or method) is specified in two parts. The interface (or signature) of an operation includes the
operation name and the data types of its arguments (or parameters). The implementation (or
method) of the operation is specified separately and can be changed without affecting the
interface. User application programs can operate on the data by invoking these operations through
their names and arguments, regardless of how the operations are implemented. This property is
called as program-operation independence.
The characteristic that allows program-data independence and program-operation
independence is called data abstraction. A DBMS provides users with a conceptual
representation of data that does not include many of the details of how the data is stored or how
the operations are implemented. . Informally, a data model is a type of data abstraction that is
used to provide this conceptual representation. The data model uses logical concepts, such as
objects, their properties, and their interrelationships, that may be easier for most users to
Page 3
Database Systems 17CIC53
understand than computer storage concepts. Hence, the data model hides storage and
implementation details that are not of interest to most database users.
Actors on Screen
Those who actually use and control the database content, and those who design, develop and
maintain database applications are called actors on the screen.
1. Database Administrators: The database administrator (DBA) is responsible for authorizing
access to the database, coordinating and monitoring its use, and acquiring software and
hardware resources as needed.
2. Database Designers: Database designers are responsible for identifying the data to be stored in
the database and for choosing appropriate structures to represent and store this data. These
tasks are mostly undertaken before the database is actually implemented and populated with
data.
3. End Users: End users are the people whose jobs require access to the database for querying,
updating, and generating reports; the database primarily exists for their use. There are several
categories of end users:
■ Casual end users occasionally access the database, but they may need different
information each time. They use a sophisticated database query language to specify
their requests and are typically middle- or high-level managers or other occasional
browsers.
■ Naive or parametric end users make up a sizable portion of database end users.
Page 4
Database Systems 17CIC53
Their main job function revolves around constantly querying and updating the
database, using standard types of queries and updates called canned transactions
that have been carefully programmed and tested. Bank tellers check account balances
and post withdrawals and deposits. Reservation agents for airlines, hotels, and car rental
companies check availability for a given request and make reservations.
■ Sophisticated end users include engineers, scientists, business analysts, and others
who thoroughly familiarize themselves with the facilities of the DBMS in order to
implement their own applications to meet their complex requirements.
■ Standalone users maintain personal databases by using ready-made program packages
that provide easy-to-use menu-based or graphics-based interfaces. An example is the user
of a tax package that stores a variety of personal financial data for tax purposes.
1. DBMS system designers and implementers: Design and implement the DBMS modules and
interfaces as a software package. The DBMS must interface with other system software such as
the operating system and compilers for various programming languages.
2. Tool developers: design and implement tools, the software packages that facilitate database
modeling and design, database system design, and improved performance. They include
packages for database design, performance monitoring, natural language or graphical interfaces,
prototyping, simulation, and test data generation. In many cases, independent software vendors
develop and market these tools.
3. Operators and maintenance personnel (system administration personnel) : are responsible for
the actual running and maintenance of the hardware and software environment for the database
system
Page 5
Database Systems 17CIC53
Page 6
Database Systems 17CIC53
so that its full effect is recorded in the database. Disk backup is also necessary in case of a
catastrophic disk failure.
6. Providing Multiple User Interfaces: Many types of users with varying levels of technical
knowledge use a database, a DBMS should provide a variety of user interfaces. These include
query languages for casual users, programming language interfaces for application programmers,
forms and command codes for parametric users, and menu-driven interfaces and natural language
interfaces for standalone users.
7. Representing Complex Relationships among Data: A database may include numerous varieties
of data that are interrelated in many ways. A DBMS must have the capability to represent a variety
of complex relationships among the data, to define new relationships as they arise, and to retrieve
and update related data easily and efficiently.
8. Enforcing Integrity Constraints: Most database applications have certain integrity constraints
that must hold for the data. A DBMS should provide capabilities for defining and enforcing these
constraints.
9. Permitting Inferencing and Actions Using Rules: Some database systems provide capabilities
for defining deduction rules for Inferencing new information from the stored database facts. Such
systems are called deductive database systems.
10.Additional Implications of Using the Database Approach:
Potential for Enforcing Standards:
Reduced Application Development Time.
Flexibility
Availability of Up-to-Date Information.
Economies of Scale.
Data abstraction generally refers to the suppression of details of data organization and storage,
and the highlighting of the essential features for an improved understanding of data. One of the
main characteristics of the database approach is to support data abstraction so that different users
can perceive data at their preferred level of detail.
Data Models: Data Model is a set of concepts to describe the structure of a database, the
operations for manipulating these structures, and certain constraints that the database should
obey.
Data Model Structure and Constraints:
Page 7
Database Systems 17CIC53
These operations are used for specifying database retrievals and updates by referring to the
constructs of the data model.
Operations on the data model may include basic model operations (e.g. generic insert, delete,
update) and user-defined operations (e.g. compute_student_gpa, update_inventory).
Page 8
Database Systems 17CIC53
Schema Construct: A component of the schema or an object within the schema. e.g., STUDENT,
COURSE.
Database state :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.
Page 9
Database Systems 17CIC53
Initial Database State : Refers to the database state when it is initially loaded into the system.
Valid State: A state that satisfies the structure and constraints of the database.
The database schema changes very infrequently and The database state changes every time the database
is updated.
Page 10
Database Systems 17CIC53
Three-Schema Architecture
The goal of the three-schema architecture, illustrated as shown in the above Figure ,is to separate
the user applications from the physical database. In this architecture, schemas can be defined at the
following three levels:
1. The internal level has an internal schema, which describes the physical storage structure of
the database. The internal schema uses a physical data model and describes the complete details of
data storage and access paths for the database.
2. The conceptual level has a conceptual schema, which describes the structure of the whole
database for a community of users. The conceptual schema hides the details of physical storage
structures and concentrates on describing entities, data types, relationships, user operations, and
constraints. This implementation conceptual schema is often based on a conceptual schema design
in a high-level data model.
3. The external or view level includes a number of external schemas or user views. Each
external schema describes the part of the database that a particular user group is interested in and
hides the rest of the database from that user group. As in the previous level, each external schema
is typically implemented using a representational data model, possibly based on an external
schema design in a high-level data model.
The processes of transforming requests and results between levels are called mappings.
Mappings among schema levels are needed to transform requests and data.
Programs refer to an external schema, and are mapped by the DBMS to the internal schema
for execution.
Data extracted from the internal DBMS level is reformatted to match the user’s external
view (e.g. formatting the results of an SQL query for display in a Web page)
Page 11
Database Systems 17CIC53
Data Independence: It can be defined as the capacity to change the schema at one level of a database
system without having to change the schema at the next higher level. There are two types of data
independence:
1. Logical data independence: is the capacity to change the conceptual schema without having to
change external schemas or application programs. Any change in the conceptual schema to
expand the database (by adding a record type or data item), to change constraints, or to reduce the
database (by removing a record type or data item)will not affect the external schemas that refer
only to the remaining data .
2. Physical data independence :is the capacity to change the internal schema without having to
change the conceptual schema. Hence, the external schemas need not be changed as well. Changes
to the internal schema may be needed because some physical files were reorganized for example,
by creating additional access structures to improve the performance of retrieval or update. If the
same data as before remains in the database, there is no need to change the conceptual schema.
DBMS Languages
Data Definition Language (DDL): It is used by the DBA and by database designers to define both
schemas. The DBMS will have a DDL compiler whose function is to process DDL statements in order to
identify descriptions of the schema constructs and to store the schema description in the DBMS catalog.
DDL is used to specify the conceptual schema only.
Storage Definition Language(SDL): It is used to specify the internal schema. The mapping between the
two schemas may be specified in either one of the above languages.
View Definition Language (VDL): It is used for specifying the external schemas (i.e., user views). But
in most DBMSs , the DDL is used to define both conceptual and external schemas.
Data Manipulation Language (DML): DML (Data Manipulation Language): used for performing
operations such as retrieve and update upon the populated database.
DBMS Interfaces
Menu-based Interfaces for web clients or Browsing: These interfaces present the user with list of
options (called menus) that lead the user through the formulation of a request. Pull down menus are very
popular technique in Web-based user interfaces.
Forms-based Interfaces: A form-based interface displays a form to each user. Users can fill out all of the
form entries to insert new data, or they can fill out only certain entries in which case the DBMS will
retrieve matching data for the remaining entries.
Page 12
Database Systems 17CIC53
Graphical User Interface: A GUI typically displays a schema to the user in diagrammatic form.
Natural Language Interfaces: These interfaces accept requests written in English or some other
language and attempt to understand them. A natural language interface usually has its own schema, which
is similar to the database conceptual schema, as well as a dictionary of important words.
Speech Input and Output: Limited use of speech as an input query and speech as an answer to a
question or result of a request is becoming commonplace. The speech input is detected using a library of
predefined words and used to set up the parameters that are supplied to the queries. For output, a similar
conversion from text or numbers into speech takes place.
Interfaces for parametric users: Parametric users such as bank tellers often have a small set of
operations that they must perform repeatedly. System analysts and programmers design and implement a
special interface for each known class of parametric users.
Interfaces for the DBA: Most databases contain privileged commands that can be used only by the DBA
staff. These include commands for creating accounts, setting system parameters, getting account
authorization, changing a schema etc.,
A Database Administrator is a person or a group of person who are responsible for managing all the
activities related to database system. This job requires a high level of expertise by a person or group of
person.
Page 13
Database Systems 17CIC53
Capacity Issues
All the databases have their limits of storing data in it and the physical memory also has some limitations.
DBA has to decide the limit and capacity of database and all the issues related to it.
Database design
The logical design of the database is designed by the DBA. Also a DBA is responsible for physical
design, external model design, and integrity control.
Database accessibility
DBA writes subschema to decide the accessibility of database. He decides the users of the database and
also which data is to be used by which user.
Monitoring performance
If database is working properly then it doesn’t mean that there is no task for the DBA. Yes f course, he
has to monitor the performance of the database. A DBA monitors the CPU and memory usage.
Database implementation
Database has to be implemented before anyone can start using it. So DBA implements the database
system. DBA has to supervise the database loading at the time of its implementation.
Page 14
Database Systems 17CIC53
Question Bank
UNIT-1
1. Explain the characteristics of the Database Approach
2. Describe the three schema architecture. Why mapping is required among schema levels.
i) Data model
ii) Catalog
11. What is data independence and how does a DBMS support it?
Page 15