SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
Introductory Concepts of DBMS
Define the followingterms.
Data
Data is raw, unorganized facts that need to be processed.
Information
When data is processed, organized, structured or presented in a given context so as to make it
useful, it is called information.
Database
A Database is a collection of inter-related data.
DBMS (Database ManagementSystem)
Adatabasemanagementsystemisacollectionofinter-relateddataandsetofprograms to
manipulate thosedata.
DBMS = Database + Set of programs
Metadata
Metadata is data about data.
Datasuchastablename,columnname,datatype,authorizeduser anduseraccess privileges
for any table is called metadata for that table.
Data dictionary
Datadictionaryis an information repositorywhich contains metadata.
It is usually a part of the system catalog.
Data warehouse
Data warehouse is an information repository which stored data.
It is design to facilitate reporting and analysis.
Field
Afield is a character or group ofcharacters that haveaspecificmeaning.
It is also called a dataitem. It is represented inthe databasebya value.
ForExamplecustomerid,name,societyandcityareallfieldsforcustomerData.
Record
A record is a collection of logically related fields.
Forexamples,collectionoffields(id,name,society&city)formsarecordforcustomer.
Explain disadvantages of file system (file processing systems)
comparetoDatabasemanagementsystem. OR
Explain disadvantages of conventional file -based system compared
to Database management system.
Data Redundancy
It is possible that thesameinformationmay be duplicatedindifferent files. This leads to data
redundancy.
Data redundancy results in memory wastage.
For example, consider that some customers have both kinds of accounts - saving and
current. In this case, data about customers - name, address, e-mail, contact number - will be
duplicated in both files, file for saving accounts and file for current accounts. This leads to
requirement of higher storage space. In other words, same information will be stored in two
different locations (files). And, it wastes memory.
Data Inconsistency
Duetodataredundancy,it is possiblethat datamaynot beinconsistent state.
For example, consider that an address of some customer changes. And, that customer has both
kinds of accounts. Now, it is possible that this changed address is updated in only one file,
leaving address inother fileas it is. As aresult of this,samecustomer will have two different
addressesintwodifferent files,makingdatainconsistent.
Difficulty in AccessingData
Accessingdatais not convenient andefficient in fileprocessingsystem.
For example, suppose, there is a program to find information about all customers. But, what if
there is a need to find out all customers from some particular city. In this case, there are two
choices here: One, find out all customers using available program, and then extract the
needed customers manually. Second, develop new program to get required information.
Both options are not satisfactory.
For each and every different kind of data access, separate programs are required. This is neither
convenient norefficient.
Limited Data Sharing
Data are scattered in various files.
Different files may have different formats. And these files may be stored in different
folders(directories)maybeofdifferent computersofdifferent departments.
So,duetothisdataisolation,it isdifficult to sharedataamongdifferentapplications.
Integrity Problems
Data integrity means that the data contained in the database is both correct and
consistent. For this purpose, the data stored in database must satisfy certain types of
constraints (rules).
For example, a balance for any account must not be less than zero. Such constraints are enforced
in the system by adding appropriate code in application programs. But, when new constraints
are added, such as balance should not be less than Rs. 5000, application programs need to be
changed. But, it is not aneasy task tochange programs whenever required.
Atomicity Problems
Anyoperation ondatabasemust be atomic. This means, operation completes either 100% or
0%.
For example, a fund transfer from one account to another must happen in its entirely. But,
computer systems are vulnerable to failure, such as system crash, virus attack. If a system
failureoccursduringtheexecutionoffundtransferoperation,it maypossible that amount to
be transferred, say , Rs. 500, is debited from one account, but is not credited to another
account.
Thisleavesdatabaseininconsistentstate.But,itisdifficulttoensureatomicityinafile
processing system.
Concurrent Access Anomalies
Multiple users are allowed to access data simultaneously (concurrently). This is for the sake of
better performance and faster response.
Consider an operation to debit (withdrawal) an account. The program reads the old balance,
calculates the new balance, and writes new balance back to d atabase. Suppose an account has a
balance of Rs. 5000. Now, a concurrent withdrawal of Rs. 1000 and Rs. 2000 may leave the
balance Rs. 4000 or Rs. 3000 depending upon their completion time rather than the correct
value of Rs. 2000.
Here,concurrent dataaccess should beallowed undersomesupervision.
But, due to lack of co-ordination among different application programs, this is not
possible in file processing systems.
Security Problems
Database should be accessible to users in a limited way.
Eachusershouldbeallowedtoaccess dataconcerninghisapplicationonly.
For example, a customer can check balance only for his/her own account. He/She should
not have access for information about other accounts.
But,infileprocessingsystem,applicationprogramsareaddedinanadhocmannerby different
programmers.So,itisdifficulttoenforcesuchkindofsecurityconstraints.
Explain advantages (benefits) of DBMS over file management
system. OR
Explain purpose of database system.
Minimal Data Redundancy(Duplication)
Due to centralized database, it is possible to avoid unnecessary duplication of
information.
This leads to reduce data redundancy.
It prevents memorywastage.
It also reduces extra processing time to get required dat a.
Shared Data
Allauthorizeduserandapplication program can sharedatabaseeasily.
Data Consistency
Data inconsistency occurs due to data redundancy.
Withreduceddataredundancysuchtypeofdatainconsistencycanbeeliminated.
This results in improved data consistency.
Data Access
DBMS utilizes a variety of techniques to retrieve data.
Requireddatacan beretrievedbyprovidingappropriatequeryto theDBMS.
Thus,data can be accessed inconvenient and efficient manner.
Data Integrity
Data in database must be correct and consistent.
So,datastoredindatabasemust satisfycertaintypes ofconstraints (rules).
DBMSprovides different ways toimplement suchtypeofconstraints (rules).
This improves data integrity in a database.
Data Security
Database should be accessible to user in a limited way.
DBMSprovideswaytocontroltheaccesstodatafordifferentuseraccordingtotheir
requirement.
It prevents unauthorized access to data.
Thus, security can be improved.
Concurrent Access
Multiple users are allowed to access data simultaneously.
Concurrent accesstocentralizeddatacanbeallowedundersomesupervision.
This results inbetter performance of system andfaster response.
Guaranteed Atomicity
Anyoperationondatabasemustbeatomic.Thismeans,operationmustbeexecuted either
100% or0%.
This type of atomicity is guaranteed in DBMS.
List and explain the applications of DBMS.
Airlines and railways
Airlines and railways use online databases for reservation, and for displaying the
schedule information.
Banking
Banksusedatabasesforcustomerinquiry,accounts,loans,andothertransactions.
Education
Schools and colleges use databases for course registration, result, and other information.
Telecommunications
Telecommunication departments use databases to store information about the
communication network, telephone numbers, record of calls, for generating monthly bills,
etc.
Credit card transactions
Databases are used for keeping track of purchases on credit cards in order to generate monthly
statements.
E-commerce
Integration of heterogeneous information sources (for example, catalogs) for business activity
suchasonlineshopping,bookingof holidaypackage,consultingadoctor,etc.
Health care information systems and electronic patient record
Databases areusedformaintainingthepatient healthcaredetails inhospitals.
Digital libraries and digital publishing
Databases are used for management and delivery of large bodies of textual and
multimedia data.
Finance
Databasesareusedforstoringinformationsuchassales,purchasesofstocksandbonds or data
useful for online trading.
Sales
Databases areusedtostoreproduct, customerandtransaction details.
Human resources
Organizations use databases for storing information about their employees, salaries, benefits,
taxes, and for generating salary checks.
Describefunctions (responsibility,roles,andduties) ofDBAto handle
DBMS.
DBA
The full name of DBA is Database Administrator.
Database Administrator is a person in the organization who controls the design and the use of
database.
Functions or Responsibilities of DBA are as under:
Schema Definition
DBA defines the logical schema of the database.
A schema refers to the overall logical structure of the database.
According to this schema, database will be designed to store required data for an
organization.
Storage Structure and Access MethodDefinition
DBA decides how the data is to be represented in the database.
Basedonthis,storagestructureofthedatabaseandaccessmethodsofdataisdefined.
Defining Security and Integrity Constraints
DBA decides various security and integrity constraints.
DDLprovides facilities to specifying such constraints.
Granting of Authorization for Data Access
TheDBAdetermineswhich userneedsaccesstowhichpart ofthedatabase.
According to this, various types of authorizations (permissions) are granted to different users.
This is required to prevent unauthorized access of a database.
Liaison with Users
DBA is responsible to provide necessary data to user.
User should be able to write the external schema, using DDL.
Assisting Application Programmers
DBAprovidesassistancetoapplicationprogrammerstodevelopapplicationprograms.
Monitoring Performance
The DBA monitors performance of the system.
TheDBAensuresthatbetterperformanceismaintainedbymakingchangeinphysicalor logical
schema ifrequired.
Backup and Recovery
Database should not be lost or damaged.
ThetaskofDBAistobackingupthedatabaseonsomestoragedevicessuchasDVD,CD or
Magnetic Tape or remote servers.
Incaseoffailures,suchasfloodorvirusattack,Databaseisrecoveredfromthisbackup.
Explainthree levelsANSI SPARCDatabase System. OR
ExplainthreelevelDataabstraction.
The ANSI SPARC architecture dividedinto three levels:
1) External level
2) Conceptual level
3) Internal level
External
Level
Conceptual
Level
Internal
Level
Internal Level
Three levels ANSI SPARC Database System
View A
Conceptual View
View B
Internal View
This is the lowest level of the data abstraction.
It describes how the data are actuallystored on storage devices.
It is also known as a physical level.
The internal view is described byinternal schema.
Internalschema consists of definitionof stored record, method of representing the data field
and access method used.
Conceptual Level
This is the next higher level of the data abstraction.
Itdescribeswhatdataarestoredinthedatabaseandwhatrelationshipsexistamong those
data.
It is also known as a logical level.
Conceptual view is defined by conceptual schema. It describes all records and
relationship.
External Level
This is the highest level of data abstraction.
It is also known as view level.
It describes onlypart oftheentiredatabasethat aparticularenduserrequires.
External view is describes by external schema.
External schema consists ofdefinition oflogical records, relationship intheexternal view
andmethod of deriving the objects from the conceptual view.
This object includes entities, attributes and relationship.
ExplainMapping. OR
Explainexternalandinternalmapping. OR
What is mapping? Describe type of mapping.
Mapping
Theprocess of transforming requests and results between the three levels is called
mapping.
Types of Mapping
Conceptual/Internal Mapping
External/Conceptual Mapping
Conceptual/Internal Mapping
It relates conceptual schema with internal schema.
It defines correspondence between the conceptual schema and the database stored in physical
devices.
It specifieshowconceptualrecordsandfieldsarepresentedat theinternallevel.
If the structure of stored database is changed, then conceptual/internal mapping must be
changedaccordinglyand conceptualschemacanremain invariant.
There could be one mappingbetween conceptual and internal levels.
External/Conceptual Mapping
It relates each external schema with conceptual schema.
Itdefinescorrespondencebetweenaparticularexternalviewandconceptualschema.
If the structure of conceptual schema is changed, then external/conceptual mapping must be
changedaccordinglyandexternalschemacanremaininvariant.
Therecouldbeseveralmappings between externalandconceptual levels.
Explain Data Independence.
Data Independence
Data independency is the ability to modify a schema definition in one level without
affecting a schema definition in the next higher level.
Types of dataindependence
Physical dataindependence
Logical dataindependence
Physical data independence
Physicaldataindependenceallowschanginginphysicalstoragedevicesororganization of file
without change in the conceptual view or external view.
Modificationsattheinternallevelareoccasionallynecessarytoimproveperformance.
Physicaldataindependenceseparatesconceptuallevelfromtheinternallevel.
It is easy to achieve physical data independence.
Logical data independence
Logical data independence is the ability to modify the conceptual schema without
requiring any change in application programs.
Conceptualschemacanbechangedwithoutaffectingtheexisting externalschema.
Modificationsat thelogicallevelarenecessarywheneverthelogicalstructureofthe
database isaltered.
Logicaldataindependenceseparatesexternallevelfromtheconceptualview.
It is difficult to achieve logical data independence.
Explain different databaseusers.
There are four different database users.
Application programmers
These users are computer professionals who write application programs using some tools.
Sophisticated users
Theseusersinteractwithsystemwithout writingprogram.Theyformtheirrequestina
database querylanguage.
Specialized users
Theseuserswritespecializeddatabaseapplicationsthatdonotfitintothetraditional data
processingframework.
Naive users
These users are unsophisticated users who have very less knowledge of database system.
Theseusersinteract withthesystembyusingoneof theapplicationprogramsthat have been
writtenpreviously.
Examples,peopleaccessingdatabaseovertheweb,banktellers,clericalstaffetc.
Differentiate the DA and DBA.
DA (Data Administrator ) DBA (Database Administrator )
The data administrator is a person in the
organization who controls the data of the
database.
Thedatabaseadministratorisapersoninthe
organizationwhocontrolsthedesignandthe
use of thedatabase.
DA determines what data to be stored in
database based on requirements of the
organization.
DBA provides necessary technical support for
implementing a database.
DA is involved more in the requirements
gathering, analysis, and design phases.
DBA is involved more in the design,
development, testing and operational phases.
DA is a manager or some senior level person in an
organization who understands organizational
requirements with respectto
data.
DBAisatechnicalpersonhavingknowledgeof
database technology.
DA does not need to be a technical person, but
any kind of knowledge about database
technologycan bemorebeneficiary.
DBA does not need to be a business person, but
any kind of knowledge about a functionality of
an organization can be more
beneficiary.
DA is a business focused person, but, he/she
should understand more about the database
technology.
DBA is a technically focused person, but,
he/she should understand more about the
business to administer the databases
effectively.
Database Languages
A database system provides a data definition language to specify the database schema and a data
manipulation language to express database queries and updates. In practice, the data definition and
data manipulation languages are not two separate languages; instead they simply form parts of a single
database language, such as the widely used SQL language.
Data-Definition Language
We specify a database schema by a set of definitions expressed by a special language called a data-
definition language (DDL).
For instance, the following statement in the SQL language defines the account table:
create table account (account-number char(10), balance integer)
Execution of the above DDL statement creates the account table. In addition, it updates a special set of
tables called the data dictionary or data directory.
A data dictionary contains metadata—that is, data about data. The schema of a table is an example of
metadata. A database system consults the data dictionary before reading or modifying actual data.
We specify the storage structure and access methods used by the database system by a set of statements
in a special type of DDL called a data storage and definition language. These statements define the
implementation details of the database schemas, which are usually hidden from the users.
The data values stored in the database must satisfy certain consistency constraints. For example,
suppose the balance on an account should not fall below $100. The DDL provides facilities to specify
such constraints. The database systems check these constraints every time the database is updated.
Data-Manipulation Language
Data manipulation is
The retrieval of information stored in the database The insertion
of new information into the database The deletion of information
from the database
The modification of information stored in the database
A data-manipulation language (DML) is a language that enables users to access or manipulate data
as organized by the appropriate data model. There are basically two types:
Procedural DMLs require a user to specify what data are needed and how to get those data.
Declarative DMLs (also referred to as nonprocedural DMLs) require a user to specify what
data are needed without specifying how to get those data.
Declarative DMLs are usually easier to learn and use than are procedural DMLs. However, since
a user does not have to specify how to get the data, the database system has to figure out an efficient
means of accessing data. The DML component of the SQL language is nonprocedural.
A query is a statement requesting the retrieval of information. The portion of a DML that involves
information retrieval is called a query language. Although technically incorrect, it is common practice
to use the terms query language and data manipulation language synonymously.
This query in the SQL language finds the name of the customer whose customer-id is 192-83-
7465:
select customer.customer-name
from customer
where customer.customer-id = 192-83-7465
The query specifies that those rows from the table customer where the customer-id is
192-83-7465 must be retrieved, and the customer-name attribute of these rows must be displayed.
Queries may involve information from more than one table. For instance, the following query finds the
balance of all accounts owned by the customer with customer-id 192-83-
7465.
select account.balance
from depositor, account
where depositor.customer-id = 192-83-7465 and
depositor.account-number = account.account-number
There are a number of database query languages in use, either commercially or experimentally.
The levels of abstraction apply not only to defining or structuring data, but also to manipulating data. At
the physical level, we must define algorithms that allow efficient access to data. At higher levels of
abstraction, we emphasize ease of use. The goal is to allow humans to interact efficiently with the
system. The query processor component of the database system translates DML queries into
sequences of actions at the physical level of the database system.
Database Administrators and Database Users
A primary goal of a database system is to retrieve information from and store new information in the
database. People who work with a database can be categorized as database users or database
administrators.
Database Users and User Interfaces
There are four different types of database-system users, differentiated by the way they expect to interact
with the system. Different types of user interfaces have been designed for the different types of users.
Naive users are unsophisticated users who interact with the system by invoking one of the
application programs that have been written previously. For example, a bank teller who needs to
transfer $50 from account A to account B invokes a program called transfer. This program asks the teller
for the amount of money to be transferred, the account from which the money is to be transferred, and
the account to which the money is to be transferred.
As another example, consider a user who wishes to find her account balance over the World Wide Web.
Such a user may access a form, where she enters her account number. An application program at the
Web server then retrieves the account balance, using the given account number, and passes this
information back to the user. The typical user
interface for naive users is a forms interface, where the user can fill in appropriate fields of the form.
Naive users may also simply read reports generated from the database. Application programmers
are computer professionals who write application programs. Application programmers can choose from
many tools to develop user interfaces. Rapid application development (RAD) tools are tools that
enable an application programmer to construct forms and reports without writing a program. There are
also special types of programming languages that combine imperative control structures (for
example, for loops, while loops and if-then-else statements) with statements of the data manipulation
language. These languages, sometimes called fourth-generation languages, often include special features
to facilitate the generation of forms and the display of data on the screen. Most major commercial
database systems include a fourth generation language.
Sophisticated users interact with the system without writing programs. Instead, they form
their requests in a database query language. They submit each such query to a query processor,
whose function is to break down DML statements into instructions that the storage manager
understands. Analysts who submit queries to explore data in the database fall in this category.Online
analytical processing (OLAP) tools simplify analysts’ tasks by letting them view summaries of
data in different ways. For instance, an analyst can see total sales by region (for example, North, South,
East, and West), or by product, or by a combination of region and product (that is, total sales of each
product in each region). The tools also permit the analyst to select specific regions, look at data in
more detail (for example, sales by city within a region) or look at the data in less detail (for example,
aggregate products together by category).
Another class of tools for analysts is data mining tools, which help them find certain kinds of
patterns in data.
Specialized users are sophisticated users who write specialized database applications that do not fit
into the traditional data-processing framework.
Among these applications are computer-aided design systems, knowledge base and expert systems,
systems that store data with complex data types (for example, graphics data and audio data), and
environment-modeling systems.
Database Administrator
One of the main reasons for using DBMSs is to have central control of both the data and the programs
that access those data. A person who has such central control over the system is called a database
administrator (DBA). The functions of a DBA include:
Schema definition. The DBA creates the original database schema by executing a set of data
definition statements in the DDL.
Storage structure and access-method definition.
Schema and physical-organization modification. The DBA carries out changes to the
schema and physical organization to reflect the changing needs of the organization, or to alter the
physical organization to improve performance.
Granting of authorization for data access. By granting different types of authorization, the
database administrator can regulate which parts of the database various users can access. The
authorization information is kept in a special system structure that the database system consults
whenever someone attempts to access the data in the system.
Routine maintenance. Examples of the database administrator’s routine maintenance activities
are:
 Periodically backing up the database, either onto tapes or onto remote servers, to prevent loss of
