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

Unit-2 ISM

The document discusses data, databases, files, and file systems. It defines data as facts and statistics that can be stored or transmitted over a network. A database is described as a collection of organized and interrelated data that can be efficiently retrieved, inserted, and deleted. A file system stores and organizes files in a storage device using conventions like file names and paths. It distinguishes databases from file systems by noting databases contain structured, related data while file systems hold unstructured files.

Uploaded by

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

Unit-2 ISM

The document discusses data, databases, files, and file systems. It defines data as facts and statistics that can be stored or transmitted over a network. A database is described as a collection of organized and interrelated data that can be efficiently retrieved, inserted, and deleted. A file system stores and organizes files in a storage device using conventions like file names and paths. It distinguishes databases from file systems by noting databases contain structured, related data while file systems hold unstructured files.

Uploaded by

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

UNIT -2

What is data?
• Data is nothing but facts and statistics stored or free flowing over a network, generally
it's raw and unprocessed.
• Data becomes information when it is processed, turning it into something meaningful.
• What is database: The database is a collection of inter-related data which is used to
retrieve, insert, and delete the data efficiently.
• It is also used to organize the data in the form of a table, schema, views, and reports,
etc.
• Using the database, you can easily retrieve, insert, and delete the information.
• For example: The college Database organizes the data about the admin, staff, students
and faculty etc.

Information:
Information is the processed data on which decisions and actions are based. Information can
be defined as the organized and classified data to provide meaningful values.

Eg: “The age of Ravi is 25”

File:
File is a collection of related data stored in secondary memory.

file system
In a computer, a file system -- sometimes written filesystem -- is the way in which files are
named and where they are placed logically for storage and retrieval. Without a file system,
stored information wouldn't be isolated into individual files and would be difficult to identify
and retrieve. As data capacities increase, the organization and accessibility of individual files
are becoming even more important in data storage.

Digital file systems and files are named for and modeled after paper-based filing systems using
the same logic-based method of storing and retrieving documents.

File systems can differ between operating systems (OS), such as Microsoft Windows, macOS
and Linux-based systems. Some file systems are designed for specific applications. Major types
of file systems include distributed file systems, disk-based file systems and special purpose file
systems.
How file systems work
A file system stores and organizes data and can be thought of as a type of index for all the data
contained in a storage device. These devices can include hard drives, optical drives, and flash
drives.

File systems specify conventions for naming files, including the maximum number of
characters in a name, which characters can be used and, in some systems, how long the file
name suffix can be. In many file systems, file names are not case sensitive.

Along with the file itself, file systems contain information such as the size of the file, as well
as its attributes, location, and hierarchy in the directory in the metadata. Metadata can also
identify free blocks of available storage on the drive and how much space is available.

Example of a file tree diagram

A file system also includes a format to specify the path to a file through the structure of
directories. A file is placed in a directory -- or a folder in Windows OS -- or subdirectory at the
desired place in the tree structure. PC and mobile OSes have file systems in which files are
placed somewhere in a hierarchical tree structure.

Before files and directories are created on the storage medium, partitions should be put into
place. A partition is a region of the hard disk or other storage that the OS manages separately.
One file system is contained in the primary partition, and some OSes allow for multiple
partitions on one disk. In this situation, if one file system gets corrupted, the data in a different
partition will be safe.

File system vs. DBMS


Like a file system, a database management system (DBMS) efficiently stores data that can be
updated and retrieved. The two are not interchangeable, however. While a file system stores
unstructured, often unrelated files, a DBMS is used to store and manage structured, related
data.

A DBMS creates and defines the restraints for a database. A file system allows access to single
files at a time and addresses each file individually. Because of this, functions such as
redundancy are performed on an individual level, not by the file system itself. This makes a
file system a much less consistent form of data storage than a DBMS, which maintains one
repository of data that is defined once.

The centralized structure of a DBMS allows for easier file sharing than a file system and
prevents anomalies that can occur when separate changes are made to files in a file system.

There are methods to protect files in a file system, but for heavy-duty security, a DBMS is the
way to go. Security in a file system is determined by the OS, and it can be difficult to maintain
over time as files are accessed and authorization is granted to users.

A DBMS keeps security constraints high, relying on password protection, encryption and
limited authorization. More security does result in more obstacles when retrieving data, so in
terms of general, simple-to-use file storage and retrieval, a file system may be preferred.

Introduction of DBMS (Database Management System)

