0% found this document useful (0 votes)
4 views9 pages

1 Introduction

The document provides an overview of data, data persistence, and the role of databases and Database Management Systems (DBMS). It discusses the differences between file systems and DBMS, highlighting issues like data redundancy, access difficulties, and security. Additionally, it covers data models, database languages, user types, and the three-schema architecture, emphasizing the importance of data independence and data dictionaries in managing databases.

Uploaded by

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

1 Introduction

The document provides an overview of data, data persistence, and the role of databases and Database Management Systems (DBMS). It discusses the differences between file systems and DBMS, highlighting issues like data redundancy, access difficulties, and security. Additionally, it covers data models, database languages, user types, and the three-schema architecture, emphasizing the importance of data independence and data dictionaries in managing databases.

Uploaded by

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

What is Data?

• Data means know facts that can be recorded and that have implicit meaning
• In simple word Data is information
• In software system we manage data
• Manage data means storing ,processing and extracting data

What is Data Persistance in DBMS?


• Data persistance means existance/life of data
• Data that is required to manage needs to be stored somewhere until job is not over.
• We need to analyse that for how long we want data to persist in memory
• Some times we need data beyond the life of the program.

Data in Secondary Storage


• Data is sometimes needed to remain available even beyond the life of the program
• In such case data is stored in secondary storage like hard disk.

Files
• When data is stored in the secondary memory it is bound to reside in a le
• File is an operating system concept ,which makes separation among bundles of heterogeneous
data (song, photo etc)stored in the storage

What is Database
• A software application most of the times required to store relevant information in the secondary
storage(in the form of les)
• A database is a place where all your application related data is stored.
• One application data can be stored in a bunch of les
• We can say, database is a collection of les.

What is Database in DBMS?

DBMS is Database
Management System
• It is a collection of programs that enabes users to create & maintain a database
• DBMS is a general purpose(not related to the application directly, application may be library
management, railway management) s/w system

1

fi
fi
fi
fi
• DBMS facilitates the process of de ning(as a programmer/user we can use DBMS to de ne the
structrue where we can store our data, we can also mention datatype.)
• Constructing(we store data in the database )
• Manipulating (update database)
• & sharing databases( among various users and applications )

What is Database in DBMS?


• Di erent di cult issues are involving in le handling,Data may be corrupted, it is better to use
• ready made software.
• We can add Oracle s/w to our s/w to make it a total one s/w
• To communicate oracle software we need a language it is called SQL

Database system Vs File system


- Data redundancy and inconsistency –
• Redundancy is the concept of repetition of data i.e. each data
may have more than a single copy.The le system cannot control redundancy of data as each
user de nes and maintains the needed les for a speci c application to run. There may be a
possibility that two users are maintaining same les data for di erent applications.Hence
changes made by one user does not re ect in les used by second users, which leads to
inconsistency of data.
• Whereas DBMS controls redundancy by maintaining a single repository of data that is de ned
once and is accessed by many users. As there is no or less redundancy, data remains
consistent.

If the Spellings of name of customer are


di erent in di erent le then there may be
redundancy though they are same Customer

- Di culty in accessing data:


• Accessing data is not convenient and e cient in le processing system.
• Conventional le-processing environments do not allow needed data to be retrieved in a
convenient and e cient manner. So the data extraction process is complicated here
• Need to write a new program to carry out each new task

Example:
• in case of le processing system there are suppose some programming has been made
• to nd out the maximum marks in mathematics:
• But if the respective user want to nd out maximum marks in physics
• in that case i shall have to do manually or shall have to rewrite the program
• In case of DBMS we can easily execute SQL query

2

ff
ff
fi
ffi
fi
fi
ffi
ff
fi
ffi
fi
fi
fi
fi
fl
ffi
fi
fi
fi
fi
fi
fi
ff
fi
fi
- Isolation:
• Data are scattered in various les, les may be in di erent format
• Writing new application program to retrieve the appropriate data is di cult.
Example:
• Sex of a person in one data le written as male/female of the type text/string or varchar But in
other data le M/F of the type char
• So,whenever we are trying to fetch value of sex then I shall have to notice that from which data le
I am reading sex ,accordingly the data type will be decided. This sort of data isolation problem are
there.
• But in the case of DBMS,we shall de ne the sex in rst table,and in other table where we require
the eld sex we can go for attribute inheritance.So there will be no mismatch of the format of sex.

- Atomicity:
• DBMS makes sure either the transaction is fully complete or it is rolled back to the previous
committed state.
• It does not allow the system to be in a partially committed state.
Example:

- Concurrent access anomalies:


• Many systems, allow multiple users to update the data simultaneously
• In such environment ,interaction of concurrent updates may result in inconsistent data.

- Security problem
• Di erent access privileges has to be provided for di erent users.This is di cult while
• dealing with at les
• In DBMS this problem is resolved by providing di erent views of the database

3

ff
fi
fi
fl
fi
fi
fi
fi
fi
ff
ff
fi
ff
ffi
ffi
fi
-Instances
and schemas
Instances:
• Database change over time as imformation is inserted & deleted.
• The collection of information stored in the database at a particular moment is called an instances
of the database.
Schema:
• The overall design of the database is called the database schema

Data models
1.Relational Data Model
2.Entity Relationship Model
3.Object Based Data Model
4.Semi structured Data Model
Data models
Database model is a logical frame in which data is stored
The model also describes the relationships between di erent parts of the data

- Relational model:
• In this model data is organised in two dimensional tables called relations
• It was a collection of table to represent both data and the relationships among those data.
• If one attribute is common for both the table,through this attribute,these two tables are
• related.
Tables are known as relations

- The
Entity-
Relationship model:
• Entity: A set of objects that are distinguishable from others

