Overview of File Systems

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

Overview of File Systems

File Systems:
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:

1. FAT (File Allocation Table): An older file system used by older versions of Windows and other operating
systems.
2. NTFS (New Technology File System): A modern file system used by Windows. It supports features such as
file and folder permissions, compression, and encryption.
3. ext (Extended File System): A file system commonly used on Linux and Unix-based operating systems.
4. HFS (Hierarchical File System): A file system used by macOS.
5. APFS (Apple File System): A new file system introduced by Apple for their Macs and iOS devices.

Advantages of using a file system


1. Organization: A file system allows files to be organized into directories and subdirectories, making it easier
to manage and locate files.
2. Data protection: File systems often include features such as file and folder permissions, backup and restore,
and error detection and correction, to protect data from loss or corruption.
3. Improved performance: A well-designed file system can improve the performance of reading and writing
data by organizing it efficiently on disk.

Disadvantages of using a file system


1. Compatibility issues: Different file systems may not be compatible with each other, making it difficult to
transfer data between different operating systems.
2. Disk space overhead: File systems may use some disk space to store metadata and other overhead
information, reducing the amount of space available for user data.
3. Vulnerability: File systems can be vulnerable to data corruption, malware, and other security threats, which
can compromise the stability and security of the system.

Overview of Database Systems

Database Systems:
A database approach is a well-organized collection of data that are related in a meaningful way which can be
accessed by different users but stored only once in a system. The various operations performed by the DBMS
system are: Insertion, deletion, selection, sorting etc.

Differences between DBMS and File systems:

Basic DBMS File System


DBMS is a collection of data. In The file system is a collection of data. In this
Defination DBMS, the user is not required system, the user has to write the
to write the procedures. procedures for managing the database.

Sharing of data Due to the centralized approach, Data is distributed in many files, and it may be
data sharing is easy. of different formats, so it isn't easy to
share data.
Data Abstraction DBMS gives an abstract view of data The file system provides the detail of the data
that hides the details. representation and storage of data.
Security and DBMS provides a good protection It isn't easy to protect a file under the file
Protection mechanism system.
Recovery DBMS provides a crash recovery The file system doesn't have a crash
Mechanism mechanism, i.e., DBMS mechanism, i.e., if the system crashes
protects the user from system while entering some data, then the
failure. content of the file will be lost.
Cost The database system is expensive to The file system approach is cheaper to design
design.
Data Redundancy Due to the centralization of the In this, the files and application programs are
and database, the problems of data created by different programmers so that
Inconsistency redundancy and inconsistency there exists a lot of duplication of data
are controlled. which may lead to inconsistency.
Integrity Integrity Constraints are easy to Integrity Constraints are difficult to
Constraints apply. implement in file system.

Data Models In the database approach, 3 types of In the file system approach, there is no
data models exist: Hierarchal data concept of data models exists.
models Network data models
Relational data models
Examples Oracle, SQL Server, Sybase etc. Cobol, C++ etc.

Characteristics of Database approach in DBMS:


A database control machine (DBMS) is a software program gadget that permits the creation, organization,
management, and retrieval of records in a dependent manner. The database method is a way of organizing
information in a DBMS that has distinct characteristics that make it distinctive from different techniques. In
this newsletter, we will speak about the characteristics of the database technique in DBMS.
1. Database Independence:One of the important characteristics of the database approach is information
independence. The database method allows for the separation of the bodily garage of information from the
logical business enterprise of information. This manner of adjustments made to the bodily storage of facts do
no longer affect the logical organization of the records, and vice versa. As a result, applications that use the
database can be modified without affecting the underlying information.
2. Data Integration:-Another characteristic of the database approach is statistics integration. The database
technique allows for the integration of statistics from distinct sources right into a single database. This means
that information may be shared between extraordinary packages, reducing redundancy and improving facts
consistency.
3. Centralized Control:- The database method allows for centralized manipulation of information. This approach
means that statistics may be controlled and controlled from a single location, making it less difficult to put in
force information safety and get entry to control guidelines.
4. Consistency:- The database technique presents consistency in records storage and retrieval. Data within the
database is organized in a constant and predictable manner, making it less difficult to retrieve and examine
facts. Consistency is maintained through using guidelines and constraints that make certain that records are
entered and saved in the ideal format.
5. Scalability:- The database technique is scalable, allowing for the control of massive amounts of statistics. The
use of a DBMS allows for the control of facts in a dependent way, making it less difficult to manage and
retrieve big amounts of records.
6. Security:- The database technique gives information security. Data can be secured via the use of get entry to
control policies and encryption. This guarantees that statistics is only accessed by means of authorized users
and that touchy statistics is included from unauthorized access.