What is Data?
In simple words, data can be facts related to any object in consideration. For example, your
name, age, height, weight, etc. are some data related to you. A picture, image, file, pdf, etc. can
also be considered data.

What is Database?
A database is a systematic collection of data. They support electronic storage and manipulation
of data. Databases make data management easy.

Let us discuss a database example: An online telephone directory uses a database to store data
of people, phone numbers, and other contact details. Your electricity service provider uses a
database to manage billing, client-related issues, handle fault data, etc.

Let us also consider Facebook. It needs to store, manipulate, and present data related to
members, their friends, member activities, messages, advertisements, and a lot more. We can
provide a countless number of examples for the usage of databases.

In other words, databases are used by an organization as a method of storing, managing and
retrieving information.
Types of Databases

Depending upon the usage requirements, there are following types of databases available in the market:

• Centralized database
• Distributed database
• Personal database
• End-user database
• Commercial database
• NoSQL database
• Operational database
• Relational database
• Cloud database
• Object-oriented database
• Graph database
Database Components

Database Components

There are five main components of a database:

Hardware
The hardware consists of physical, electronic devices like computers, I/O devices, storage
devices, etc. This offers the interface between computers and real-world systems.

Software
This is a set of programs used to manage and control the overall database. This includes the
database software itself, the Operating System, the network software used to share the data
among users, and the application programs for accessing data in the database.

Data
Data is a raw and unorganized fact that is required to be processed to make it meaningful. Data
can be simple at the same time unorganized unless it is organized. Generally, data comprises
facts, observations, perceptions, numbers, characters, symbols, images, etc.

Procedure
Procedure are a set of instructions and rules that help you to use the DBMS. It is designing and
running the database using documented methods, which allows you to guide the users who
operate and manage it.
Database Access Language
Database Access language is used to access the data to and from the database, enter new data,
update already existing data, or retrieve required data from DBMS. The user writes some
specific commands in a database access language and submits these to the database.

What is a Database Management System (DBMS)?


Database Management System (DBMS) is a collection of programs that enable its users to
access databases, manipulate data, report, and represent data. It also helps to control access to
the database. Database Management Systems are not a new concept and, as such, had been first
implemented in the 1960s.

Charles Bachman’s Integrated Data Store (IDS) is said to be the first DBMS in history. With
time database, technologies evolved a lot, while usage and expected functionalities of databases
increased immensely.

Disadvantage of DBMS
DBMS may offer plenty of advantages but, it has certain flaws-

• Cost of Hardware and Software of a DBMS is quite high which increases the budget of your
organization.
• Most database management systems are often complex systems, so the training for users to use
the DBMS is required.
• In some organizations, all data is integrated into a single database which can be damaged
because of electric failure or database is corrupted on the storage media.
• Use of the same program at a time by many users sometimes lead to the loss of some data.
• DBMS can’t perform sophisticated calculations.

Difference between File System and DBMS


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.

Example: NTFS (New Technology File System), EXT(Extended File System).


File System

DBMS (Database Management System)


Database Management System is basically software that manages the collection of related data.
It is used for storing data and retrieving the data effectively when it is needed. It also provides
proper security measures for protecting the data from unauthorized access. In Database
Management System the data can be fetched by SQL queries and relational algebra. It also
provides mechanisms for data recovery and data backup.

Example:

Oracle, MySQL, MS SQL server.

DBMS
Difference between File System and DBMS
Basics File System DBMS
The file system is a way of
DBMS is software for
Structure arranging the files in a storage
managing the database.
medium within a computer.
Redundant data can be present In DBMS there is no redundant
Data Redundancy
in a file system. data.
It doesn’t provide Inbuilt It provides in house tools for
Backup and Recovery mechanism for backup and backup and recovery of data
recovery of data if it is lost. even if it is lost.
There is no efficient query Efficient query processing is
Query processing
processing in the file system. there in DBMS.
There is more data consistency
There is less data consistency in
Consistency because of the process of
the file system.
normalization.
It has more complexity in
It is less complex as compared
Complexity handling as compared to the file
to DBMS.
system.
File systems provide less DBMS has more security
Security Constraints security in comparison to mechanisms as compared to file
DBMS. systems.
It has a comparatively higher
Cost It is less expensive than DBMS.
cost than a file system.
In DBMS data independence
exists, mainly of two types:

Data Independence There is no data independence. 1) Logical Data


Independence.

2)Physical Data Independence.


