0% found this document useful (0 votes)
16 views

chapter 1 new for students

Uploaded by

sujeet.p
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)
16 views

chapter 1 new for students

Uploaded by

sujeet.p
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/ 41

Introduction Database Concepts

Dr. Jyoti Wadmare


Contents
• Introduction
• Characteristics and applications of databases
• File system v/s Database system
• Data abstraction and data Independence
• DBMS system architecture
• Database Administrator
• Traditional database applications, in which most of the information that is stored and
accessed is either textual or numeric
• bank to deposit or withdraw funds
• hotel or airline reservation,
• access a computerized library catalog to search for a bibliographic item
• purchase something online—such as a book, toy, or computer.
• Even purchasing items at a supermarket often automatically updates the database that
holds the inventory of grocery items

• Multimedia databases -store images, audio clips, and video streams digitally. These types
of files are becoming an important component.

• Geographic information systems (GIS) can store and analyze maps, weather data, and
satellite images.

• Data warehouses and online analytical processing (OLAP) systems are used in many
companies to extract and analyze useful business information from very large databases
to support decision making.
DBMS
• Definition: It is collection of interrelated data and a set of programs to
access those data.
• The collection of data- database, contains information relevant to the
enterprise.
• The primary goal of the DBMS is to provide a way to store and retrieve
database information that is convenient and efficient.
• Database system must ensure the safety of the information stored,
despite system crashes or unauthorized access
• If data are to be shared among several users, the system must avoid
possible anomalous results.
• A database that stores Student and course information
Characteristics of Database Approach

FILE SYSTEM APPROACH:


Eg. Exam Department, may keep files on students and their grades.
A second user, Account Department, may keep track of students’ fees and their payments.

Although both users are interested in data about students, each user maintains separate files

each requires some data not available from the other user’s files.
This redundancy in defining and storing data results in wasted storage space
Characteristics of Database Approach(cont…)
In the database approach, a single repository maintains data that is
defined once and then accessed by various users.

In file systems, each application is free to name data elements


independently.

In contrast, in a database, the names or labels of data are defined


once, and used repeatedly by queries, transactions, and applications.
Characteristics of Database Approach(cont…)
The main characteristics of the database approach versus the file-
processing approach are the following:

■ Self-describing nature of a database system


■ Insulation between programs and data, and data abstraction
■ Support of multiple views of the data
■ Sharing of data and multi user transaction processing
1.Self-Describing Nature of a Database System

A DBMS catalog stores the description of a particular database


(e.g. data structures, types, and constraints)
• The description is called meta-data.
• This allows the DBMS software to work with different database
applications.

Figure 1.1, the DBMS catalog will store the


definitions of all the files shown.
Figure 1.2 shows some sample entries in a database catalog

These definitions are specified by the database designer prior to creating the actual database and are 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
2.Insulation between Programs and Data, and Data Abstraction
1)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.

The structure of data files is stored in the DBMS catalog separately from the
access programs. We call this property program-data independence

The characteristic that allows program-data independence and program-


operation independence is called data abstraction.
Internal storage format for a STUDENT record

In DBMS: Here we can add new data item as Date of birth without
affecting the application program
3.Support of Multiple Views of the Data
Each user may see a different view of the database, which
describes only the data of interest to that user.
Figure 1.2 may be interested only in accessing and printing the transcript of each
student; the view for this user is shown in Transcript.
A second user, who is interested only in checking that students have taken all the
prerequisites of each course for which they register, may require the view shown
in Figure Course_Prerequisites.
4. Sharing of Data and Multiuser Transaction Processing
The DBMS must include concurrency control to ensure that several users trying to
update the same data do so in a controlled manner .

These types of applications are generally called online transaction processing


(OLTP) applications
Eg. Online Airline/Railway ticket reservation system

DBMS must enforce several transaction properties


( program under execution)
i)Isolation ii)Atomicity
Database-System Applications
Enterprise Information

• Sales: For customer, product, and purchase information.


• Accounting: For payments, receipts, account balances, assets, and
other accounting information.
• Human resources: For information about employees, salaries,
payroll taxes, and benefits, and for generation of paychecks
• Manufacturing For management of the supply chain and for tracking
production of items in factories, inventories of items in warehouses and stores,
and orders for items.
Database-System Applications
• Banking and Finance
• Banking: For customer information, accounts, loans, and banking
transactions.
• Credit card transactions: For purchases on credit cards and generation of monthly
statements.
• Finance: For storing information about holdings, sales, and purchases of financial
instruments such as stocks and bonds; also for storing real-time market data to enable online
trading by customers and automated trading by the firm.
• Universities
• For student information, course registrations, and grades
• Airlines
• For reservations and schedule information. Airlines were among the first to use databases in
a geographically distributed manner.
Database-System Applications
• Telecommunication
• For keeping records of calls, texts, and data usage, generating monthly bills, maintaining
balances on prepaid calling cards, and storing information about the communication networks.
• Web-based services
• Social-media: For keeping records of users, connections between users(such as
friend/follows information), posts made by users, rating/like information about posts, etc.
• Online retailers: For keeping records of sales data and orders as for any retailer, but also for
tracking a user’s product views, search terms, etc., for the purpose of identifying the best
items to recommend to that user.
• Document databases
• For maintaining collections of new articles, patents, published research papers, etc.
• Navigation systems
• For maintaining the locations of varies places of interest along
with the exact routes of roads, train systems, buses, etc.
Advantages of DBMS over File System