7. Concurrent Access:- The database technique lets in for concurrent access to records. Multiple users can get
entry to the equal facts simultaneously, ensuring that records are available to all customers in real-time. This
is finished via using locking mechanisms that save you multiple customers from modifying the identical facts
concurrently.
8. Data Modeling:- The database approach lets in for the usage of data modeling techniques to create a logical
representation of information. Data modeling is a system that includes figuring out the facts, entities,
attributes, and relationships in a device. By the usage of facts modeling strategies, builders can create a clear
expertise of the statistics in a device and the way it's miles related, making it less complicated to layout the
database schema.
9. Data Integrity:- The database technique offers mechanisms for making sure statistics integrity. This includes
the use of facts constraints which includes primary keys, foreign keys, and take a look at constraints, which
ensure that statistics is entered in the correct format and that relationships between records are maintained.
10. Data Querying:- The database method affords effective records querying capabilities. The use of Structured
Query Language (SQL) lets in customers to retrieve and manipulate facts in a flexible and efficient manner.
SQL allows for the filtering, sorting, grouping, and aggregation of records, making it simpler to extract insights
from large amounts of information.
11. Data Backup and Recovery:- The database approach presents mechanisms for statistics backup and
recuperation. This approach means that in the event of facts loss or corruption, statistics can be restored to a
preceding country. DBMSs offer mechanisms for growing backups of the database at regular durations and
for restoring data from these backups within the event of records loss.
12. Data Replication:- The database technique lets in for the replication of information across a couple of
servers. Data replication is the method of copying records from one server to any other, providing
redundancy and improving data availability. By replicating information throughout multiple servers, groups
can ensure that information is available in the occasion of a server failure.

Different types of Database Users:

1. Database Administrator (DBA) : Database Administrator (DBA) is a person/team who defines the
schema and also controls the 3 levels of database. The DBA will then create a new account id and
password for the user 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 a system or superuser 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.
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 is a naive user because
they don’t have any DBMS knowledge but they still use the database and perform their given task.
3. System Analyst :System Analyst is a user who analyzes the requirements of parametric end users. They
check whether all the requirements of end users are satisfied.
4. 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.
5. 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. 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.
7. Casual Users / Temporary Users : Casual Users are the users who occasionally use/access the database
but each time when they access the database they require the new information, for example, Middle or
higher level manager.
8. 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.
The Advantages and Disadvantages of DBMS:
The advantages of the DBMS are explained below −
 Redundancy problem can be solved:
In the File System, duplicate data is created in many places because all the programs have their own files
which create data redundancy resulting in wastage of memory. In DBMS, all the files are integrated in a
single database. So there is no chance of duplicate data.
For example: A student record in a library or examination can contain duplicate values, but when they are
converted into a single database, all the duplicate values are removed
 Has a very high security level:
Data security level is high by protecting your precious data from unauthorized access. Only authorized
users should have the grant to access the database with the help of credentials.
 Presence of Data integrity:
Data integrity makes unification of so many files into a single file. DBMS allows data integrity which makes
it easy to decrease data duplicity Data integration and reduces redundancy as well as data inconsistency
 Support multiple users:
DBMS allows multiple users to access the same database at a time without any conflicts.
 Avoidance of inconsistency:
DBMS controls data redundancy and also controls data consistency. Data consistency is nothing but if
you want to update data in any files then all the files should not be updated again.
In DBMS, data is stored in a single database so data becomes more consistent in comparison to file
processing systems.
 Shared data:
Data can be shared between authorized users of the database in DBMS. All the users have their own right
to access the database. Admin has complete access to the database. He has a right to assign users to
access the database.
 Enforcement of standards:
