Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
5 views10 pages

File System in DBMS

The document provides an overview of data, databases, and Database Management Systems (DBMS), explaining their definitions, components, and advantages over traditional file systems. It highlights the importance of data organization, management, and security provided by DBMS, as well as the different levels of database schema and data independence. Additionally, it describes the roles of users and the functions of a three-schema architecture in enhancing database design and maintenance.

Uploaded by

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

File System in DBMS

The document provides an overview of data, databases, and Database Management Systems (DBMS), explaining their definitions, components, and advantages over traditional file systems. It highlights the importance of data organization, management, and security provided by DBMS, as well as the different levels of database schema and data independence. Additionally, it describes the roles of users and the functions of a three-schema architecture in enhancing database design and maintenance.

Uploaded by

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

 Data:

Data refers to raw facts, figures, or information that can be recorded and processed. It
is the fundamental component that databases are designed to store and
manage. Examples of data include names, numbers, dates, images, or any other
piece of information.
 Database:
A database is an organized, systematic collection of related data, typically stored and
accessed electronically within a computer system. It provides a structured way to
store, retrieve, and manage large amounts of information efficiently. Databases can be
structured in various models, such as relational databases (using tables with rows and
columns) or NoSQL databases (using key-value pairs, documents, etc.).
 Database Management System (DBMS):
A DBMS is a software system designed to manage and interact with databases. It acts
as an interface between the user or applications and the database itself.
DBMS: A Database Management System (DBMS) is application software
that allows users to efficiently define, create, maintain and share databases.
Defining a database involves specifying the data types, structures and
constraints of the data to be stored in the database. Creating a database
involves storing the data on some storage medium that is controlled by
DBMS. Maintaining a database involves updating the database whenever
required to evolve and reflect changes in the miniworld and also generating
reports for each change.

File System
The file system is basically a way of arranging the files in a storage medium
like a hard disk. The file system organizes the files and helps in the retrieval
of files when they are required. File systems consist of different files which
are grouped into directories. The directories further contain other folders and
files. The file system performs basic operations like management, file
naming, giving access rules, etc.
NTFS(New Technology File System) , EXT(Extended File System).

A file system is a method an operating system uses to store, organize, and


manage files and directories on a storage device. Some common types of
file systems include:
 FAT (File Allocation Table): An older file system used by older versions
of Windows and other operating systems.
 NTFS (New Technology File System): A modern file system used by
Windows. It supports features such as file and folder permissions,
compression, and encryption.
 ext (Extended File System): A file system commonly used
on Linux and Unix-based operating systems.

Advantages of DBMS over 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
file system cannot control the redundancy of data as each user defines
and maintains the needed files for a specific application to run. There may
be a possibility that two users are maintaining the data of the same file for
different applications. Hence changes made by one user do not reflect in
files used by second users, which leads to inconsistency of data.
Whereas DBMS controls redundancy by maintaining a single repository of
data that is defined once and is accessed by many users. As there is no
or less redundancy, data remains consistent.
 Data sharing: The file system does not allow sharing of data or sharing is
too complex. Whereas in DBMS, data can be shared easily due to a
centralized system.
 Data concurrency: Concurrent access to data means more than one
user is accessing the same data at the same time. Anomalies occur when
changes made by one user get lost because of changes made by another
user. The file system does not provide any procedure to stop anomalies.
Whereas DBMS provides a locking system to stop anomalies to occur.
 Data searching: For every search operation performed on the file
system, a different application program has to be written. While DBMS
provides inbuilt searching operations. The user only has to write a small
query to retrieve data from the database.
 Data integrity: There may be cases when some constraints need to be
applied to the data before inserting it into the database. The file system
does not provide any procedure to check these constraints automatically.
Whereas DBMS maintains data integrity by enforcing user-defined
constraints on data by itself.
 System crashing: In some cases, systems might have crashed due to
various reasons. It is a bane in the case of file systems because once the
system crashes, there will be no recovery of the data that's been lost. A
DBMS will have the recovery manager which retrieves the data making it
another advantage over file systems.
 Data security: A file system provides a password mechanism to protect
the database but how long can the password be protected? No one can
guarantee that. This doesn't happen in the case of DBMS. DBMS has
specialized features that help provide shielding to its data.
 Backup: It creates a backup subsystem to restore the data if required.
 Easy Maintenance : It is easily maintainable due to its centralized nature.

Components of DBMS
The database management system can be divided into five
major components, they are:

1. Hardware
2. Software
3. Data
4. Procedures
5. Database Access Language
Let's have a simple diagram to see how they all fit together
to form a database management system.

1. Hardware

When we say Hardware, we mean computer, hard disks, I/O


channels for data, and any other physical component
involved before any data is successfully stored into the
memory.

When we run Oracle or MySQL on our personal computer,


then our computer's Hard Disk, our Keyboard using which we
type in all the commands, our computer's RAM, ROM all
become a part of the DBMS hardware.

2.Software

