Database Unit 1 Bca
Database Unit 1 Bca
Unit-1
Unit-1
Data: Data is a collection of the row facts.
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.
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.
Unit-1
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.
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.
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.
Unit-1
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.
Unit-1
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.
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.
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.
Unit-1
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.
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.
Unit-1
DBMS 3-TierArchitecture
Advantagesof3-TierArchitecture
Disadvantagesof3-TierArchitecture
Unit-1
Unit-1
Approach-1
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.
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
Unit-1
Unit-1
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.
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
Additional information can be derived from same data Multi user DBMS can be more expensive
Unit-1
Performance can be poor
Database improves security
sometimes
Types of user
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
Unit-1
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.
Unit-1
affected.
o Logical data independence occurs at the user interface level.
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.
Unit-1
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
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
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.
Unit-1