As DBMS have central control of the database. So, a DBA can ensure that all the applications follow some
standards such as format of data, document standards etc. These standards help in data migrations or in
interchanging the data.
 Any unauthorized access is restricted:
Unauthorized persons are not allowed to access the database because of security credentials.
 Provide backup of data:
Data loss is a big problem for all the organizations. In the file system users have to back up the files in
regular intervals which lead to waste of time and resources.
DBMS solves this problem of taking backup automatically and recovery of the database.

The disadvantages of DBMS are as follows:


 Complexity:
The provision of the functionality that is expected of a good DBMS makes the DBMS an extremely complex
piece of software. Database designers, developers, database administrators and end-users must
understand this functionality to take full advantage of it.
Failure to understand the system can lead to bad design decisions, which leads to a serious consequence
for an organization.
 Size:
The functionality of DBMS makes use of a large piece of software which occupies megabytes of disk space.
 Performance:
Performance may not run as fast as desired.
 Higher impact of a failure:
The centralization of resources increases the vulnerability of the system because all users and applications
rely on the availability of DBMS, the failure of any component can bring operation to halt.
 Cost of DBMS
The cost of DBMS varies significantly depending on the environment and functionality provided. There is
also the recurrent annual maintenance cost.

Responsibility of Database Administrator:

Software Installation and Maintenance:


A DBA is frequently involved in the initial installation and configuration of a new Oracle, SQL Server, or other
databases. The system administrator configures the database server’s hardware and implements the operating
system, after which the DBA installs and configures the database software. The DBA is in charge of ongoing
maintenance, such as updates and patches.
In addition, if a new server is implemented, the DBA is in charge of transferring data from the existing system to
the new platform.
Managing Data Integrity:
DBAs primarily handle the overall integrity of a company’s database. They make sure that the Data integrity is
carefully managed because it protects data from unauthorized use. DBAs manage data relationships to ensure
data consistency.
Takes Care of Data Extraction, Transformation, and Loading:
DBAs are responsible for Data extraction, transformation, and loading, also known as (ETL), which refers to the
efficient import of large amount of data extracted from multiple systems into a data warehouse environment. The
external data is cleaned and transformed to fit the required format before being imported into a central
repository.
Monitoring Performance:
Only implementing a database is not the task of the database administrator. Once the database is implemented,
they are required to monitor databases for performance issues. If a system component slows down processing,
the DBA may need to change the software configuration or add more hardware capacity. There are numerous
monitoring tools available, and understanding what they need to track to improve the system is part of the DBA’s
job.
Data Handling:
Each company’s success today revolves around massive databases. Companies nowadays maintain massive
databases containing unstructured data types such as images, documents, or sound and video files. Managing an
extensive database (VLDB) may necessitate higher-level skills, as well as additional monitoring and tuning, which a
DBA possesses.
Create a Database Backup Plan:
DBAs create backup and recovery plans and procedures as per the industry standards. Not only that, but DBAs
make certain that all necessary steps are taken. DBAs are responsible for ensuring that everything is completed on
time, in addition to taking the required precautions to keep data safe.
Database Recovery:
The DBA’s responsibility in the event of a server failure or other type of data loss is to restore lost data to the
system using existing backups.
Different types of failures may necessitate different recovery strategies, and a DBA performs his duties while
keeping the necessary requirements in mind. Furthermore, as technology advances, it becomes crucial for a DBA
to backup databases to the cloud.

Database Security:
One of the most critical responsibilities of a DBA is identifying and correcting any flaws in the database software.
No system is entirely secure; however, DBAs mitigate risks by implementing best practices. A DBA must be able to
identify potential flaws in the database software and the overall system of the company and take appropriate
steps to mitigate risks.
Database Integrity:
DBAs are primarily responsible for the overall integrity of a company’s database. This includes putting the
database in place, keeping it safe from loss and corruption, making it easily accessible, ensuring it works properly,
and constantly tweaking it for ease of use and maximum productivity. In addition, the database administrator is
also in charge of training eligible employees on how to access and use the database so that they can perform their
duties.
Database Accessibility:
Setting up employee access is a critical component of database security. DBAs decide who has access and what
kind of access they have. They create a subschema to control database accessibility.
They also determine which users will have access to the database and which users will use data. Without the
permission of the DBA, no user has the authority to access the database.
Provides Support to Users:
If a user requires assistance at any time, it is the DBA’s responsibility to assist him. The DBA provides complete
support to users who are new to the database.
Troubleshooting:
In the event of a problem, DBA’s job is to troubleshoot it immediately. Whether a DBA needs to quickly restore lost
data or fix a problem to limit damage, a DBA must be able to quickly understand and respond to concerns when
they occur.