Only one user can access data at Multiple users can access data
User Access
a time. at a time.
The user has to write
The users are not required to
Meaning procedures for managing
write procedures.
databases
Data is distributed in many
Due to centralized nature data
Sharing files. So, it is not easy to share
sharing is easy
data.
It give details of storage and It hides the internal details of
Data Abstraction
representation of data Database
Integrity Constraints are Integrity constraints are easy to
Integrity Constraints
difficult to implement implement
To access data in a file , user
Attributes requires attributes such as file No such attributes are required.
name, file location.
Example Cobol, C++ Oracle, SQL Server

The main difference between a file system and a DBMS (Database Management System)
is the way they organize and manage data.
1. File systems are used to manage files and directories, and provide basic operations for
creating, deleting, renaming, and accessing files. They typically store data in a
hierarchical structure, where files are organized in directories and subdirectories. File
systems are simple and efficient, but they lack the ability to manage complex data
relationships and ensure data consistency.

2. On the other hand, DBMS is a software system designed to manage large amounts of
structured data, and provide advanced operations for storing, retrieving, and
manipulating data. DBMS provides a centralized and organized way of storing data,
which can be accessed and modified by multiple users or applications. DBMS offers
advanced features like data validation, indexing, transactions, concurrency control, and
backup and recovery mechanisms. DBMS ensures data consistency, accuracy, and
integrity by enforcing data constraints, such as primary keys, foreign keys, and data
types.

In summary, file systems are suitable for managing small amounts of unstructured data, while
DBMS is designed for managing large amounts of structured data, and offers more advanced
features for ensuring data integrity, security, and performance.

Data Models in DBMS


Data models in DBMS help to understand the design at the conceptual, physical, and
logical levels as it provides a clear picture of the data making it easier for developers to
create a physical database.

Data models are used to describe how the data is stored, accessed, and updated in a DBMS. A
set of symbols and text is used to represent them so that all the members of an organization can
understand how the data is organized. It provides a set of conceptual tools that are vastly used
to represent the description of data.

There are many types of data models that are used in the industry.

Types of Data Models in DBMS

Hierarchical Model

The hierarchical data model is one of the oldest data models, developed in the 1950s by IBM.
In this data model, the data is organized in a hierarchical tree-like structure. This data model
can be easily visualized because each record in DBMS has one parent and many children
(possibly 0) as shown in the image given below.
The above-given image represents the data model of the Vehicle database, vehicle is classified
into two types Viz. two-wheelers and four-wheelers and then they are further classified.

The main drawback we can see here is we can only have one too many relationships under this
model, hence the hierarchical data model is very rarely used nowadays.

Network Model

A network model is nothing but a generalization of the hierarchical data model as this data
model allows many to many relationships therefore in this model a record can also have more
than one parent.

The network model in DBMS can be represented as a graph and hence it replaces the
hierarchical tree with a graph in which object types are the nodes and relationships are the
edges.

For example -
Here you can see all three departments are linked with the director which was not possible in
the hierarchical data model.

In the network model, there can be many possible paths to reach a node from the root node
(College is the root node in the above case), therefore the data can be accessed efficiently when
compared to the hierarchical data model. But, on the other hand, the process of insertion and
deletion of data is quite complex.

Entity-Relationship Model (ER Model)

An Entity-Relationship model is a high-level data model that describes the structure of


the database in a pictorial form which is known as ER-diagram. In simple words, an ER
diagram is used to represent logical structure of the database easily.

1. ER model develops a conceptual view of the data hence it can be used as a blueprint to
implement the database in the future.
2. Developers can easily understand the system just by looking at ER diagram. Let's first
have a look at the components of an ER diagram.

• Entity - Anything that has an independent existence about which we collect the data. They are
represented as rectangles in the ER diagram. For example - Car, house, employee.
• Entity Set - A set of the same type of entities is known as an entity set. For example - Set of
students studying in a college.
• Attributes - Properties that define entities are called attributes. They are represented by an
ellipse shape.
• Relationships - A relationships in DBMS are used to describe the association between
entities. They are represented as diamond or rhombus shapes in the ER diagram.

In the above-represented ER diagram, we have two entities that are Employee and Company,
and the relationship among them. Also, in the above-represented ER diagram, we can see that
both the employee and company have some attributes and the relationship is of "works in"
type, which means the employee works in a company.

Relational Model

