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

Database Unit 1 Bca

Database of bata structure in bachelor of computer application

Uploaded by

shubhanjalsharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Database Unit 1 Bca

Database of bata structure in bachelor of computer application

Uploaded by

shubhanjalsharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

VISIONINSTITUTEOFTECHNOLOGY, ALIGARH

Subject: Database management system

Unit-1

Introduction to database management system

Database System Concepts, Database Users, and Architecture Introduction to Database


System with example, Introduction to Traditional File Oriented System, Characteristics of the
Database Approach, Components of Database System, Database Users, Advantages and
disadvantages of Using a DBMS, Structure of DBMS, Database Schemas and Instances ,
DBMS Architecture, Data Independence, Database Languages and Interfaces, Classification
of Database Management Systems

Page1 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1
Data: Data is a collection of the row facts.

Information: Processed data is known as the information.

Data Base: Database is software which store and manages the collection of information of all
objects in the business.

RDBMS: It is a collection of information of all related object with in the business is knows
as RDBMS.

Page2 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

Database Management System: data base which along data management system services is
knows as data base management.

SQL: Structured query language (SQL) is a programming language for storing and
processing information in a relational database. A relational database stores information in
tabular form, with rows and columns representing different data attributes and the various
relationships between the data values. You can use SQL statements to store, update, remove,
search, and retrieve information from.

Database Management System: DBMS is a software system that is designed to manage


and organize data in a structured manner. It allows users to create, modify, and query a
database, as well as manage the security and access controls for that database.

Page3 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

Page4 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

1. Data modeling: A DBMS provides tools for creating and modifying data models,
which define the structure and relationships of the data in a database.

2. Data storage and retrieval: A DBMS is responsible for storing and retrieving data
from the database, and can provide various methods for searching and querying the
data.

3. Concurrency control: A DBMS provides mechanisms for controlling concurrent


access to the database, to ensure that multiple users can access the data without
conflicting with each other.

4. Data integrity and security: A DBMS provides tools for enforcing data integrity and
security constraints, such as constraints on the values of data and access controls that
restrict who can access the data.

5. Backup and recovery: A DBMS provides mechanisms for backing up and


recovering the data in the event of a system failure.

6. DBMS can be classified into two types: Relational Database Management


System (RDBMS) and Non-Relational Database Management System
(NoSQL or Non-SQL)

7. RDBMS: Data is organized in the form of tables and each table has a set of rows and
columns. The data is related to each other through primary and foreign keys.

8. NoSQL: Data is organized in the form of key-value pairs, document, graph, or column-
based. These are designed to handle large-scale, high- performance scenarios.

Page5 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

Types of Database Users


..
1. Database Administrator(DBA):Database Administrator(DBA)is a
Person/team who defines the schema and also controls the 3levels of database.
The DBA will then create a new account id and password for the users if he/she need to
access the database .DBA is also responsible for providing security to the database and
he allows only the authorized users to access/modify the data base.DBA is responsible
for the problems such as security breaches and poor system response time.

 DBA also monitors the recovery and backup and provide technical support.
 The DBA has a DBA account in the DBMS which called as stem or super user
account.
 DBA repairs damage caused due to hardware and/or software failures.
 DBA is the one having privileges to perform DCL (Data Control Language)
operations such as GRANT and REVOKE, to allow/restrict a particular user from
accessing the database.

Page6 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

Page7 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

2. Naive / Parametric End Users :Parametric End Users are the unsophisticated who don’t
have any DBMS knowledge but they frequently use the database applications in their
daily life to get the desired results. For examples, Railway’s ticket booking users are
naive users. Clerks in any bank are a naive user because they don’t have any DBMS
knowledge but they still use the database and perform their given task.

3. Sophisticated Users: Sophisticated users can be engineers, scientists, business analyst,


who are familiar with the database. They can develop their own database applications
according to their requirement. They don’t write the program code but they interact the
database by writing SQL queries directly through the query processor.

4. Database Designers: Data Base Designers are the users who design the structure of
database which includes tables, indexes, views, triggers, stored procedures and constraints
which are usually enforced before the database is created or populated with data. He/she
controls what data must be stored and how the data items to be related. It is responsibility
of Database Designers to understand the requirements of different user groups and then
create a design which satisfies the need of all the user groups.

5. Application Programmers: Application Programmers also referred as System Analysts


or simply Software Engineers, are the back-end programmers who writes the code for the
application programs. They are the computer professionals. These programs could be
written in Programming languages such as Visual Basic, Developer, C, FORTRAN,
COBOL etc. Application programmers design, debug, test, and maintain set of programs
called “canned transactions” for the Naive (parametric) users in order to interact with
database.

