0% found this document useful (0 votes)
90 views15 pages

Unit 1 Dbms 17cic53 Notes QB

The document discusses key concepts in database systems including data, information, databases, database management systems (DBMS), and metadata. It describes how a DBMS enables users to define, construct, and manipulate databases for applications. A DBMS stores metadata that describes the database structure and allows programs to work with different databases. Characteristics of database systems are that they provide data abstraction through logical representations, support multiple views, and allow controlled concurrent access and sharing of data by multiple users. The roles of database administrators, designers, and various types of end users are also outlined.

Uploaded by

shilpa ks
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views15 pages

Unit 1 Dbms 17cic53 Notes QB

The document discusses key concepts in database systems including data, information, databases, database management systems (DBMS), and metadata. It describes how a DBMS enables users to define, construct, and manipulate databases for applications. A DBMS stores metadata that describes the database structure and allows programs to work with different databases. Characteristics of database systems are that they provide data abstraction through logical representations, support multiple views, and allow controlled concurrent access and sharing of data by multiple users. The roles of database administrators, designers, and various types of end users are also outlined.

Uploaded by

shilpa ks
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Database Systems 17CIC53

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.

Database Management System


 A Database Management System (DBMS) is a collection of program that enables user to create and maintain a
database.
 The DBMS is hence a general purpose software system that facilitates the process of defining constructing and
manipulating database for various applications
 Defining a database involves specifying the data types, structures, and constraints of the data to be
stored in the database. The database definition or descriptive information is also stored by the
DBMS in the form of a database catalog or dictionary; it is called meta-data.
 Constructing the database is the process of storing the data on some storage medium that is
controlled by the DBMS.
 Manipulating a database includes functions such as querying the database to retrieve specific
data, updating the database to reflect changes in the mini world, and generating reports from the
data
 Sharing a database allows multiple users and programs to access the database simultaneously.
 A query typically causes some data to be retrieved; a transaction may cause some data to be read
and some data to be written into the database. Other important functions provided by the DBMS
include protecting the database and maintaining it over a long period of time.
 Protection includes system protection against hardware or software malfunction (or crashes) and
security protection against unauthorized or malicious access

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.

A simplified database system environment.

Metadata (data-about-the data)


Metadata is data that describes other data. Metadata summarizes basic information about data, which can
make finding and working with particular instances of data easier

Page 2
Database Systems 17CIC53

Characteristics of the Database Approach:


1. Self-Describing Nature of a Database System
The database system contains not only the database itself but also a complete definition or
description of the database structure and constraints. This definition is stored in the DBMS
catalog, which contains information such as the structure of each file, the type and storage format
of each data item, and various constraints on the data. The information stored in the catalog is
called meta-data, and it describes the structure of the primary database.

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.

2. Insulation between Programs and Data, and Data Abstraction:

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.

3. Support of Multiple Views of the Data:


A database typically has many users, each of whom may require a different perspective or view of
the database. A view may be a subset of the database or it may contain virtual data that is derived
from the database files but is not explicitly stored. A multiuser DBMS whose users have a variety
of distinct applications must provide facilities for defining multiple views.
4. Sharing of Data and Multiuser Transaction Processing:
A multiuser DBMS, as its name implies, must allow multiple users to access the database at the
same time. This is essential if data for multiple applications is to be integrated and maintained in a
single database. The DBMS must include concurrency control software to ensure that several
users trying to update the same data do so in a controlled manner so that the result of the updates
is correct.
For example, when several reservation agents try to assign a seat on an airline flight, the DBMS
should ensure that each seat can be accessed by only one agent at a time for assignment to a
passenger. These types of applications are generally called online transaction processing
(OLTP) applications.
A fundamental role of multiuser DBMS software is to ensure that concurrent transactions operate
correctly and efficiently.

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.

4. System Analysts and Application Programmers: System analysts determine the


requirements of end users, especially naive and parametric end users, and develop
specifications for standard canned transactions that meet these requirements. Application
programmers implement these specifications as programs; then they test, debug, document,
and maintain these canned transactions. Such analysts and programmers—commonly referred
to as software developers or software engineers.

Workers behind the Scene


Those who design and develop the DBMS software and related tools, and the computer systems
operators are called workers behind the scene.

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

Advantages of Using the DBMS Approach (over traditional file system)