The software component encompasses the DBMS software


itself, the operating system, network software, and
application programs.The DBMS software is more like a
wrapper around the physical database, which provides us
with an easy-to-use interface to store, access and update
data.

The DBMS software is capable of understanding the Database


Access Language and intrepret it into actual database
commands to execute them on the DB.
MySQL, Oracle Database, and Microsoft SQL Server

3.Data

Data is that resource, for which DBMS was designed. The


motive behind the creation of DBMS was to store and utilise
data.

In a typical Database, the user saved Data is present


and meta data is stored.

Metadata is data about the data. This is information stored


by the DBMS to better understand the data stored in it.

For example: When I store my Name in a database, the


DBMS will store when the name was stored in the database,
what is the size of the name, is it stored as related data to
some other data, or is it independent, all this information is
metadata.

4.Procedures

Procedures are the rules and instructions that help users


interact with the DBMS. They guide users on how to
design, operate, and manage databases effectively.
This includes procedures to setup and install a DBMS, To
login and logout of DBMS software, to manage databases, to
take backups, generating reports etc.

5.Database Access Language

Database Access Language is a simple language designed to


write commands to access, insert, update and delete
data stored in any database.

A user can write commands in the Database Access


Language and submit it to the DBMS for execution, which is
then translated and executed by the DBMS.

User can create new databases, tables, insert data, fetch


stored data, update data and delete the data using the
access language.

6.Users
 Database Administrators: Database Administrator or
DBA is the one who manages the complete database
management system. DBA takes care of the security of
the DBMS, it's availability, managing the license keys,
managing user accounts and access etc.
 Application Programmer or Software
Developer: This user group is involved in developing
and desiging the parts of DBMS.
 End User: These days all the modern applications, web
or mobile, store user data. How do you think they do it?
Yes, applications are programmed in such a way that
they collect user data and store the data on DBMS
systems running on their server. End users are the one
who store, retrieve, update and delete data.

SCHEMA
A schema is like the blueprint of a database that describes its structure and how
data is logically stored and related.
A database schema logically describes a part or all of a database by displaying the data
structure in tables, fields, and relationships.

1. External level (front-end developer, user level)


2. Conceptual level (database designer, logical level)
3. Internal level (administrator, physical level)
External or View level
 This is the highest level of database abstraction.
 External or view level tells the actual view of data that is relevant to the particular
user.
 View/External level provides different views of the same DB for a specific user or
a group of users. For example, the view of faculty students is different than that
of faculty admin.
 External level development with the help of front-end programming (Javascript,
HTML, etc.)
 An external view provides powerful and flexible security by hiding some
information about the database from a particular user.

 Example: A student portal showing only student-related data, not the


entire university database.

2. Conceptual or Logical level


 The logical/conceptual level tells the structure of the entire database.
 The conceptual level acts as an intermediate layer between the physical
storage(DB) and external level.
 Database designer works on this layer, which provides the structure of the
database.
 Database any model (i.e., Relational or ER Model) can be used at this level,
which provides the structure of the database.
 Example: ER diagrams, relational tables, and schema definitions.

3. Internal or Physical level


 This is the lowest level of database abstraction.
 Database administrator works on this layer where it has complete control over
data.
 It describes how the physical data is actually stored (in the form of a file) in the
database and provides methods to access data from the database.
 It means that the changes in physical database storage devices (i.e., hard disks)
and the organization of the files on database storage devices are hidden from
application programs and users.

It specifies the actual code and syntax needed to create the


database structure. Essentially, it determines where and how the
data is stored in the physical storage medium.

Note: Data can be stored centrally or distributed in database storage. At the physical
level, data is stored in the form of a file. But it is viewed in the form of a table.

Physical DBMS schema level is responsible for the following tasks:


 Index tables.

 Identify which types of storage media to support.

 Determine where to write log files.

 Perform low-level authentication.

 Select what data types to implement and how.

Functions of Three Schema Architecture


 Data Abstraction – Hides physical details from the user.
 Data Independence – Changes at one level do not affect the other levels.
 Security & Access Control – Controls user-specific access through
external views.

Advantages of Three Schema Architecture


 Improved Data Independence (Logical & Physical)
 Better Database Design & Maintenance
 Enhanced Security with controlled access
 Simplified User Interaction through customized views

INSTANCE
The main difference between schema and instance is that schema is
a structural view of the database, while the instance is the
data stored in a database at a particular moment of time.

Aspect Database Schema Database Instance

Blueprint or design of the Actual data stored in the


Definition database structure database at a given time

Static (does not change Dynamic (changes with


Nature frequently) every data modification)

Structure (tables, columns, State of the data in the


Represents data types, relationships) database

Table definitions, data types, Actual rows of data in the


Example constraints tables

Data independence
in a DBMS refers to the capacity to modify the database schema at one level
without impacting the schema at another level. This means changes to the
physical storage or logical structure of the database can be made without
requiring corresponding adjustments to the applications that access the data.

You might also like