data in case of disasters such as flooding.
 Ensuring that enough free disk space is available for normal operations, and upgrading disk
space as required.
 Monitoring jobs running on the database and ensuring that performance is not degraded by
very expensive tasks submitted by some users.
Data Models
Underlying the structure of a database is the data model: a collection of conceptual tools for describing
data, data relationships, data semantics, and consistency constraints.
A database model shows the logical structure of a database, including the relationships and constraints that
determine how data can be stored and accessed. Individual database models are designed based on the
rules and concepts of whichever broader data model the designers adopt. Most data models can be
represented by an accompanying database diagram.
The hierarchical model organizes data into a tree-like structure, where each record has a single
parent or root. Sibling records are sorted in a particular order. That order is used as the physical order for
storing the database. This model is good for describing many real-world relationships.
Network model
The network model builds on the hierarchical model by allowing many-to-many relationships between
linked records, implying multiple parent records. Based on mathematical set theory, the model is
constructed with sets of related records. Each set consists of one owner or parent record and one or more
member or child records. A record can be a member or child in multiple sets, allowing this model to
convey complex relationships. It was most popular in the 70s after it was formally defined by the
Conference on Data Systems Languages (CODASYL).
Entity-relationship model
This model captures the relationships between real-world entities much like the network model, but it isn’t
as directly tied to the physical structure of the database. Instead, it’s often used for designing a database
conceptually. Here, the people, places, and things about which data points are stored are referred to as
entities, each of which has certain attributes that together make up their domain. The cardinality, or
relationships between entities, are mapped as well.
Relational model
The most common model, the relational model sorts data into tables, also known as relations, each of
which consists of columns and rows. Each column lists an attribute of the entity in question, such as price,
zip code, or birth date. Together, the attributes in a relation are called a domain. A particular attribute or
combination of attributes is chosen as a primary key that can be referred to in other tables, when it’s called
a foreign key.
Each row, also called a tuple, includes data about a specific instance of the entity in question, such as a
particular employee.
The model also accounts for the types of relationships between those tables, including one-to-one, one-to-
many, and many-to-many relationships.
Object-oriented database model
This model defines a database as a collection of objects, or reusable software elements, with associated
features and methods. There are several kinds of object-oriented databases:
A multimedia database incorporates media, such as images, that could not be stored in a relational
database.
A hypertext database allows any object to link to any other object. It’s useful for organizing lots of
disparate data, but it’s not ideal for numerical analysis.
The object-oriented database model is the best known post-relational database model, since it incorporates
tables, but isn’t limited to tables. Such models are also known as hybrid database models.
Object-relational model
This hybrid database model combines the simplicity of the relational model with some of the advanced
functionality of the object-oriented database model. In essence, it allows designers to incorporate objects
into the familiar table structure.
Languages and call interfaces include SQL3, vendor languages, ODBC, JDBC, and proprietary call
interfaces that are extensions of the languages and interfaces used by the relational model.
Explain Database System Architecture.
Components of a DBMS
These functional units of a database system can be divided into two parts:
1. Query Processor Units(Components)
2. Storage ManagerUnits
Query Processor Units:
Query processor units deal with execution of DDL and DML statements.
 DDL Interpreter — Interprets DDL statements into a set of tables containing