1. Controlling Redundancy: In traditional software development utilizing file processing, every
user group maintains its own files for handling its data-processing applications. redundancy in
storing the same data multiple times leads to several problems such as entering the same data
multiple times. Storage space is wasted when the same data is stored repeatedly, and this problem
may be serious for large databases. Files that represent the same data may become inconsistent.
This may happen because an update is applied to some of the files but not to others. In the
database approach, the views of different user groups are integrated during database design.
Ideally, a database design that stores each logical data item in only one place in the database. This
is known as data normalization, and it ensures consistency and saves storage space
2. Restricting Unauthorized Access: When multiple users share a large database, it is likely that
most users will not be authorized to access all information in the database.
For example, financial data is often considered confidential and only authorized persons are
allowed to access such data. In addition, some users may only be permitted to retrieve data,
whereas others are allowed to retrieve and update. Hence, the type of access operation retrieval or
update must also be controlled.
3. Providing Persistent Storage for Program Objects: Databases can be used to provide persistent
storage for program objects and data structures. This is one of the main reasons for object-oriented
database systems. The values of program variables or objects are discarded once a program
terminates, unless the programmer explicitly stores them in permanent files, which often involves
converting these complex structures into a format suitable for file storage. When the need arises to
read this data once more, the programmer must convert from the file format to the program
variable or object structure. Object-oriented database systems are compatible with programming
languages such as C++ and Java, and the DBMS software automatically performs any necessary
conversions. Hence, a complex object in C++ can be stored permanently in an object-oriented
DBMS. Such an object is said to be persistent, since it survives the termination of program
execution and can later be directly retrieved by another C++ program.
4. Providing Storage Structures and Search Techniques for Efficient Query Processing:
Database systems must provide capabilities for efficiently executing queries and updates. Because
the database is typically stored on disk, the DBMS must provide specialized data structures and
search techniques to speed up disk search for the desired records. Auxiliary files called indexes
are used for this purpose. Indexes are typically based on tree data structures or hash data structures
that are suitably modified for disk search. In order to process the database records needed by a
particular query, those records must be copied from disk to main memory. Therefore, the DBMS
often has a buffering or caching module that maintains parts of the database in main memory
buffers.
5. Providing Backup and Recovery: The backup and recovery subsystem of the DBMS is
responsible for recovery. For example, if the computer system fails in the middle of a complex
update transaction, the recovery subsystem is responsible for making sure that the database is
restored to the state it was in before the transaction started executing. Alternatively, the recovery
subsystem could ensure that the transaction is resumed from the point at which it was interrupted

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 Models, Schemas, and Instances

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:

 Constructs are used to define the database structure


 Constructs typically include elements (and their data types) as well as groups of
elements (e.g. entity, record, table), and relationships among such groups
 Constraints specify some restrictions on valid data; these constraints must be
enforced at all times.

Page 7
Database Systems 17CIC53

Data Model Operations:

 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).

Categories of Data Models:


 Conceptual (high-level, semantic) data models: Provide concepts that are close to the
way many users perceive data, (Also called entity-based or object-based data models.) uses
concepts such as

Entity: real-world object or concept (e.g., student, employee, course, department)


Attribute: some property of interest describing an entity (e.g., height, age, color)
Relationship: an interaction among entities (e.g., works-on relationship between
an employee and a project)
 Physical (low-level, internal) data models: Provide concepts that describe details of how
data is stored in the computer. These are usually specified in an ad-hoc manner through
DBMS design and administration manuals
 Implementation (representational) data models: Provide concepts that fall between the
above two, used by many commercial DBMS implementations (e.g. relational data models
used in many commercial systems).

Schemas, Instances, and Database State


Database Schema: The description of a database which Includes descriptions of the database
structure, data types, and the constraints on the database.
Eg.,STUDENT database schema

Page 8
Database Systems 17CIC53

Schema Diagram: An illustrative display of (most aspects of) a database schema.

Example: Schema Diagram for Orders database.

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.

Example of a database state:

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.

Schema is also called intension and State is also called extension.

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.

Database Languages and Interfaces


A DBMS supports a variety of users and must provide appropriate languages and interfaces for
each category of users.

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.,

Roles of Database Administrator

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.

Deciding the hardware device


Depending upon the cost, performance and efficiency of the hardware, it is DBA who have the duty of
deciding which hardware devise will suit the company requirement.

Managing Data Integrity


Data integrity should be managed accurately because it protects the data from unauthorized use. DBA
manages relationship between the data to maintain data consistency.

Decides Data Recovery and Back up method


If any company is having a big database, then it is likely to happen that database may fail at any instance.
It is require that a DBA takes backup of entire database in regular time span. DBA has to decide that how
much data should be backed up and how frequently the back should be taken.

Tuning Database Performance


Database performance plays an important role for any business. If user is not able to fetch data speedily
then it may loss company business. So by tuning an modifying sql commands a DBA can improves the
performance of database.

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.

Decides validation checks on data


DBA has to decide which data should be used and what kind of data is accurate for the company. So he
always puts validation checks on data to make it more accurate and consistence.

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.

Decides content of the database


A database system has many kind of content information in it. DBA decides fields, types of fields, and
range of values of the content in the database system. One can say that DBA decides the structure of
database files.

Provides help and support to user


If any user needs help at any time then it is the duty of DBA to help him. Complete support is given to the
users who are new to database by the DBA.

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.

Improve query processing performance


Queries made by the users should be performed speedily. As we have discussed that users need fast
retrieval of answers so DBA improves query processing by improving their performance.

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.

3. Explain the difference between logical and physical data independence

4. Explain the different types of end users.

5. Explain a simplified database system environment with diagram.


6. Define and explain the following terms with an example each:

i) Database Schema (Extension) ii) Schema Diagram

7. Define and explain the following terms with an example each:

i) Database State (Intention)


ii) Schema construct
8. Define the following terms:
i) Database ii) Database management system

9. Define and explain the following terms with an example each:

i) Data model

ii) Catalog

10. What is meta data? Explain with example.

11. What is data independence and how does a DBMS support it?

12. What are the advantages of DBMS over file systems?

13. What are the categories of Data Model?

14. Explain the different DBMS Interfaces

14. Explain the different DBMS Languages


15. Explain DDL and DML commands

Page 15

You might also like