Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
File Management System, better known as File System is the most ancient and still the
most popular way to keep your data files organised on your drives.
On the other hand, when it comes to security and appropriate management of data
based on constraints and other stuff the first choice of many experts, is Database
Management System (DBMS).
File Systems is the traditional way to keep your data organised in a way which is easy
for physical access, whether it’s on your shelf or on the drives.
Earlier people used to keep records and maintain data in registers and any
alteration/retrieval to this data was difficult. When computers came, same agenda was
followed for storing the data on drives.
File System actually stores data in the form of isolated files which have their own set of
property table and physical location on the drive and user manually goes to these
locations to access the files.
It is an easy way to store data in general files like images, text, videos, audios etc., but
security is less because only options available to these files are the options given by the
operating system such as locks, hidden files and sharing. These files are hard to
maintain when it comes to frequent changes to these files.
Data redundancy is more and can’t be controlled easily. Data integration is hard to
achieve and also data consistency is not met.
DBMS stores data in the form of interrelated tables and files. These are generally
consist of database management system providers that are used to store and
manipulate databases, hardware where the data is physically stored and an user
friendly software developed to met specific purpose in certain situations, using which
user can easily access database without worrying about the underlying schema of the
database.
Database Management System is great way to manage data as, the data redundancy is
minimized due to interrelation of data entities and also provide a procedure for data
integration due to centralisation of data in the database. Security of data is also
maximized using password protection, encryption/decryption, granting authorized
access and others.
In a typical file processing systems, each department has its own files, designed
especially for those applications. The department itself works with the data
processing staff, sets policies or standards for the format and maintenance of its
files.
Disadvantages of File processing system
1) Data redundancy
In computer system many files are likely in the different formats and the
programs are written in different programming languages. Moreover, the same
information may be duplicated in several files, this duplication of data is known
as data redundancy.
2) Data inconsistency
Various copies contain the same type of data which may no longer is in use which
means that various copies of same data may contain different kind of
information.
4) Data isolation
Because data are scattered in various files and files may be in different formats,
writing new applications program to retrieve the appropriate data is difficult.
5) Integrity problem
Database must satisfy a particular consistency constraint. These constraints are
added in application program.
Example: The balance of a bank account may never fall below a prescribed
amount.
6) Atomicity problem
A computer system, like any other mechanical or electrical devices, is subject to
failure. In many applications, it is crucial that if failure occurs, the data be restored
to the consistent state that existed prior to the failure.
8) Security problems
In this not every user of the database system should be able to access all the
data.
Database approach
A database approach represents some aspects of real world called universe.
Database management system protects the database and maintains it over long
period of time. DBMS provides a view facility that enables user to have higher
view of database.
https://www.thecrazyprogrammer.com/2018/04/difference-between-file-system-and-dbms.html
File based approach Each program defines,manages and maintains its own data. Data is
scattered and users of one program doesn't know if there is any useful data held by other
programs. File structure is defined in the application program code therefore Programs are
written to satisfy particular functions/application.
Database approach Shared collection of logically related data which can be shared among
application. It Improves maintenance,reduce data redundancy and Increased productivity.
During a system
designing, a file On the other
system can never hand, database
2 be a part of back always work in
end. back end.
We can restrict
We cannot unauthorized
implement any kind access with
of security check database
over a file system. approach.
4 Hence the data will Databases are
always be available capable of
for the external implementing
environment. protection with
username and
passwords etc.
File system can
never be
synchronized. Database can be
5 Hence any update synchronized
or change in data hence can easily
cannot easily been be backed up.
recorded.
In contrast,
database
approach one is
master database
In file system, data
and rest are
file are stand alone
transaction
files, hence cannot
6 databases.
easily been utilized
Master database
for information
uses transaction
retrieval.
databases to
retrieve user
required
information.
Databases can be
Files can never be shared among
shares among group of users.
group of users. It Multiple programs
can’t be accessed can access the
9 by multiple same database at
programs same instance of
simultaneously. time.
Database system
supports multiple
10 File system doesn’t views. Eg.
support multiple Banking system
views. etc.
There is provision
11 Integrity constraints of implementing
cannot be constraints. Eg.
implemented. Redundancy
check etc.
What is the difference between MySQL and SQL?
SQL stands for Structured Query Language. It's a standard language for accessing and manipulating
databases. MySQL is a database management system, like SQL Server, Oracle, Informix, Postgres, etc.
MySQL is a RDMS (Relational Database Management System).
Generally if anyone asked about the difference between Database and DBMS then everyone says that
both are same but there is huge difference between them are as:-
3.Databse contains
a) Data
2.DBMS contains
What is Table ?
In Relational database, a table is a collection of data elements organised in terms of rows and columns.
A table is also considered as convenient representation of relations. But a table can have duplicate
tuples while a true relation cannot have duplicate tuples. Table is the most simplest form of data
storage. Below is an example of Employee table.
ID Name Age Salary
1 Adam 34 13000
2 Alex 28 15000
3 Stuart 20 18000
4 Ross 42 19020
What is a Record ?
A single entry in a table is called a Record or Row. A Record in a table represents set of related data.
For example, the above Employee table has 4 records. Following is an example of single record.
1 Adam 34 13000
What is Field ?
A table consists of several records(row), each record can be broken into several smaller entities known
as Fields. The above Employee table consist of four fields, ID, Name, Age and Salary.
What is a Column ?
In Relational table, a column is a set of value of a particular type. The term Attribute is also used to
represent a column. For example, in Employee table, Name is a column that represent names of
employee.
Name
Adam
Alex
Stuart
Basic Terminologies
Data: Facts, figures, statistics etc. having no particular meaning (e.g. 1, ABC, 19 etc).
Record: Collection of related data items, e.g. in the above example the three data items had no meaning.
But if we organise them in the following way, then they collectively represent meaningful information.
1 ABC 19
1 ABC 19
2 DEF 22
3 XYZ 28
The columns of this relation are called Fields, Attributes or Domains. The rows are
called Tuples or Records.
T1
1 ABC 19
2 DEF 22
3 XYZ 28
T2
Roll Address
1 KOL
2 DEL
3 MUM
T3
Roll Year
1 I
2 II
3 I
T4
Year Hostel
I H1
II H2
We now have a collection of 4 tables. They can be called a “related collection” because we can clearly find
out that there are some common attributes existing in a selected pair of tables. Because of these common
attributes we may combine the data of two or more tables together to find out the complete details of a
student. Questions like “Which hostel does the youngest student live in?” can be answered now,
although Age and Hostelattributes are in different tables.
In a database, data is organized strictly in row and column format. The rows are calledTuple or Record.
The data items within one row may belong to different data types. On the other hand, the columns are often
called Domain or Attribute. All the data items within a single attribute are of the same data type.
f a database system is not multi-layered, then it becomes difficult to make any changes
in the database system. Database systems are designed in multi-layers as we learnt
earlier.
Data Independence
A database system normally contains a lot of data in addition to users’ data. For example,
it stores data about data, known as metadata, to locate and retrieve data easily. It is
rather difficult to modify or update a set of metadata once it is stored in the database.
But as a DBMS expands, it needs to change over time to satisfy the requirements of the
users. If the entire data is dependent, it would become a tedious and highly complex job.
Metadata itself follows a layered architecture, so that when we change data at one layer,
it does not affect the data at another level. This data is independent but mapped to each
other.
All the schemas are logical, and the actual data is stored in bit format on the disk.
Physical data independence is the power to change the physical data without impacting
the schema or logical data.
For example, in case we want to change or upgrade the storage system itself − suppose
we want to replace hard-disks with SSD − it should not have any impact on the logical
data or schemas.
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.
Data independence is ability to modify a schema definition in one level without affecting a schema definition
in the next higher level.
Concepts of Database
Architecture
Faysal Ahmed
Follow
1. 1-tier architecture
2. 2-tier architecture
3. 3-tier architecture
4. n-tier architecture
1-tier architecture:
One-tier architecture involves putting all of the required components for a
software application or technology on a single server or platform.
1-tier architecture
2-tier architecture:
The two-tier is based on Client Server architecture. The two-tier architecture is
like client server application. The direct communication takes place between
client and server. There is no intermediate between client and server.
2-tier architecture
3-tier architecture:
A 3-tier architecture separates its tiers from each other based on the
complexity of the users and how they use the data present in the database. It is
the most widely used architecture to design a DBMS.
3-tier architecture
Database (Data) Tier − At this tier, the database resides along with its
query processing languages. We also have the relations that define the data
and their constraints at this level.
n-tier architecture:
N-tier architecture would involve dividing an application into three different
tiers. These would be the
1. logic tier,
Normalization of Database:
Database Normalisation is a technique of organizing the data in the database.
Normalization is a systematic approach of decomposing tables to eliminate
data redundancy and undesirable characteristics like Insertion, Update and
Deletion Anamolies. It is a multi-step process that puts data into tabular form
by removing duplicated data from the relation tables.
Normalization Rule:
4. BCNF
An atomic value is a value that cannot be divided. For example, in the table
shown below, the values in the [Color] column in the first row can be divided
into “red” and “green”, hence [TABLE_PRODUCT] is not in 1NF.
A repeating group means that a table contains two or more columns that are
closely related. For example, a table that records data on a book and its
author(s) with the following columns: [Book ID], [Author 1], [Author 2],
[Author 3] is not in 1NF because [Author 1], [Author 2], and [Author 3] are all
repeating the same attribute.
To bring this table to first normal form, we split the table into two tables and
now we have the resulting tables:
Now first normal form is satisfied, as the columns on each table all hold just
one value.
Second Normal Form:
All non-key attributes are fully functional dependent on the primary key
To bring this table to second normal form, we break the table into two tables,
and now we have the following:
The table in this example is in 1NF and in 2NF. But there is a transitive
dependency between Bank_Code_No and Bank, because Bank_Code_No is
not the primary key of this relation. To get to the third normal form (3NF), we
have to put the bank name in a separate table together with the clearing
number to identify it.
BCNF:
BCNF was developed by Raymond Boyce and E.F. Codd; the latter is widely
considered the father of relational database design.
BCNF is really an extension of 3rd Normal Form (3NF). For this reason it is
frequently termed 3.5NF. 3NF states that all data in a table must depend only
on that table’s primary key, and not on any other field in the table. At first
glance it would seem that BCNF and 3NF are the same thing. However, in
some rare cases it does happen that a 3NF table is not BCNF-compliant. This
may happen in tables with two or more overlapping composite candidate keys.
Components of DBMS
The database management system can be divided into five major components, they
are:
1. Hardware
2. Software
3. Data
4. Procedures
Let's have a simple diagram to see how they all fit together to form a database
management system.
DBMS Components: 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.
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.
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.
Components of DBMS
DBMS have several components, each performing very significant tasks in the database
management system environment. Below is a list of components within the database and its
environment.
Software
This is the set of programs used to control and manage the overall database. This includes the
DBMS software itself, the Operating System, the network software being used to share the data
among users, and the application programs used to access data in the DBMS.
Hardware
Consists of a set of physical electronic devices such as computers, I/O devices, storage devices,
etc., this provides the interface between computers and the real world systems.
Data
DBMS exists to collect, store, process and access data, the most important component. The
database contains both the actual or operational data and the metadata.
Procedures
These are the instructions and rules that assist on how to use the DBMS, and in designing and
running the database, using documented procedures, to guide the users that operate and manage it.
Query Processor
This transforms the user queries into a series of low level instructions. This reads the online user’s
query and translates it into an efficient series of operations in a form capable of being sent to the run
time data manager for execution.
Data Manager
Also called the cache manger, this is responsible for handling of data in the database, providing a
recovery to the system that allows it to recover the data after a failure.
Database Engine
The core service for storing, processing, and securing data, this provides controlled access and
rapid transaction processing to address the requirements of the most demanding data consuming
applications. It is often used to create relational databases for online transaction processing or online
analytical processing data.
Data Dictionary
This is a reserved space within a database used to store information about the database itself. A
data dictionary is a set of read-only table and views, containing the different information about the
data used in the enterprise to ensure that database representation of the data follow one standard
as defined in the dictionary.
Report Writer
Also referred to as the report generator, it is a program that extracts information from one or more
files and presents the information in a specified format. Most report writers allow the user to select
records that meet certain conditions and to display selected fields in rows and columns, or also
format the data into different charts.
Great Performance through Effective DBMS
A company’s performance is greatly affected by how it manages its data. And one of the most basic
tasks of data management is the effective management of its database. Understanding the different
components of the DBMS and how it works and relates to each other is the first step to employing an
effective DBM
Advantage of DBMS
1. Improved data sharing:
The DBMS helps create an environment in which end users have better access to more and better-
managed data.
Such access makes it possible for end users to respond quickly to changes in their environment.
Disadvantage of DBMS
1. Increased costs:
Database systems require sophisticated hardware and software and highly skilled personnel.
The cost of maintaining the hardware, software, and personnel required to operate and manage a
database system can be substantial. Training, licensing, and regulation compliance costs are often
overlooked when database systems are implemented.
2. Management complexity:
Database systems interface with many different technologies and have a significant impact on a
company’s resources and culture.
The changes introduced by the adoption of a database system must be properly managed to ensure
that they help advance the company’s objectives. Given the fact that database systems hold crucial
company data that are accessed from multiple sources, security issues must be assessed constantly.
3. Maintaining currency:
To maximize the efficiency of the database system, you must keep your system current.
Therefore, you must perform frequent updates and apply the latest patches and security measures
to all components.
Because database technology advances rapidly, personnel training costs tend to be significant.
Vendor dependence.
Given the heavy investment in technology and personnel training, companies might be reluctant to
change database vendors.
Features
Databases in the collection are logically interrelated with each other. Often they represent a
single logical database.
Data is physically stored across multiple sites. Data in each site can be managed by a DBMS
independent of the other sites.
The processors in the sites are connected via a network. They do not have any multiprocessor
configuration.
A distributed database is not a loosely connected file system.
A distributed database incorporates transaction processing, but it is not synonymous with a
transaction processing system.
Features