• Controlling redundancy in data storage and in development and


maintenance efforts
• Sharing of data among multiple users
• Restricting unauthorized access to data
• Providing persistent storage for program objects
• Providing Storage Structures (e.g. indexes) for efficient Query
Processing
• Providing backup and recovery services
• Providing multiple interfaces to different classes of users
• Representing complex relationships among data
• Enforcing integrity constraints on the database
Comparison of File System with Database Approach
Comparison of File System with Database Approach
Data Abstraction
A database system is a collection of interrelated data and a set of programs
that allow users to access and modify these data.

A major purpose of a database system is to provide users with an abstract


view of the data.

That is, the system hides certain details of how the data are stored and
maintained.

Since many database-system users are not computer trained, developers


hide the complexity from users through several levels of abstraction
Levels of Abstraction
These three levels of data abstraction / DBMS Three Level
Architecture Diagram:

1. View Level/ External level


2. Conceptual Level/ Logical level
3. Physical Level/ internal level
1. Physical Level or Internal Level
This is the lowest level of data abstraction.
• It tells us how the data is actually
stored in physical memory (hard disks,
magnetic tapes etc).
• The access methods like sequential or
random access and file organization
methods like B+ trees, hashing used for
the organization purpose
• Developers would know usability, size of
memory, and accessing frequency which
makes easy to design this level.
• Blocks of storage and the amount of
memory used for these purposes is kept hidden from the user.
2. Conceptual or Logical Level
The conceptual level describes the structure of
the whole database.
• This level acts as a middle layer between the
physical storage and user view.
• It explains what data to be stored in the database,
what relationship exists among those data, and
what the data types are.
• There is only one conceptual schema per
database.
• Database administrator and the programmers use
the logical level of abstraction to decide what
information to keep in a database
3. External or View Level
• This is the highest level of database
abstraction
• This level describes user interaction with
database system
• Many users are not aware of technical
details of the system, and also they need
not access whole information from
database
Hence it is necessary to provide a
simple and short interface for such users as
per their requirements
• Multiple views can be created for same
database for multiple users
Levels of Abstraction
Example: Storing all employees information in employee table
• Physical level: Records can be described as blocks of storage(bytes,
gigabytes, terabytes etc) in memory. All these details are usually
hidden from developer
• Logical Level: Records can be described as fields/ attributes along
with their datatypes
• Relationship between these fields can be implemented logically
• Usually developer works at this level because they have all such
knowledge required
• View Level: Each user interacts with help of GUI and enters details
at screen
• User is not aware of how the data is stored and what data is stored, such
details are hidden from them
Data Independence
Definition: Capacity to change the schema at one level of a database
system without having change in schema at next higher level
• Data independence is not possible in file processing systems, as file
structure and application programs are tightly coupled together
• Data independence is possible in DBMS only because application
programs do not deal with data in database directly
• Three level DBMS illustrates two types of data independence :
• Physical Data Independence
• Logical Data independence
Data Independence(contd..)
Physical Data Independence
• It works in between Conceptual schema and Internal schema
• Ability to modify physical schema without changing the conceptual schema
• Modifications at the physical level are occasionally necessary to
improve performance
• New changes are absorbed by mapping techniques
Data Independence(contd..)
Logical Data Independence:
• It works in between Conceptual schema and external schema
• Ability to modify logical schema(conceptual schema) without causing external schema or application program to be
rewritten
• Modifications at logical level are necessary whenever the logical structure of database is altered
• Logical data independence means if we add some new columns or
remove columns from table then user view or program should not change
• Application program need not know:
• Ordering of data fields in a record
• Ordering of records in a file
• Size of each record
• Size of each field
• Format and type of each data item
• Whether file is sorted or not
Data Independence(contd..)
For example :
• Consider two users A & B. Both are selecting the fields
"EmployeeNumber" and "EmployeeName".
• If user B adds a new column (e.g. salary) to his table, it will not affect
the external view for user A, though the internal schema of the
database has been changed for both users A & B.
• Logical data independence is more difficult to achieve than physical
data independence, since application programs are heavily
dependent on the logical structure of the data that they access.
DBMS System Architecture

fhhhhhhhhhhhhhhhhhhhhh

• Client connects with database server with the help of JDBS-


ODBC Here Client /user interact with the system via interface, automatically
• Client send query and database server process that query. query Is generated while dealing with interface.
• Application program written in higher level language like Java,
this prog. Is processed in Database server Eg. Online booking
• It is also called as client server architecture. The query processing is done in the Application/business layer
Eg. Traditional way of Railway ticket booking at booking counter
Traditional banking Eg. Gmail
Adv: less maintenance
Problem: Scalability Adv. Scalable
Chances of bottleneck Secured
Security
Three tier Architecture: Advantages
In three tier architecture we can manage the data independently.
• Can make the changes in presentation layer without affecting other two tiers.
• As each tier is independent it is possible to use different groups of developers
• It is most secure since the client doesn't have direct access to the database layer.
• When one tier fails there is no data loss, because you are always secure by
accessing the other tier.
• Due to distributed deployment of application server, scalability is increased.
• It is reusable.
• It is robust and secure due to multiple layers.
Database Users
Database Users
Database Administrator
Thank You!!!

You might also like