metadata.
 DMLCompiler—TranslatesDMLstatementsintolowlevelinstructionsthatthe
query evaluation engineunderstands.
 Embedded DML Pre-compiler — Converts DML statements embedded inan
applicationprogramintonormalprocedurecaIlsin thehost language.
 Query Evaluation Engine — Executes low level instructions generated by DML
compiler.
Storage Manager Units:
Storagemanagerunitsprovideinterfacebetweenthelowleveldatastoredindatabase and the
application programs & queries submitted to the system.
 Authorization Manager — Checks theauthorityofusers toaccess data.
 Integrity Manager — Checks forthesatisfaction of theintegrityconstraints.
 Transaction Manager —Preserves atomicityandcontrols concurrency.
 File Manager — Manages allocation of space on disk storage.
 BufferManager —Fetchesdatafromdiskstoragetomemoryforbeingused.
In addition to these functional units, several data structures are required to implement physical
storage system. These are described below:
Data Files — To store user data.
Data Dictionary and System Catalog — Tostore metadata. It isusedheavily,almost foreach
andeverydatamanipulationoperation.So,it shouldbe accessedefficiently.
Indices — To provide faster access to data items.
Statistical Data —Tostorestatisticalinformationabout thedata inthe database.This
informationis usedbythequery processortoselect efficient ways toexecuteaquery.
buffer manager file manager
manager
manager
naive users
(tellers, agents,
web-users)
application
programmers
sophisticated
users
(analyst)
database administrator
use write use use
application
interfaces
application
program
query
tool
administra
-tion tool
compiler and
linker
DML compiler
and organizer
query processor
storage manager
disk storage
indices
data
Database System Architecture
application
code
engine
statistical data
data dictionary
interpreter
DML quiries
Application Tier
Explaindatabasesystem3tier architecturewithclear
diagram in detail.
Most widely used architecture is 3-tier architecture.
3-tierarchitecture separates it tier from each other on basis of users.
client
server
3 tier architecture
Database (Data) Tier
At this tier, only database resides.
Databasealongwithitsqueryprocessinglanguagessitsinlayer-3of3-tierarchitecture.
It also contains all relations and their constraints.
Application (Middle) Tier
At thistiertheapplicationserverandprogram,whichaccessdatabase,resides.
Forauserthisapplicationtierworksasabstractedviewofdatabase.
Usersareunawareofanyexistenceofdatabasebeyondapplication.
For database-tier, application tier is the user of it.
Database tier is not aware of any other user beyond application tier.
This tier works as mediator between the two.
User (Presentation) Tier
An end user sits on this tier.
From a users aspect this tier is everything.
He/shedoesn't knowabout anyexistenceorformofdatabasebeyondthislayer.
Atthislayermultipleviewsofdatabasecanbeprovidedbytheapplication.
Allviewsaregeneratedby anapplication,whichresidesinapplicationtier.
network
Presentation Tier
Database Tier