6. Specialized users: Specialized users are sophisticated users who write specialized
database application that does not fit into the traditional data- processing framework.
Among these applications are computer aided-design systems, knowledge-base and expert
systems etc.

DBMSArchitecture1-level,2-Level,3-Level

A Database stores a lot of critical information to access data quickly and securely. Hence it is
important to select the correct architecture for efficient data management. DBMS
Architecture helps users to get their requests done while connecting to the database. We
choose database architecture depending on several factors like the size of the database,
number of users, and relationships between the users. There are two types of data base
models that we generally use.

Page8 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

Page9 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

Are logical model and physical model. Several types of architecture are there in the database
which we will deal with in the next section.
Types of DBMS Architecture
There are several types of DBMS Architecture that we use according to the usage requirements. Types of
DBMS Architecture are discussed here.

 1-TierArchitecture
 2-TierArchitecture
 3-TierArchitecture

1- Tier Architecture
In 1-Tier Architecture the database is directly available to the user, the user can directly sit on
the DBMS andesitic that is, the client, server, and Database a real present on the same
machine. For Example: to learn SQL we set up an SQL server and the database on the local
system. This enables us to directly interact with the relational database and execute
operations .The industry won’t use this architecture they logically go for 2-Tier and 3-Tier
Architecture.

Advantagesof1-TierArchitecture
Below mentioned are the advantages of 1-Tier Architecture.
 Simple Architecture: 1-TierArchitecture is the simplest architecture to setup, as only a
single machine is required to maintain it.
 Cost-Effective: No additionalhardwareisrequiredforimplementing1-Tier Architecture,
which makes it cost-effective.
 Easy to Implement: 1-Tier Architecture can be easily deployed, and hence it is mostly
used in small projects.
2- Tier Architecture
The 2-tier architecture is similar to a basic client. The application at the
clientenddirectlycommunicateswiththedatabaseontheserverside.APIslikeODBC and JDBC are
used for this interaction. The server side is responsible for providing query processing and
transaction management functionalities. On the client side, the user interfaces and application
programs are run. The application on the client side establishes a connection with the server
side in order to communicate with the DBMS. An advantage of this type is that maintenance
and understanding are easier, and compatible with existing systems. However, this model
gives poor performance when there are a large number of users.

Page10 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

DBMS 2-TierArchitecture

Advantagesof2-TierArchitecture

 Easy to Access: 2-Tier Architecture makes easy access to the database, which makes fast
retrieval.
 Scalable: We can scale the database easily, by adding client so by up grading hardware.
 Low Cost: 2-Tier Architecture is cheaper than 3-Tier Architecture and Tier Architecture.
 EasyDeployment:2-Tier Architecture is easy to deploy than3-TierArchitecture.
 Simple:2-Tier Architecture is easily understandable as well as simple because of only
two components.

3- Tier Architecture
In3-Tier Architecture, there is another layer between the client and the server. The client does
not directly communicate with the server. Instead, it interacts with an application server
which further communicates with the database system and then the
queryprocessingandtransactionmanagementtakesplace.Thisintermediatelayeracts as a medium
for the exchange of partially processed data between the server and the client. This type of
architecture is used in the case of large web applications.

Page11 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

DBMS 3-TierArchitecture

Advantagesof3-TierArchitecture

 Enhanced scalability: Scalability is enhanced due to distributed deployment of


application servers. Now, individual connections need not be made between the client and
server Data Integrity: 3-Tier Architecture maintains Data Integrity. Since there is a
middle layer between the client and the server, data corruption can be avoided/removed.
 Security: 3-TierArchitectureImprovesSecurity.Thistypeofmodelprevents direct
interaction of the client with the server thereby reducing access to unauthorized data.

Disadvantagesof3-TierArchitecture

 MoreComplex:3-Tier Architecture is more complex in comparison to 2-Tier


Architecture. Communication Points are also doubled in 3-Tier Architecture.
 Difficult to Interact: It becomes difficult for this sort of interaction to take place due to
the presence of middle layers.
For more, you can refer to the Advantages and Disadvantages of 3-T

Page12 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

Characteristics of the Database Approach.


Overview:
There are different characteristics of the database approach from the much older approach of
programming with files. In a traditional file processing system, each user defines and
implements its own modifications to the files needed for a selected software application as a
part of programming the appliance. In the database approach, one repository maintains data
which is defined once then accessed by various users in that database. In a file system, it will
be independently like an application that is free to name elements. In comparison, during a
database, the names or labels of knowledge are defined once and used repeatedly by queries,
transactions, and applications.

Characteristics of database approach Some of the most important characteristics of the


database approach to the file processing approach are the following as follows.

Page13 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

Approach-1