4

ff
• Relationship:among entities are expressed using E-Rdagram
• Components:
1. Rectangle:Which represent entity sets
2. Ellipse or ovals: attributes of the entity
3. Diamonds: relationship among entity sets
4. Lines: Which link attributes to entity sets & entity sets to relationship

- Object Oriented model:


• Object: instances of a class
• Class:data+ method/function
1. Data can be accessed by the methods or functions associated with the object.
2. Message passing is used for communication between objects
3. Java,C++,C# have been become the dominant software methodologies

- Semi structured data model:


In many applications,data does not have a rigidly and prede ned schema
e.g., structured les,scienti c data, XML,JSON
What does Semi structured mean?
• Data that may be of any type
• Data that is variable in length(arrays)
• Structure that can rapidly and unpredictably change
• Usually self describing

Database languages
5


fi
fi
fi
DDL(Data De nation Language): DDL is used for specifying database schema
• To create database instance-CREATE
• To alter structure of database-ALTER
• To drop database instance-DROP
• To delete tables in a data-TRUNCATE
• To rename database instance-RENAME

DML(Data Manipulation Language):


DML is used for accessing and manipulating data in a DBMS.
• To read record(s) from table(s)-SELECT
• To insert record(s) into the table(s)-INSERT
• Update the data in table(s)-UPDATE
• Delete all records from the table-DELETE
DML is of two types:
Procedural DML- deals with what data are needed and how to get those data
Example:relational algebra.
Non Procedural DML-Require a user what data are needed without specifying how to get
those data
Example:Relational Calculus Tuple & domain.

DCL(Data Control Language):


DCL is used for granting and revoking user access on DBMS.
• To grant access to user-GRANT
• To revoke access from user-Revoke

Database Administrator(DBA)-
Schema De nition : The DBA creates the original database schema by executing a
set of data de nition statements in the DDL
Storage structure & data access method :What will be the storage structure
format, what will be the amount of storage required that will be handled/determined by DBA
Schema & Physical organization modi cation: The DBA carries out
changes to the schema & physical organization to re ect the changing needs of the
organization, or to alter the physical organization to improve performance
Granting of authorization for data access:By granting di erent types of
organization, the database administrator can regulate which part of the database various
user can access.
Routine maintainence:
• What will be the frequency/schedule for taking backup?
• Ensure whether the enough free storage is available for proper and successful operation
• Whether the system performance is getting degraded or not
• The system performance should be adequate so that the higher priority transaction will have
• successful compilation at earliest. etc are checked by DBA.
Database Users
Naive user:
6

fi
fi
fi
fi
fl
ff
• Are unsophisticated users
• Who interact with the system by invoking one of the applicationprograms that have been written
previously
• Clerks in any bank is a naive user because they don’t have any DBMS knowledge but they still
use the database and perform their given task.
Application programmers:
• Are computer professionals,who writes application programs
• Application programmers can choose from many tools to develop user interfaces
• They are the developers who interact with the database by means of DML queries.
Sophisticated user:
• They can develop their own data base applications according to their requirement.
• Sophisticated users can be engineers, scientists, business analyst, who are familiar with the
database.
Specialized users:
• Are sophisticated users who write specialized database applications
• This applications do not t into traditional data processing frame work
• Example:The users of CAD/CAM oriented appications, they are interacting with the database for a
certain speci c purpose only related to CAD/CAM .So they can be categorized as specialized user.

Three Schema Architecture


This architecture has three levels:
1. External level
2. Conceptual level
3. Internal level

1. External level
• It is also called view level.
• The reason this level is called “view” is because
several users can view their desired data from this
level
• The user doesn’t need to know the database
schema details such as data structure, table
de nition etc.
• User is only concerned about data which is what returned back to the view level after it has been
fetched from database (present at the internal level).
• External level is the “top level” of the Three Level DBMS Architecture.

2. Conceptual level
• It is also called logical level.
• The whole design of the database such as relationship among data, schema of data etc. are
described in this level.
• Database constraints and security are also implemented in this level of architecture.
• This level is maintained by DBA (database administrator)

7

fi
fi
fi
3. Internal level
• This level is also known as physical level.
• This level describes how the data is actually stored in the storage devices.
• This level is also responsible for allocating space to the data.
• This is the lowest level of the architecture.

Data Independence
Data independence can be explained using the three-
schema architecture.
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 two types of data independence:


1. Logical Data Independence
• Logical data independence refers characteristic of being able to change the conceptual schema
without having to change the external schema.
• Logical data independence is used to separate the external level from the conceptual view.
• If we do any changes in the conceptual view of the data, then the user view of the data would not
be a ected.
• Logical data independence occurs at the user interface level.
2. Physical Data Independence
• Physical data independence can be de ned as the capacity to change the internal schema without
having to change the conceptual schema.
• If we do any changes in the storage size of the database system server, then the Conceptual
structure of the database will not be a ected.
• Physical data independence is used to separate conceptual levels from the internal levels.

Data Dictionaries
• A data dictionary is a le or a set of les that includes a database's metadata.
• The data dictionary hold records about other objects in the database, such as data ownership,
data relationships to other objects, and other data.
• The data dictionary is an essential component of any relational database.
• Because of its importance, it is invisible to most database users. Typically, only database
administrators interact with the data dictionary.
Why Data dictionary is essential ?
• There are less information and details provided by data models. So, a data dictionary is very
essential and needed to have proper knowledge and usage of contents.
• Data Dictionary provides all information about names that are used in system models.
• Data Dictionary also provides information about entities, relationships, and attributes that are
present in system model.
• As a part of structured analysis and design tool, implementation of a data dictionary is done

8

ff
fi
fi
ff
fi
9

You might also like