Weitere ähnliche Inhalte

Was ist angesagt?

Data and database administration(database)
Data and database administration(database)Data and database administration(database)
Data and database administration(database)welcometofacebook
 
Chapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management SystemChapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management SystemEddyzulham Mahluzydde
 
Database Design and Implementation
Database Design and ImplementationDatabase Design and Implementation
Database Design and ImplementationChristian Reina
 
Structure of dbms
Structure of dbmsStructure of dbms
Structure of dbmsMegha yadav
 
Data base management
Data base management Data base management
Data base management MiXvideos
 
data base management report
data base management report data base management report
data base management report shivam tripathi
 
Slide 4 dbms users
Slide 4 dbms usersSlide 4 dbms users
Slide 4 dbms usersVisakh V
 
Database design challenges conflicting goals
Database design challenges conflicting goalsDatabase design challenges conflicting goals
Database design challenges conflicting goalsmarkilyn
 
Database administrator types
Database administrator typesDatabase administrator types
Database administrator typesmichel9
 
Database design process
Database design processDatabase design process
Database design processTayyab Hameed
 
Library management
Library managementLibrary management
Library managementfarouq umar
 
Chapter 5 data processing
Chapter 5 data processingChapter 5 data processing
Chapter 5 data processingUMaine
 
Database User and Administrator
Database User and AdministratorDatabase User and Administrator
Database User and AdministratorA. S. M. Shafi
 

Was ist angesagt? (19)

Data and database administration(database)
Data and database administration(database)Data and database administration(database)
Data and database administration(database)
 
Advantages of DBMS
Advantages of DBMSAdvantages of DBMS
Advantages of DBMS
 
Chapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management SystemChapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management System
 
Database Design and Implementation
Database Design and ImplementationDatabase Design and Implementation
Database Design and Implementation
 
Structure of dbms
Structure of dbmsStructure of dbms
Structure of dbms
 
Data base management
Data base management Data base management
Data base management
 
data base management report
data base management report data base management report
data base management report
 
Slide 4 dbms users
Slide 4 dbms usersSlide 4 dbms users
Slide 4 dbms users
 
Databases
DatabasesDatabases
Databases
 
Database design challenges conflicting goals
Database design challenges conflicting goalsDatabase design challenges conflicting goals
Database design challenges conflicting goals
 
Users of dbms
Users of dbmsUsers of dbms
Users of dbms
 
Database administrator types
Database administrator typesDatabase administrator types
Database administrator types
 
Dba
DbaDba
Dba
 
Database design process
Database design processDatabase design process
Database design process
 
Chapter01 1
Chapter01 1Chapter01 1
Chapter01 1
 
Lesson02 database system architecture
Lesson02 database system architectureLesson02 database system architecture
Lesson02 database system architecture
 
Library management
Library managementLibrary management
Library management
 
Chapter 5 data processing
Chapter 5 data processingChapter 5 data processing
Chapter 5 data processing
 
Database User and Administrator
Database User and AdministratorDatabase User and Administrator
Database User and Administrator
 

Ähnlich wie DBMS unit 1