Concepts of Database Systems:

 Data− Data is the central component of every database system. The information that has to be handled
and saved is represented by data. It could be structured, somewhat structured, or not at all. Structured
data is arranged into tables with rows and columns according to a predetermined pattern. Examples
include financial data, product specifications, and client information. Data that is semi-structured, like
JSON or XML, has some structure but does not follow a strict standard. Text documents, photos, and
multimedia files are examples of unstructured data since they don't have a predetermined structure.
 Database Management System (DBMS)− Software that makes it easier to create, organize, and
manipulate databases is known as a database management system (DBMS). It offers a selection of tools
and user interfaces for effective data management. Data storage, data retrieval, data manipulation, data
security, and concurrency control are among a DBMS's essential features. Popular DBMS s include
PostgreSQL, Oracle, MySQL, and Microsoft SQL Server.
 Database − A database is a structured collection of data that is maintained and organized by a database
management system (DBMS). It is made up of one or more tables, each of which represents a different
entity or idea. Each row in a table represents one instance of the entity, and each column in a table
represents a particular quality or trait. Rows and columns make up a table.
 Schema − A database schema outlines the logical organization and structure of a database. The tables,
connections between tables, restrictions, and other information are all described. A schema outlines the
structure and storage requirements for the data. Let's look at an illustration. Assume we have an online
storefront with the following tables − Customers (Customer Id, Name, Email) Orders (Order Id, Customer
Id, Order Date, Total Amount) Products (Product Id, Name, Price) The tables, their columns, and any
connections or restrictions between them would all be specified by the schema.
 Query Language − : A query language enables users to access, manage, and alter data from databases by
sending queries. The most used query language for relational databases is Structured Query Language
(SQL). For building, editing, and querying databases, it offers a set of commands and syntax.

DataBase Systems Architecture:

 The DBMS design depends upon its architecture. The basic client/server architecture is used to deal with a
large number of PCs, web servers, database servers and other components that are connected with
networks.
 The client/server architecture consists of many PCs and a workstation which are connected via the
network.
 DBMS architecture depends upon how users are connected to the database to get their request done.

Types of DBMS Architecture:

Database architecture can be seen as a single tier or multi-tier. But logically, database architecture is of two types
like: 2-tier architecture and 3-tier architecture.

1-Tier Architecture:
 In this architecture, the database is directly available to the user. It means the user can directly sit on the
DBMS and uses it.
 Any changes done here will directly be done on the database itself. It doesn't provide a handy tool for end
users.
 The 1-Tier architecture is used for development of the local application, where programmers can directly
communicate with the database for the quick response.
2-Tier Architecture:
 The 2-Tier architecture is same as basic client-server. In the two-tier architecture, applications on the client
end can directly communicate with the database at the server side. For this interaction, API's
like: ODBC, JDBC are used.
 The user interfaces and application programs are run on the client-side.
 The server side is responsible to provide the functionalities like: query processing and transaction
management.
 To communicate with the DBMS, client-side application establishes a connection with the server side.
3-Tier Architecture:
 The 3-Tier architecture contains another layer between the client and server. In this architecture, client
can't directly communicate with the server.
 The application on the client-end interacts with an application server which further communicates with
the database system.
 End user has no idea about the existence of the database beyond the application server. The database also
has no idea about any other user beyond the application.
 The 3-Tier architecture is used in case of large web application.

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:
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
affected.
 Logical data independence occurs at the user interface level.
Physical Data Independence:
 Physical data independence can be defined 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 affected.
 Physical data independence is used to separate conceptual levels from the internal levels.
 Physical data independence occurs at the logical interface level.

Database Languages in DBMS:


A DBMS has appropriate languages and interfaces to express database queries and updates.
Database languages can be used to read, store and update the data in the database.