Self-Describing Nature of a Database System:


 One of the most fundamental characteristics of the database approach is that the database
system contains not only the database itself but also an entire definition or description of
the database structure and constraints also known as metadata of the database.
 This definition is stored within the DBMS Catalogs, which contains information like the
structure of every file, storage format of every data item, and various constraints/rules on
the information.
 The knowledge stored within the Catalogs is named meta-data, and it describes the
structure of the first database The Catalogs is employed by the DBMS software and also
by database users such as database administrators who required knowing the information
about the database structure.
 A general-purpose DBMS software package is not written for a selected database
application. Therefore, it must ask the Catalogs to understand the structure of the files
during a specific database, like the sort and format of knowledge it will access.
 The DBMS software must work equally well with any number of database applications,
For example, a university database, a banking database, or a corporation database as long
as because the database definition is stored within the Catalogs In traditional file
processing, data definition is usually a part of the files. File processing software can
access only specific databases, Database Management software can access various
databases by extracting the

Page14 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1
Definitions or schemas from the Catalogs and using these definitions.

Approach-2
Isolation between Programs and Data, and Data Abstraction:
 In a traditional file processing system, the structure of database knowledge files is
embedded within the application programs, so any changes to the structure of a file may
require changing all programs that access that file.

 Against this, DBMS access programs don’t require such changes in most cases, so
independence is achieved between them.

 ThestructureofknowledgefilesisstoredwithintheDBMScatalogseparately from the


programs that access them. We call this property program-data independence.

 The characteristic that allows program-data independence and program- operation


independence is known as data abstraction.

 A DBMS provides users with a conceptual representation of knowledge that doesn’t


include much of the small print of how the information is stored or how the operations are
implemented internally. Informally, a knowledge model may be a sort of data abstraction
that won’t provide this conceptual representation.

 The information model uses logical concepts, like objects, their properties, and their
relationships between them, which will be easier for many users to know than memory
concepts or storage concepts. Hence, the information
modelhidesstorageandimplementationdetailsthatarenotofinteresttomost database users, so
unnecessary complications are hidden from them.

Approach-3
Support for Multiple Views of the Data:
 A database sometimes has many users, each of whom may require a special perspective
or view of the database.
 A view could also be a subset of the database, or it’s going to contain virtual data that is
derived from the database files but isn’t explicitly stored.
 Some users might not get to remember whether the information they ask for is stored or
derived.
 A multi-user DBMS whose users have a spread of distinct applications must provide
facilities for outlining multiple views. This provides many benefits for large databases
such as the database.

Component of database:
1. Data: data is a very important component of the database system data is that
resources for which dbms were to store data and utilized data

Page15 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

Page16 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

Data may different types:


User data: it consists of table of data called relation where column are called field
attribute and row are called record for table.

Meta data: Meta data is a data that provide information about other data “in the other
word that it is a data about data.
Every we takes a photo and bunch of Meta data is gathered and saved with it data time file
name size and location etc.

Page17 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

Hardware: here the hardware means the physical part of the dbms and hardware includes
output device like printer monitor etc and storage device like hard disk

Software: the main component of a dbms is the software it is set of a program which is used
to manage the database. And control overall computerized database. Data base management
software provides easy to. Use interface that store the data and manage the database and
update the database
User:the user are the people who control and manage the database. And perform different
types of operation on the database
Procedure: the procedure is a type of general instruction or guideline for theuse of the
database management system this instruction includes how to set up the database.

Advantages Disadvantages

Data consistency is increased It requires more memory

Additional information can be derived from same data Multi user DBMS can be more expensive

Page18 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1
Performance can be poor
Database improves security
sometimes
Types of user

1. Application programmer: the user who write the application program in


programming language such as java, python language. And visualized the
database is called as application programmer.

Page19 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

2. Database administrator: a person who manage the overall data base is called
as DBA
3. End user: the end user are those who interact with the database management
system to perform different types of operation on the data by using the
different database commands like such as insert update delete

Schema: schema means logical representation of the data is called as the


schema

o The three schema architecture is also called ANSI/SPARC


architecture or three-level architecture.
o This frame work is used to describe the structure of a specific database system.
o The three schema architecture is also used to separate the user applications and
physical database.
o The three schema architecture contains three-levels. It breaks the database down into
three different categories.

The three-schema architecture is as follows:

Page20 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

o Properties of the schema: Its how’s the DBMS architecture.


o Mapping is used to transform the request and response between various database
levels of architecture.
o Mapping is not good for small DBMS because it takes more time

Page21 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

Data Independence
o Data independence can be explained using the three-schema architecture.
o Data independence refers characteristic of being able to modify the schema at one level of the database
system without altering the schema at the next higher level.