Relational database management systems
Relational database management systemsRelational database management systems
Relational database management systemsDatasoft Consulting
 
INTRODUCTION TO DATABASE
INTRODUCTION TO DATABASEINTRODUCTION TO DATABASE
INTRODUCTION TO DATABASECS_GDRCST
 
Advantages of database management system
Advantages of database management system Advantages of database management system
Advantages of database management system Nafeesa Naeem
 
Fundamentals of DBMS
Fundamentals of DBMSFundamentals of DBMS
Fundamentals of DBMSAhmed478619
 
Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)Vidyasagar Mundroy
 
Lecture 1&2(rdbms-ii)
Lecture 1&2(rdbms-ii)Lecture 1&2(rdbms-ii)
Lecture 1&2(rdbms-ii)Ravinder Kamboj
 
Advantages And Disadvantages Of Database System
Advantages And Disadvantages Of Database SystemAdvantages And Disadvantages Of Database System
Advantages And Disadvantages Of Database SystemMarisela Stone
 
Chap1-Introduction to database systems.ppt
Chap1-Introduction to database systems.pptChap1-Introduction to database systems.ppt
Chap1-Introduction to database systems.pptLisaMalar
 
Database Management Systems ( Dbms )
Database Management Systems ( Dbms )Database Management Systems ( Dbms )
Database Management Systems ( Dbms )Patty Buckley
 
Introduction To Database.ppt
Introduction To Database.pptIntroduction To Database.ppt
Introduction To Database.pptRithikRaj25
 
DBMS-1.pptx
DBMS-1.pptxDBMS-1.pptx
DBMS-1.pptxkingVox
 
Implementation of dbms
Implementation of dbmsImplementation of dbms
Implementation of dbmsPrashant Ranka
 
Data Warehousing AWS 12345
Data Warehousing AWS 12345Data Warehousing AWS 12345
Data Warehousing AWS 12345AkhilSinghal21
 
Database management system
Database management systemDatabase management system
Database management systemMidhun Abraham
 

Ähnlich wie DBMS unit 1 (20)

Unit3rd
Unit3rdUnit3rd
Unit3rd
 
Relational database management systems
Relational database management systemsRelational database management systems
Relational database management systems
 
INTRODUCTION TO DATABASE
INTRODUCTION TO DATABASEINTRODUCTION TO DATABASE
INTRODUCTION TO DATABASE
 
Dbms
DbmsDbms
Dbms
 
ms-11.pdf
ms-11.pdfms-11.pdf
ms-11.pdf
 
Advantages of database management system
Advantages of database management system Advantages of database management system
Advantages of database management system
 
Dbms
DbmsDbms
Dbms
 
Fundamentals of DBMS
Fundamentals of DBMSFundamentals of DBMS
Fundamentals of DBMS
 
Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)
 
Lecture 1&2(rdbms-ii)
Lecture 1&2(rdbms-ii)Lecture 1&2(rdbms-ii)
Lecture 1&2(rdbms-ii)
 
Advantages And Disadvantages Of Database System
Advantages And Disadvantages Of Database SystemAdvantages And Disadvantages Of Database System
Advantages And Disadvantages Of Database System
 
Chap1-Introduction to database systems.ppt
Chap1-Introduction to database systems.pptChap1-Introduction to database systems.ppt
Chap1-Introduction to database systems.ppt
 
Database Management Systems ( Dbms )
Database Management Systems ( Dbms )Database Management Systems ( Dbms )
Database Management Systems ( Dbms )
 
Introduction To Database.ppt
Introduction To Database.pptIntroduction To Database.ppt
Introduction To Database.ppt
 
DBMS-1.pptx
DBMS-1.pptxDBMS-1.pptx
DBMS-1.pptx
 
MS-CIT Unit 9.pptx
MS-CIT Unit 9.pptxMS-CIT Unit 9.pptx
MS-CIT Unit 9.pptx
 
Implementation of dbms
Implementation of dbmsImplementation of dbms
Implementation of dbms
 
Data Warehousing AWS 12345
Data Warehousing AWS 12345Data Warehousing AWS 12345
Data Warehousing AWS 12345
 
Dbms
DbmsDbms
Dbms
 
Database management system
Database management systemDatabase management system
Database management system
 

Kürzlich hochgeladen

Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLManishPatel169454
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 

Kürzlich hochgeladen (20)

Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 