Types of Database Languages:


Data Definition Language (DDL):
 DDL stands for Data Definition Language. It is used to define database structure or pattern.
 It is used to create schema, tables, indexes, constraints, etc. in the database.
 Using the DDL statements, you can create the skeleton of the database.
 Data definition language is used to store the information of metadata like the number of tables and
schemas, their names, indexes, columns in each table, constraints, etc.

Here are some tasks that come under DDL:

 Create: It is used to create objects in the database.


 Alter: It is used to alter the structure of the database.
 Drop: It is used to delete objects from the database.
 Truncate: It is used to remove all records from a table.
 Rename: It is used to rename an object.
 Comment: It is used to comment on the data dictionary.

Data Manipulation Language (DML):


DML stands for Data Manipulation Language. It is used for accessing and manipulating data in a database. It
handles user requests.

Here are some tasks that come under DML:

 Select: It is used to retrieve data from a database.


 Insert: It is used to insert data into a table.
 Update: It is used to update existing data within a table.
 Delete: It is used to delete all records from a table.
 Merge: It performs UPSERT operation, i.e., insert or update operations.
 Call: It is used to call a structured query language or a Java subprogram.
 Explain Plan: It has the parameter of explaining data.
 Lock Table: It controls concurrency.
Data Control Language (DCL):
 DCL stands for Data Control Language. It is used to retrieve the stored or saved data.
 The DCL execution is transactional. It also has rollback parameters.
(But in Oracle database, the execution of data control language does not have the feature of rolling back.)

Here are some tasks that come under DCL:

 Grant: It is used to give user access privileges to a database.


 Revoke: It is used to take back permissions from the user.
There are the following operations which have the authorization of Revoke:
CONNECT, INSERT, USAGE, EXECUTE, DELETE, UPDATE and SELECT.
Transaction Control Language (TCL):
TCL is used to run the changes made by the DML statement. TCL can be grouped into a logical transaction.

Here are some tasks that come under TCL:


 Commit: It is used to save the transaction on the database.
 Rollback: It is used to restore the database to original since the last Commit.
Data Models:

Relational Model in DBMS:


Relational model can represent as a table with columns and rows. Each row is known as a tuple. Each table of the
column has a name or attribute.
Domain: It contains a set of atomic values that an attribute can take.
Attribute: It contains the name of a column in a particular table. Each attribute Ai must have a domain, dom(Ai)
Relational instance: In the relational database system, the relational instance is represented by a finite set of
tuples. Relation instances do not have duplicate tuples.
Relational schema: A relational schema contains the name of the relation and name of all columns or attributes.
Relational key: In the relational key, each row has one or more attributes. It can identify the row in the relation
uniquely.

Properties of Relations:
 Name of the relation is distinct from all other relations.
 Each relation cell contains exactly one atomic (single) value
 Each attribute contains a distinct name
 Attribute domain has no significance
 tuple has no duplicate value
 Order of tuple can have a different sequence

Hierarchical Model in DBMS:


A hierarchical model represents the data in a tree-like structure in which there is a single parent for each record.
To maintain order there is a sort field which keeps sibling nodes into a recorded manner. These types of models
are designed basically for the early mainframe database management systems, like the Information Management
System (IMS) by IBM.
This model structure allows the one-to-one and a one-to-many relationship between two/ various types of data.
This structure is very helpful in describing many relationships in the real world; table of contents, any nested and
sorted information.
The hierarchical structure is used as the physical order of records in storage. One can access the records by
navigating down through the data structure using pointers which are combined with sequential accessing.
Therefore, the hierarchical structure is not suitable for certain database operations when a full path is not also
included for each record.
Data in this type of database is structured hierarchically and is typically developed as an inverted tree. The "root"
in the structure is a single table in the database and other tables act as the branches flowing from the root. The
diagram below shows a typical hierarchical database structure.
Network Database Model in DBMS:
The network database model was created to solve the shortcomings of the hierarchical database model.
In this type of model, a child can be linked to multiple parents, a feature that was not supported by the
hierarchical data model. The parent nodes are known as owners and the child nodes are called
members.

The network data model can be represented as −

You might also like