This is the most widely accepted data model. In this model, the database is represented as a
collection of relations in the form of rows and columns of a two-dimensional table. Each
row is known as a tuple (a tuple contains all the data for an individual record) while each
column represents an attribute. For example -
The above table shows a relation "STUDENT" with attributes such as Stu. Id, Name, and
Branch which consists of 4 records or tuples.

Object-Oriented Data model

As suggested by its name, the object-oriented data model is a combination of object-oriented


programming and relational data model. In this data model, the data and their relationship are
represented in a single structure which is known as an object.

Since data is stored as objects, we can easily store audio, video, images, etc in the database
which was very difficult and inconvenient to do in the relational model. As shown in the
image below two objects relate to each other through links.

In the above image, we have two objects that are Employee and Department in which all the
data is contained in a single unit (object). They are linked with each other as they share a
common attribute i.e., Department_Id.

Object Relational Data Model

Again as suggested by its name, the object-relational data model is an integration of the
object-oriented model and the relational model. Since it inherits properties from both models
it supports objects, classes, etc like object-oriented models, and tabular structures like the
relational model.

For example -
It provides data structures and operations used in the relational model and provides features
of object-oriented models like classes, inheritance, etc. The only drawback of this data model
is that it is complex and quite difficult to handle.
Advantages of Data Models in DBMS

• Data models ensure that the data is represented accurately.


• The relationship between the data is well-defined.
• Data Redundancy in DBMS can be minimized, and missing data can be identified easily.
• Finally, the security of the data is not compromised.

Disadvantages of Data Models in DBMS


• The biggest disadvantage of the data model is one must know the characteristics of physical
data to build a data model.
• Sometimes in big databases, it is quite difficult to understand the data model also the cost
incurred is very high.

Introduction of DBMS (Database Management System)


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.
Some key features of a DBMS include:

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.

Database is a collection of interrelated data which helps in the efficient retrieval, insertion,
and deletion of data from the database and organizes the data in the form of tables, views,
schemas, reports, etc. For Example, a university database organizes the data about students,
faculty, admin staff, etc. which helps in the efficient retrieval, insertion, and deletion of data
from it.

There are four types of Data Languages

1. Data Definition Language (DDL)


2. Data Manipulation Language (DML)
3. Data Control Language (DCL)
4. Transactional Control Language (TCL)
DDL is the short name for Data Definition Language, which deals with database schemas
and descriptions, of how the data should reside in the database.

• CREATE: to create a database and its objects like (table, index, views, store
procedure, function, and triggers)
• ALTER: alters the structure of the existing database
• DROP: delete objects from the database
• TRUNCATE: remove all records from a table, including all spaces allocated for the
records are removed
• COMMENT: add comments to the data dictionary
• RENAME: rename an object

DML is the short name for Data Manipulation Language which deals with data manipulation
and includes most common SQL statements such SELECT, INSERT, UPDATE, DELETE,
etc., and it is used to store, modify, retrieve, delete, and update data in a database.

• SELECT: retrieve data from a database


• INSERT: insert data into a table
• UPDATE: updates existing data within a table
• DELETE: Delete all records from a database table
• MERGE: UPSERT operation (insert or update)
• CALL: call a PL/SQL or Java subprogram
• EXPLAIN PLAN: interpretation of the data access path.
• LOCK TABLE: concurrency Control
DCL is short for Data Control Language which acts as an access specifier to the database.
(Basically, to grant and revoke permissions to users in the database

• GRANT: grant permissions to the user for running DML (SELECT, INSERT,
DELETE,) commands on the table
• REVOKE: revoke permissions to the user for running DML (SELECT, INSERT,
DELETE,) command on the specified table

TCL is short for Transactional Control Language which acts as a manager for all types of
transactional data and all transactions. Some of the commands of TCL are:

• Roll Back: Used to cancel or Undo changes made in the database.


• Commit: It is used to apply or save changes in the database
• Save Point: It is used to save the data on the temporary basis in the database.

Database Management System: The software which is used to manage databases is called
Database Management System (DBMS). For Example, MySQL, Oracle, etc. are popular
commercial DBMS used in different applications. DBMS allows users the following tasks:

• Data Definition: It helps in the creation, modification, and removal of definitions that
define the organization of data in the database.
• Data Updation: It helps in the insertion, modification, and deletion of the actual data
in the database.
• Data Retrieval: It helps in the retrieval of data from the database which can be used
by applications for various purposes.
• User Administration: It helps in registering and monitoring users, enforcing data
security, monitoring performance, maintaining data integrity, dealing with
concurrency control, and recovering information corrupted by unexpected failure.

You might also like