DBMS unit 1

  • 1. Introductory Concepts of DBMS Define the followingterms. Data Data is raw, unorganized facts that need to be processed. Information When data is processed, organized, structured or presented in a given context so as to make it useful, it is called information. Database A Database is a collection of inter-related data. DBMS (Database ManagementSystem) Adatabasemanagementsystemisacollectionofinter-relateddataandsetofprograms to manipulate thosedata. DBMS = Database + Set of programs Metadata Metadata is data about data. Datasuchastablename,columnname,datatype,authorizeduser anduseraccess privileges for any table is called metadata for that table. Data dictionary Datadictionaryis an information repositorywhich contains metadata. It is usually a part of the system catalog. Data warehouse Data warehouse is an information repository which stored data. It is design to facilitate reporting and analysis. Field Afield is a character or group ofcharacters that haveaspecificmeaning. It is also called a dataitem. It is represented inthe databasebya value. ForExamplecustomerid,name,societyandcityareallfieldsforcustomerData. Record A record is a collection of logically related fields. Forexamples,collectionoffields(id,name,society&city)formsarecordforcustomer. Explain disadvantages of file system (file processing systems) comparetoDatabasemanagementsystem. OR Explain disadvantages of conventional file -based system compared to Database management system. Data Redundancy It is possible that thesameinformationmay be duplicatedindifferent files. This leads to data redundancy. Data redundancy results in memory wastage.
  • 2. For example, consider that some customers have both kinds of accounts - saving and current. In this case, data about customers - name, address, e-mail, contact number - will be duplicated in both files, file for saving accounts and file for current accounts. This leads to requirement of higher storage space. In other words, same information will be stored in two different locations (files). And, it wastes memory. Data Inconsistency Duetodataredundancy,it is possiblethat datamaynot beinconsistent state. For example, consider that an address of some customer changes. And, that customer has both kinds of accounts. Now, it is possible that this changed address is updated in only one file, leaving address inother fileas it is. As aresult of this,samecustomer will have two different addressesintwodifferent files,makingdatainconsistent. Difficulty in AccessingData Accessingdatais not convenient andefficient in fileprocessingsystem. For example, suppose, there is a program to find information about all customers. But, what if there is a need to find out all customers from some particular city. In this case, there are two choices here: One, find out all customers using available program, and then extract the needed customers manually. Second, develop new program to get required information. Both options are not satisfactory. For each and every different kind of data access, separate programs are required. This is neither convenient norefficient. Limited Data Sharing Data are scattered in various files. Different files may have different formats. And these files may be stored in different folders(directories)maybeofdifferent computersofdifferent departments. So,duetothisdataisolation,it isdifficult to sharedataamongdifferentapplications. Integrity Problems Data integrity means that the data contained in the database is both correct and consistent. For this purpose, the data stored in database must satisfy certain types of constraints (rules). For example, a balance for any account must not be less than zero. Such constraints are enforced in the system by adding appropriate code in application programs. But, when new constraints are added, such as balance should not be less than Rs. 5000, application programs need to be changed. But, it is not aneasy task tochange programs whenever required. Atomicity Problems Anyoperation ondatabasemust be atomic. This means, operation completes either 100% or 0%. For example, a fund transfer from one account to another must happen in its entirely. But,
  • 3. computer systems are vulnerable to failure, such as system crash, virus attack. If a system failureoccursduringtheexecutionoffundtransferoperation,it maypossible that amount to be transferred, say , Rs. 500, is debited from one account, but is not credited to another account. Thisleavesdatabaseininconsistentstate.But,itisdifficulttoensureatomicityinafile processing system. Concurrent Access Anomalies Multiple users are allowed to access data simultaneously (concurrently). This is for the sake of better performance and faster response. Consider an operation to debit (withdrawal) an account. The program reads the old balance, calculates the new balance, and writes new balance back to d atabase. Suppose an account has a balance of Rs. 5000. Now, a concurrent withdrawal of Rs. 1000 and Rs. 2000 may leave the balance Rs. 4000 or Rs. 3000 depending upon their completion time rather than the correct value of Rs. 2000. Here,concurrent dataaccess should beallowed undersomesupervision. But, due to lack of co-ordination among different application programs, this is not possible in file processing systems. Security Problems Database should be accessible to users in a limited way. Eachusershouldbeallowedtoaccess dataconcerninghisapplicationonly. For example, a customer can check balance only for his/her own account. He/She should not have access for information about other accounts. But,infileprocessingsystem,applicationprogramsareaddedinanadhocmannerby different programmers.So,itisdifficulttoenforcesuchkindofsecurityconstraints. Explain advantages (benefits) of DBMS over file management system. OR Explain purpose of database system. Minimal Data Redundancy(Duplication) Due to centralized database, it is possible to avoid unnecessary duplication of information. This leads to reduce data redundancy. It prevents memorywastage. It also reduces extra processing time to get required dat a. Shared Data Allauthorizeduserandapplication program can sharedatabaseeasily.
  • 4. Data Consistency Data inconsistency occurs due to data redundancy. Withreduceddataredundancysuchtypeofdatainconsistencycanbeeliminated. This results in improved data consistency. Data Access DBMS utilizes a variety of techniques to retrieve data. Requireddatacan beretrievedbyprovidingappropriatequeryto theDBMS. Thus,data can be accessed inconvenient and efficient manner. Data Integrity Data in database must be correct and consistent. So,datastoredindatabasemust satisfycertaintypes ofconstraints (rules). DBMSprovides different ways toimplement suchtypeofconstraints (rules). This improves data integrity in a database. Data Security Database should be accessible to user in a limited way. DBMSprovideswaytocontroltheaccesstodatafordifferentuseraccordingtotheir requirement. It prevents unauthorized access to data. Thus, security can be improved. Concurrent Access Multiple users are allowed to access data simultaneously. Concurrent accesstocentralizeddatacanbeallowedundersomesupervision. This results inbetter performance of system andfaster response. Guaranteed Atomicity Anyoperationondatabasemustbeatomic.Thismeans,operationmustbeexecuted either 100% or0%. This type of atomicity is guaranteed in DBMS. List and explain the applications of DBMS. Airlines and railways Airlines and railways use online databases for reservation, and for displaying the schedule information. Banking Banksusedatabasesforcustomerinquiry,accounts,loans,andothertransactions. Education Schools and colleges use databases for course registration, result, and other information. Telecommunications
  • 5. Telecommunication departments use databases to store information about the communication network, telephone numbers, record of calls, for generating monthly bills, etc. Credit card transactions Databases are used for keeping track of purchases on credit cards in order to generate monthly statements. E-commerce Integration of heterogeneous information sources (for example, catalogs) for business activity suchasonlineshopping,bookingof holidaypackage,consultingadoctor,etc. Health care information systems and electronic patient record Databases areusedformaintainingthepatient healthcaredetails inhospitals. Digital libraries and digital publishing Databases are used for management and delivery of large bodies of textual and multimedia data. Finance Databasesareusedforstoringinformationsuchassales,purchasesofstocksandbonds or data useful for online trading. Sales Databases areusedtostoreproduct, customerandtransaction details. Human resources Organizations use databases for storing information about their employees, salaries, benefits, taxes, and for generating salary checks. Describefunctions (responsibility,roles,andduties) ofDBAto handle DBMS. DBA The full name of DBA is Database Administrator. Database Administrator is a person in the organization who controls the design and the use of database. Functions or Responsibilities of DBA are as under: Schema Definition DBA defines the logical schema of the database. A schema refers to the overall logical structure of the database. According to this schema, database will be designed to store required data for an organization. Storage Structure and Access MethodDefinition DBA decides how the data is to be represented in the database. Basedonthis,storagestructureofthedatabaseandaccessmethodsofdataisdefined. Defining Security and Integrity Constraints DBA decides various security and integrity constraints. DDLprovides facilities to specifying such constraints.
  • 6. Granting of Authorization for Data Access TheDBAdetermineswhich userneedsaccesstowhichpart ofthedatabase. According to this, various types of authorizations (permissions) are granted to different users. This is required to prevent unauthorized access of a database. Liaison with Users DBA is responsible to provide necessary data to user. User should be able to write the external schema, using DDL. Assisting Application Programmers DBAprovidesassistancetoapplicationprogrammerstodevelopapplicationprograms. Monitoring Performance The DBA monitors performance of the system. TheDBAensuresthatbetterperformanceismaintainedbymakingchangeinphysicalor logical schema ifrequired. Backup and Recovery Database should not be lost or damaged. ThetaskofDBAistobackingupthedatabaseonsomestoragedevicessuchasDVD,CD or Magnetic Tape or remote servers. Incaseoffailures,suchasfloodorvirusattack,Databaseisrecoveredfromthisbackup. Explainthree levelsANSI SPARCDatabase System. OR ExplainthreelevelDataabstraction. The ANSI SPARC architecture dividedinto three levels: 1) External level 2) Conceptual level 3) Internal level External Level Conceptual Level Internal Level Internal Level Three levels ANSI SPARC Database System View A Conceptual View View B Internal View
  • 7. This is the lowest level of the data abstraction. It describes how the data are actuallystored on storage devices. It is also known as a physical level. The internal view is described byinternal schema. Internalschema consists of definitionof stored record, method of representing the data field and access method used. Conceptual Level This is the next higher level of the data abstraction. Itdescribeswhatdataarestoredinthedatabaseandwhatrelationshipsexistamong those data. It is also known as a logical level. Conceptual view is defined by conceptual schema. It describes all records and relationship. External Level This is the highest level of data abstraction. It is also known as view level. It describes onlypart oftheentiredatabasethat aparticularenduserrequires. External view is describes by external schema. External schema consists ofdefinition oflogical records, relationship intheexternal view andmethod of deriving the objects from the conceptual view. This object includes entities, attributes and relationship. ExplainMapping. OR Explainexternalandinternalmapping. OR What is mapping? Describe type of mapping. Mapping Theprocess of transforming requests and results between the three levels is called mapping. Types of Mapping Conceptual/Internal Mapping External/Conceptual Mapping Conceptual/Internal Mapping It relates conceptual schema with internal schema. It defines correspondence between the conceptual schema and the database stored in physical devices. It specifieshowconceptualrecordsandfieldsarepresentedat theinternallevel. If the structure of stored database is changed, then conceptual/internal mapping must be changedaccordinglyand conceptualschemacanremain invariant. There could be one mappingbetween conceptual and internal levels. External/Conceptual Mapping It relates each external schema with conceptual schema.
  • 8. Itdefinescorrespondencebetweenaparticularexternalviewandconceptualschema. If the structure of conceptual schema is changed, then external/conceptual mapping must be changedaccordinglyandexternalschemacanremaininvariant. Therecouldbeseveralmappings between externalandconceptual levels. Explain Data Independence. Data Independence Data independency is the ability to modify a schema definition in one level without affecting a schema definition in the next higher level. Types of dataindependence Physical dataindependence Logical dataindependence Physical data independence Physicaldataindependenceallowschanginginphysicalstoragedevicesororganization of file without change in the conceptual view or external view. Modificationsattheinternallevelareoccasionallynecessarytoimproveperformance. Physicaldataindependenceseparatesconceptuallevelfromtheinternallevel. It is easy to achieve physical data independence. Logical data independence Logical data independence is the ability to modify the conceptual schema without requiring any change in application programs. Conceptualschemacanbechangedwithoutaffectingtheexisting externalschema. Modificationsat thelogicallevelarenecessarywheneverthelogicalstructureofthe database isaltered. Logicaldataindependenceseparatesexternallevelfromtheconceptualview. It is difficult to achieve logical data independence. Explain different databaseusers. There are four different database users. Application programmers These users are computer professionals who write application programs using some tools. Sophisticated users Theseusersinteractwithsystemwithout writingprogram.Theyformtheirrequestina database querylanguage. Specialized users Theseuserswritespecializeddatabaseapplicationsthatdonotfitintothetraditional data processingframework. Naive users These users are unsophisticated users who have very less knowledge of database system. Theseusersinteract withthesystembyusingoneof theapplicationprogramsthat have been writtenpreviously. Examples,peopleaccessingdatabaseovertheweb,banktellers,clericalstaffetc.
  • 9. Differentiate the DA and DBA. DA (Data Administrator ) DBA (Database Administrator ) The data administrator is a person in the organization who controls the data of the database. Thedatabaseadministratorisapersoninthe organizationwhocontrolsthedesignandthe use of thedatabase. DA determines what data to be stored in database based on requirements of the organization. DBA provides necessary technical support for implementing a database. DA is involved more in the requirements gathering, analysis, and design phases. DBA is involved more in the design, development, testing and operational phases. DA is a manager or some senior level person in an organization who understands organizational requirements with respectto data. DBAisatechnicalpersonhavingknowledgeof database technology. DA does not need to be a technical person, but any kind of knowledge about database technologycan bemorebeneficiary. DBA does not need to be a business person, but any kind of knowledge about a functionality of an organization can be more beneficiary. DA is a business focused person, but, he/she should understand more about the database technology. DBA is a technically focused person, but, he/she should understand more about the business to administer the databases effectively. Database Languages A database system provides a data definition language to specify the database schema and a data manipulation language to express database queries and updates. In practice, the data definition and data manipulation languages are not two separate languages; instead they simply form parts of a single database language, such as the widely used SQL language. Data-Definition Language We specify a database schema by a set of definitions expressed by a special language called a data- definition language (DDL). For instance, the following statement in the SQL language defines the account table: create table account (account-number char(10), balance integer) Execution of the above DDL statement creates the account table. In addition, it updates a special set of tables called the data dictionary or data directory. A data dictionary contains metadata—that is, data about data. The schema of a table is an example of
  • 10. metadata. A database system consults the data dictionary before reading or modifying actual data. We specify the storage structure and access methods used by the database system by a set of statements in a special type of DDL called a data storage and definition language. These statements define the implementation details of the database schemas, which are usually hidden from the users. The data values stored in the database must satisfy certain consistency constraints. For example, suppose the balance on an account should not fall below $100. The DDL provides facilities to specify such constraints. The database systems check these constraints every time the database is updated. Data-Manipulation Language Data manipulation is The retrieval of information stored in the database The insertion of new information into the database The deletion of information from the database The modification of information stored in the database A data-manipulation language (DML) is a language that enables users to access or manipulate data as organized by the appropriate data model. There are basically two types: Procedural DMLs require a user to specify what data are needed and how to get those data. Declarative DMLs (also referred to as nonprocedural DMLs) require a user to specify what data are needed without specifying how to get those data. Declarative DMLs are usually easier to learn and use than are procedural DMLs. However, since a user does not have to specify how to get the data, the database system has to figure out an efficient means of accessing data. The DML component of the SQL language is nonprocedural. A query is a statement requesting the retrieval of information. The portion of a DML that involves information retrieval is called a query language. Although technically incorrect, it is common practice to use the terms query language and data manipulation language synonymously. This query in the SQL language finds the name of the customer whose customer-id is 192-83- 7465: select customer.customer-name from customer where customer.customer-id = 192-83-7465
  • 11. The query specifies that those rows from the table customer where the customer-id is 192-83-7465 must be retrieved, and the customer-name attribute of these rows must be displayed. Queries may involve information from more than one table. For instance, the following query finds the balance of all accounts owned by the customer with customer-id 192-83- 7465. select account.balance from depositor, account where depositor.customer-id = 192-83-7465 and depositor.account-number = account.account-number There are a number of database query languages in use, either commercially or experimentally. The levels of abstraction apply not only to defining or structuring data, but also to manipulating data. At the physical level, we must define algorithms that allow efficient access to data. At higher levels of abstraction, we emphasize ease of use. The goal is to allow humans to interact efficiently with the system. The query processor component of the database system translates DML queries into sequences of actions at the physical level of the database system. Database Administrators and Database Users A primary goal of a database system is to retrieve information from and store new information in the database. People who work with a database can be categorized as database users or database administrators. Database Users and User Interfaces There are four different types of database-system users, differentiated by the way they expect to interact with the system. Different types of user interfaces have been designed for the different types of users. Naive users are unsophisticated users who interact with the system by invoking one of the application programs that have been written previously. For example, a bank teller who needs to transfer $50 from account A to account B invokes a program called transfer. This program asks the teller for the amount of money to be transferred, the account from which the money is to be transferred, and the account to which the money is to be transferred. As another example, consider a user who wishes to find her account balance over the World Wide Web. Such a user may access a form, where she enters her account number. An application program at the Web server then retrieves the account balance, using the given account number, and passes this
  • 12. information back to the user. The typical user interface for naive users is a forms interface, where the user can fill in appropriate fields of the form. Naive users may also simply read reports generated from the database. Application programmers are computer professionals who write application programs. Application programmers can choose from many tools to develop user interfaces. Rapid application development (RAD) tools are tools that enable an application programmer to construct forms and reports without writing a program. There are also special types of programming languages that combine imperative control structures (for example, for loops, while loops and if-then-else statements) with statements of the data manipulation language. These languages, sometimes called fourth-generation languages, often include special features to facilitate the generation of forms and the display of data on the screen. Most major commercial database systems include a fourth generation language. Sophisticated users interact with the system without writing programs. Instead, they form their requests in a database query language. They submit each such query to a query processor, whose function is to break down DML statements into instructions that the storage manager understands. Analysts who submit queries to explore data in the database fall in this category.Online analytical processing (OLAP) tools simplify analysts’ tasks by letting them view summaries of data in different ways. For instance, an analyst can see total sales by region (for example, North, South, East, and West), or by product, or by a combination of region and product (that is, total sales of each product in each region). The tools also permit the analyst to select specific regions, look at data in more detail (for example, sales by city within a region) or look at the data in less detail (for example, aggregate products together by category). Another class of tools for analysts is data mining tools, which help them find certain kinds of patterns in data. Specialized users are sophisticated users who write specialized database applications that do not fit into the traditional data-processing framework. Among these applications are computer-aided design systems, knowledge base and expert systems, systems that store data with complex data types (for example, graphics data and audio data), and environment-modeling systems. Database Administrator One of the main reasons for using DBMSs is to have central control of both the data and the programs
  • 13. that access those data. A person who has such central control over the system is called a database administrator (DBA). The functions of a DBA include: Schema definition. The DBA creates the original database schema by executing a set of data definition statements in the DDL. Storage structure and access-method definition. Schema and physical-organization modification. The DBA carries out changes to the schema and physical organization to reflect the changing needs of the organization, or to alter the physical organization to improve performance. Granting of authorization for data access. By granting different types of authorization, the database administrator can regulate which parts of the database various users can access. The authorization information is kept in a special system structure that the database system consults whenever someone attempts to access the data in the system. Routine maintenance. Examples of the database administrator’s routine maintenance activities are:  Periodically backing up the database, either onto tapes or onto remote servers, to prevent loss of data in case of disasters such as flooding.  Ensuring that enough free disk space is available for normal operations, and upgrading disk space as required.  Monitoring jobs running on the database and ensuring that performance is not degraded by very expensive tasks submitted by some users. Data Models Underlying the structure of a database is the data model: a collection of conceptual tools for describing data, data relationships, data semantics, and consistency constraints. A database model shows the logical structure of a database, including the relationships and constraints that determine how data can be stored and accessed. Individual database models are designed based on the rules and concepts of whichever broader data model the designers adopt. Most data models can be represented by an accompanying database diagram. The hierarchical model organizes data into a tree-like structure, where each record has a single
  • 14. parent or root. Sibling records are sorted in a particular order. That order is used as the physical order for storing the database. This model is good for describing many real-world relationships. Network model The network model builds on the hierarchical model by allowing many-to-many relationships between linked records, implying multiple parent records. Based on mathematical set theory, the model is constructed with sets of related records. Each set consists of one owner or parent record and one or more member or child records. A record can be a member or child in multiple sets, allowing this model to convey complex relationships. It was most popular in the 70s after it was formally defined by the Conference on Data Systems Languages (CODASYL). Entity-relationship model This model captures the relationships between real-world entities much like the network model, but it isn’t as directly tied to the physical structure of the database. Instead, it’s often used for designing a database conceptually. Here, the people, places, and things about which data points are stored are referred to as entities, each of which has certain attributes that together make up their domain. The cardinality, or relationships between entities, are mapped as well. Relational model The most common model, the relational model sorts data into tables, also known as relations, each of which consists of columns and rows. Each column lists an attribute of the entity in question, such as price, zip code, or birth date. Together, the attributes in a relation are called a domain. A particular attribute or combination of attributes is chosen as a primary key that can be referred to in other tables, when it’s called a foreign key. Each row, also called a tuple, includes data about a specific instance of the entity in question, such as a particular employee. The model also accounts for the types of relationships between those tables, including one-to-one, one-to- many, and many-to-many relationships. Object-oriented database model This model defines a database as a collection of objects, or reusable software elements, with associated features and methods. There are several kinds of object-oriented databases:
  • 15. A multimedia database incorporates media, such as images, that could not be stored in a relational database. A hypertext database allows any object to link to any other object. It’s useful for organizing lots of disparate data, but it’s not ideal for numerical analysis. The object-oriented database model is the best known post-relational database model, since it incorporates tables, but isn’t limited to tables. Such models are also known as hybrid database models. Object-relational model This hybrid database model combines the simplicity of the relational model with some of the advanced functionality of the object-oriented database model. In essence, it allows designers to incorporate objects into the familiar table structure. Languages and call interfaces include SQL3, vendor languages, ODBC, JDBC, and proprietary call interfaces that are extensions of the languages and interfaces used by the relational model. Explain Database System Architecture. Components of a DBMS These functional units of a database system can be divided into two parts: 1. Query Processor Units(Components) 2. Storage ManagerUnits Query Processor Units: Query processor units deal with execution of DDL and DML statements.  DDL Interpreter — Interprets DDL statements into a set of tables containing metadata.  DMLCompiler—TranslatesDMLstatementsintolowlevelinstructionsthatthe query evaluation engineunderstands.  Embedded DML Pre-compiler — Converts DML statements embedded inan applicationprogramintonormalprocedurecaIlsin thehost language.  Query Evaluation Engine — Executes low level instructions generated by DML compiler. Storage Manager Units: Storagemanagerunitsprovideinterfacebetweenthelowleveldatastoredindatabase and the application programs & queries submitted to the system.
  • 16.  Authorization Manager — Checks theauthorityofusers toaccess data.  Integrity Manager — Checks forthesatisfaction of theintegrityconstraints.  Transaction Manager —Preserves atomicityandcontrols concurrency.  File Manager — Manages allocation of space on disk storage.  BufferManager —Fetchesdatafromdiskstoragetomemoryforbeingused. In addition to these functional units, several data structures are required to implement physical storage system. These are described below: Data Files — To store user data. Data Dictionary and System Catalog — Tostore metadata. It isusedheavily,almost foreach andeverydatamanipulationoperation.So,it shouldbe accessedefficiently. Indices — To provide faster access to data items. Statistical Data —Tostorestatisticalinformationabout thedata inthe database.This informationis usedbythequery processortoselect efficient ways toexecuteaquery.
  • 17. buffer manager file manager manager manager naive users (tellers, agents, web-users) application programmers sophisticated users (analyst) database administrator use write use use application interfaces application program query tool administra -tion tool compiler and linker DML compiler and organizer query processor storage manager disk storage indices data Database System Architecture application code engine statistical data data dictionary interpreter DML quiries
  • 18. Application Tier Explaindatabasesystem3tier architecturewithclear diagram in detail. Most widely used architecture is 3-tier architecture. 3-tierarchitecture separates it tier from each other on basis of users. client server 3 tier architecture Database (Data) Tier At this tier, only database resides. Databasealongwithitsqueryprocessinglanguagessitsinlayer-3of3-tierarchitecture. It also contains all relations and their constraints. Application (Middle) Tier At thistiertheapplicationserverandprogram,whichaccessdatabase,resides. Forauserthisapplicationtierworksasabstractedviewofdatabase. Usersareunawareofanyexistenceofdatabasebeyondapplication. For database-tier, application tier is the user of it. Database tier is not aware of any other user beyond application tier. This tier works as mediator between the two. User (Presentation) Tier An end user sits on this tier. From a users aspect this tier is everything. He/shedoesn't knowabout anyexistenceorformofdatabasebeyondthislayer. Atthislayermultipleviewsofdatabasecanbeprovidedbytheapplication. Allviewsaregeneratedby anapplication,whichresidesinapplicationtier. network Presentation Tier Database Tier