There are three types of data independence:

1. Logical Data Independence

o Logicaldataindependencereferscharacteristicofbeingabletochangethe conceptual schema without having to


change the external schema.
o Logicaldataindependenceisusedtoseparatetheexternallevelfromtheconceptual view.
o If we do any changes in the conceptual view of the data, then the user view of the data would not be
Page22 Faculty: KAJAL SAXENA
VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1
affected.
o Logical data independence occurs at the user interface level.

2. Physical Data Independence

o Physical data independence can be defined as the capacity to change the internal schema without having to
change the conceptual schema.
o If we do any changes in the storage size of the database system server, then the Conceptual structure of the
database will not be affected.
o Physical data independence is used to separate conceptual levels from the internal levels.
o Physical data independence occurs at the logical interface level.

Page23 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

Classification of Database Management System

Classification of database management system is based on various parameters such as the


kind of data model used to construct the DBMS, the number of users that will be using the
database system, the way in which the database is distributed. In the section ahead, we will be
discussing all the criteria on which the database system can be classified.

Classification of Database Management System

1. Based on Data Model

Page24 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

2. Based onNumberofUsers
3. BasedonDatabase Distribution

BasedonDataModel

The data model defines the physical and logical structure of a database which involves the
data types, the relationship among the data, constraints applied on the data and even the basic
operations specifying retrieval and updating of data in the database. Depending upon how the
data is structured, data models are further classified into:

a. RelationalDataModel

In the relational data model, we use tables to represent data and the relationship among that
data. Each of the tables in the relational data model has a unique name. A table has multiple
columns where each column name is unique. A table holds records which has value for each
column of the table.

We also refer to the relational database model as a record-based data model as it holds
records of fixed-format. The relational database model is the most currently used data model.

b. Entity-RelationshipModel

The Entity-Relationship model (E-R data model) represents data using objects and the
relationship among these objects. These objects are referred to as entities that represent the
real ‘thing’ or ‘object’ in the real world.

Each entity in the E-R model is distinguishable from other entities in the model. Like,
relational model, the E-R model is also used widely used to design the database.

c. Object-BasedDataModel

Nowadays,object-orientedprogrammingsuchasJava,C++,etc.iswidely usedtodevelop
mostofthesoftware.Thismotivatedthedevelopment of anobject-baseddatamodel.Theobject-
baseddatamodelisanextension

Page25 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

of the E-R model which also include notion for encapsulation, methods. Thereisalsoanobject-
relationaldatamodelwhichisacombinationofthe object-oriented data model and relational data
model.

d. SemistructuredDataModel

The semi structured data model is different from what we have studied
above.Inthesemistructureddatamodel,thedataitemsorobjectsofthe
samekindmighthaveadifferentsetofattributes.TheExtensibleMarkup Language represents the
semistructured data.

Before the above data model was introduced the data models like hierarchical data model and
network data model were used to design a database that is still used in some legacy
applications. The hierarchical
datamodelstoresthedataintheformofrecordsandusesatreestructure to represent these records.
The record is arranged in a tree structure where there is a single parent record for each child
record.

To overcome the shortcomings of the hierarchical data model network data model was
introduced which allow the multiple parent record for a single child
record.

2. ClassificationBasedonNumberofUsers:
Thedatabasemanagementsystemcanalsobeclassifiedonthebasisof
itsuser.So,aDBMScaneitherbeusedbyasingleuseroritcanbeused
bymultipleusers.Thedatabasesystemthatcanbeusedbyasingleuser atatimeisreferredtoasasingle-
usersystemandthedatabasesystem that can be used by multiple users at a time is referred to as
a

.
Multipleusersystem:

3. BasedonDatabase Distribution
Depending on the distribution of the database over numerous sites wecan classify the
database as:

a. CentralizedDBMS

Page26 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

In the centralized DBMS, the entire database is stored in a single computer site. Though the
centralized database support multiple users
stilltheDBMSsoftwareandthedatabotharestoresonasinglecomputer site.

b. DistributedDBMS:

In the distributed DBMS (DDBMS) the database and the DBMS software are distributed over
many computer sites. These computer sites are connected via a computer network. The
DDBMS is further classified as homogeneous DDBMS and heterogeneous DDBMS.

 HomogeneousDDBMS:ThehomogeneousDDBMShasthesame DBMS software at all the


distributed sites.
 HeterogeneousDDBMS:TheheterogeneousDDBMShasdifferent DBMS software for
different sites.

Page27 Faculty: KAJAL SAXENA


VISIONINSTITUTEOFTECHNOLOGY, ALIGARH
Subject: Database management system

Unit-1

Page28 Faculty: KAJAL SAXENA

You might also like