Unit 1(dbms)
Unit 1(dbms)
We use data science to make it easier to work with data. Data science is defined
as a field that combines knowledge of mathematics, programming skills,
domain expertise, scientific methods, algorithms, processes, and systems to
extract actionable knowledge and insights from both structured and
unstructured data, then apply the knowledge gleaned from that data to a wide
range of uses and domains.
What is Information?
The term Big Data is used in the data definition to describe the data that is in
the petabyte range or higher. Big Data is also described as 5Vs: variety, volume,
value, veracity, and velocity. Nowadays, web-based eCommerce has spread
vastly, business models based on Big Data have evolved, and they treat data as
an asset itself. And there are many benefits of Big Data as well, such as reduced
costs, enhanced efficiency, enhanced sales, etc.
The meaning of data has grown beyond the processing of data in the field of
computer applications. For instance, we’ve already touched upon what data
science is. Accordingly, finance, demographics, health, and marketing also
have different definitions of data, which ultimately results in different answers
to the persistent question, “What is data?”
Computers represent data (e.g., text, images, sound, video), as binary values
that employ two numbers: 1 and 0. The smallest unit of data is called a “bit,”
and it represents a single value. Additionally, a byte is eight bits long. Memory
and storage are measured in units such as megabytes, gigabytes, terabytes,
petabytes, and exabytes. Data scientists keep coming up with newer, larger data
measurements as the amount of data our society generates continues to grow.
Data can be stored in file formats using mainframe systems such as ISAM and
VSAM, though there are other file formats for data conversion, processing, and
storage, like comma-separated values. These data formats are currently used
across a wide range of machine types, despite more structured-data-oriented
approaches gaining a greater foothold in today’s IT world.
The field of data storage has seen greater specialization develop as the database,
the database management system, and more recently, relational database
technology, each made their debut and provided new ways to organize
information.
What is Database
For example: The college Database organizes the data about the admin, staff,
students and faculty etc.
Using the database, you can easily retrieve, insert, and delete the information.
DML stands for Data Manipulation Language. It is used for accessing and
manipulating data in a database. It handles user requests.
(But in Oracle database, the execution of data control language does not
have the feature of rolling back.)
There are the following operations which have the authorization of Revoke:
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:
Application of DBMS
Sector Application
Universities Student information, courses, grades, etc.
Sales Customer information, sales, etc.
Finance Stock information, sales, bonds, etc.
Banking Customer information, account, activities, deposits, loans,
etc.
Manufacturing Production information, suppliers, inventories, etc.
Airlines Customer information, schedules, reservations, etc.
HR Management Employee information, payroll, deduction, paychecks, etc.
Telecommunication Call records, bills, usage, etc.
Characteristics of DBMS
o
Advantages of DBMS
and software
Disadvantages of DBMS
Consistency
This means that integrity constraints must be maintained so that the database
is consistent before and after the transaction. It refers to the correctness of a
database. Referring to the example above, The total amount before and after
the transaction must be maintained.
Isolation
This property ensures that multiple transactions can occur concurrently
without leading to the inconsistency of database state. Transactions occur
independently without interference. Changes occurring in a particular
transaction will not be visible to any other transaction until that particular
change in that transaction is written to memory or has been committed. This
property ensures that the execution of transactions concurrently will result in
a state that is equivalent to a state achieved these were executed
serially in some order. Let X= 500, Y = 500.
Suppose T has been executed till Read (Y) and then T’’ starts. As a result ,
interleaving of operations takes place due to which T’’ reads correct value of
X but incorrect value of Y and sum computed by
Durability:
This property ensures that once the transaction has completed execution, the
updates and modifications to the database are stored in and written to disk and
they persist even if a system
Types of Databases
There are various types of databases used for storing different varieties of data:
1) Centralized Database
2) Distributed Database
3.6M
3) Relational Database
This database is based on the relational data model, which stores data in the form
of rows(tuple) and columns(attributes), and together forms a table(relation). A
relational database uses SQL for storing, manipulating, as well as maintaining the
data. E.F. Codd invented the database in 1970. Each table in the database carries
a key that makes the data unique from others. Examples of Relational databases
are MySQL, Microsoft SQL Server, Oracle, etc.
C means Consistency: If we perform any operation over the data, its value
before and after the operation should be preserved. For example, the account
balance before and after the transaction should be correct, i.e., it should remain
conserved.
I means Isolation: There can be concurrent users for accessing data at the same
time from the database. Thus, isolation between the data should remain isolated.
For example, when multiple transactions occur at the same time, one transaction
effects should not be visible to the other transactions in the database.
D means Durability: It ensures that once it completes the operation and commits
the data, data changes should remain permanent.
4) NoSQL Database
Non-SQL/Not Only SQL is a type of database that is used for storing a wide range
of data sets. It is not a relational database as it stores data not only in tabular form
but in several different ways. It came into existence when the demand for building
modern applications increased. Thus, NoSQL presented a wide variety of
database technologies in response to the demands. We can further divide a
NoSQL database into the following four types:
a. Key-value storage: It is the simplest type of database storage where it
stores every single item as a key (or attribute name) holding its value, together.
b. Document-oriented Database: A type of database used to store data as
JSON-like document. It helps developers in storing data by using the same
document-model format as used in the application code.
c. Graph Databases: It is used for storing vast amounts of data in a graph-
like structure. Most commonly, social networking websites use the graph
database.
d. Wide-column stores: It is similar to the data represented in relational
databases. Here, data is stored in large columns together, instead of storing
in rows.
5) Cloud Database
6) Object-oriented Databases
The type of database that uses the object-based data model approach for storing
data in the database system. The data is represented and stored as objects which
are similar to the objects used in the object-oriented programming language.
7) Hierarchical Databases
It is the type of database that stores data in the form of parent-children relationship
nodes. Here, it organizes data in a tree-like structure.
Data get stored in the form of records that are connected via links. Each child
record in the tree will contain only one parent. On the other hand, each parent
record can have multiple child records.
8) Network Databases
It is the database that typically follows the network data model. Here, the
representation of data is in the form of nodes connected via links between them.
Unlike the hierarchical database, it allows each record to have multiple children
and parent nodes to form a generalized graph structure.
9) Personal Database
Collecting and storing data on the user's system defines a Personal Database. This
database is basically designed for a single user.
4. Experts System
o The expert system contains expertise which is helpful for a manager
in identifying problems or in problem-solving. The principles of artificial
intelligence research are used to develop these kinds of information
systems.
o This type of information system is a knowledge-based system. It acts as an
expert consultant to users by utilizing its knowledge of a specific area.
o There are some components of expert systems such as Knowledgebase and
software modules. These modules make inferences based on knowledge
and provide answers to a user's query.
1. Hardware
2. Software
3. Data
4. Procedures
5. People
6. Feedback
1. Hardware
3. Data
Data means facts that systems use to generate valuable knowledge. Data is usually
stored in machine-readable form on tape or disk until the computer requires them.
The data in pre-computer information systems is usually stored in a human-
readable format.
4. Procedures
5. People
o Communication
o Availability
o Creation of new types of jobs
o Globalization and cultural gap
Communication
Using information technology, instant messaging, emails, voice, and video calls,
communication become inexpensive, faster, and effective.
Availability
With the help of the Information system, it is possible for businesses around the
world to be open around the clock. This implies that a business can be open
anytime, anyplace, making buys from various nations simpler and more helpful.
It likewise implies that you can have your products delivered right to your
doorstep without making more effort.
The creation of new and exciting jobs is another advantage of the information
system. We can create various opportunities using IT such as computer
programmers, Hardware and Software developers, Web designers, and Systems
analyzers.
Sharing of data Due to the centralized approach, Data is distributed in many files,
data sharing is easy. and it may be of different formats,
so it isn't easy to share data.
Data DBMS gives an abstract view of The file system provides the
Abstraction data that hides the details. detail of the data representation
and storage of data.
Security and DBMS provides a good protection It isn't easy to protect a file under
Protection mechanism. the file system.
Recovery DBMS provides a crash recovery The file system doesn't have a
Mechanism mechanism, i.e., DBMS protects the crash mechanism, i.e., if the
user from system failure. system crashes while entering
some data, then the content of the
file will be lost.
Manipulation DBMS contains a wide variety of The file system can't efficiently
Techniques sophisticated techniques to store store and retrieve the data.
and retrieve the data.
Data Due to the centralization of the In this, the files and application
Redundancy and database, the problems of data programs are created by different
Inconsistency redundancy and inconsistency are programmers so that there exists
controlled. a lot of duplication of data which
may lead to inconsistency.
Structure The database structure is complex The file system approach has a
to design. simple structure.
Data In this system, Data Independence In the File system approach, there
Independence exists, and it can be of two types. exists no Data Independence.
Data Models In the database approach, 3 types of In the file system approach, there
data models exist: is no concept of data models
exists.
o Hierarchal data models
o Network data models
o Relational data models
Flexibility Changes are often a necessity to the The flexibility of the system is
content of the data stored in any less as compared to the DBMS
system, and these changes are more approach.
easily with a database approach.
Examples Oracle, SQL Server, Sybase etc. Cobol, C++ etc.
What is RDBMS?
RDBMS CONCEPTS
RDBMS stands for Relational Database Management System. RDBMS is the
basis for SQL, and for all modern database systems like MS SQL Server, IBM
DB2, Oracle, MySQL, and Microsoft Access.
A Relational database management system (RDBMS) is a database management
system (DBMS) that is based on the relational model as introduced by E. F. Codd.
Domain in RDBMS
The domain describes probable terms collected jointly that always have the same
characteristics and also constraints. A domain can be involved in a feature but
only if the feature is a factor of a particular set.
RDBMS Database
The association between different databases is called the relational database. Here
all the data are related in terms of the tables they are stored in. The users will be
able to access them. RDBMS database is different from that of DBMS.
The RDBMS speaks about relations between different entities present in the
database. Normal Database assists only the tables while RDBS along with the
tables tells their connections too. Normal databases give consistent methods but
databases of RDBMS do not offer any methodologies but instead give
connections that connect one single object with another.
The stored database is called executable code. The database collects and saves
data and that particular procedure is called the stored procedure. During this, the
codes are also stored which are used for encapsulation, delete, etc. The
programmers are able to add extensions of the syntaxes of SQL due to the
applications of the APIs in the stored processes.
Constraints
Constraints are sort of limitations functional to the database. They make available
the way to employ the trade logic and the regulations in the database. In the
database, it can be applied in the type of confirming limits that verify the set of
laws that the developer has missed. The constraint is also restricting the facts that
can be saved in the relations. They are applied to verify the province’s
performance and to keep it protected.
Entity integrity: The entity integrity says that in a database, all the data
should be organized having a single key. The uniqueness of all the data is
maintained by this principle.
Referential integrity: Referential integrity means that in the database all
table values stay true for all foreign keys.
RDBMS Operators
There are several relational operators that perform on the RDBMS. They are:
The Union operator mingles the rows of 2 relations and ignores the
replacement. It also takes out the copied ones from the output.
The intersection operator gives a collection of rows that is identical to two
relations.
The difference operator gives the result by having 2 relations and gives the
difference of rows from the first that don’t exist in the second.
Cartesian product is done on two relations. It works as a cross join operator.
The simple yet powerful relational model is used by organizations of all types
and sizes for a broad variety of information needs. Relational databases are used
to track inventories, process ecommerce transactions, manage huge amounts of
mission-critical customer information, and much more. A relational database
can be considered for any information need in which data points relate to each
other and must be managed in a secure, rules-based, consistent way.
Relational databases have been around since the 1970s. Today, the advantages
of the relational model continue to make it the most widely accepted model for
databases.
ACID properties and RDBMS
What is a table?
The data in an RDBMS is stored in database objects which are called as tables.
This table is basically a collection of related data entries and it consists of
numerous columns and rows.
Remember, a table is the most common and simplest form of data storage in a
relational database. The following program is an example of a CUSTOMERS
table −
+----+----------+-----+-----------+----------+
| ID | NAME | AGE | ADDRESS | SALARY |
+----+----------+-----+-----------+----------+
| 1 | Ramesh | 32 | Ahmedabad | 2000.00 |
| 2 | Khilan | 25 | Delhi | 1500.00 |
| 3 | kaushik | 23 | Kota | 2000.00 |
| 4 | Chaitali | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 8500.00 |
| 6 | Komal | 22 | MP | 4500.00 |
| 7 | Muffy | 24 | Indore | 10000.00 |
+----+----------+-----+-----------+----------+
What is a field?
Every table is broken up into smaller entities called fields. The fields in the
CUSTOMERS table consist of ID, NAME, AGE, ADDRESS and SALARY.
A field is a column in a table that is designed to maintain specific information
about every record in the table.
What is a Record or a Row?
A record is also called as a row of data is each individual entry that exists in a
table. For example, there are 7 records in the above CUSTOMERS table.
Following is a single row of data or record in the CUSTOMERS table −
+----+----------+-----+-----------+----------+
| 1 | Ramesh | 32 | Ahmedabad | 2000.00 |
+----+----------+-----+-----------+----------+
A record is a horizontal entity in a table.
What is a column?
Although DBMS and RDBMS both are used to store information in physical
database but there are some remarkable differences between them.
The main differences between DBMS and RDBMS are given below:
2) In DBMS, data is generally stored In RDBMS, the tables have an identifier called
in either a hierarchical form or a primary key and the data values are stored in the
navigational form. form of tables.
4) DBMS does not apply any RDBMS defines the integrity constraint for the
security with regards to data purpose of ACID (Atomocity, Consistency,
manipulation. Isolation and Durability) property.
5) DBMS uses file system to store in RDBMS, data values are stored in the form of
data, so there will be no relation tables, so a relationship between these data
between the tables. values will be stored in the form of a table as well.
9) Examples of DBMS are file Example of RDBMS are mysql, postgre, sql
systems, xml etc. server, oracle etc.
Types of DBMS Architecture
Database management systems are divided into multiple levels of abstraction for
proper functioning. These modules/layers describe the functioning and the design
of the DBMS.
Since a database management system is not always directly accessible by the user
or an application, we can maintain it with the help of various architectures based
on how the user is connected to the database. These architectures follow a tier-
based classification, i.e., the DBMS architecture is classified depending upon
how many layers are present in the structure of the DBMS.
Hence, an n-tier DBMS Architecture divides the whole DBMS into related
but n independent layers or levels, i.e., a one-tier architecture divides the
DBMS into a single layer, a two-tier DBMS architecture divides the DBMS into
two layers, a three-tier in three layers, and so on. When the layers are increased
in the architecture, the level of abstraction also increases, resulting in an increase
in the security and the complexity of the DBMS structure. All these layers are
independent, i.e., any modification performed in a particular layer does not affect
the other layer present in the architecture.
Now, let’s look at the most common DBMS architectures:
The Two-Tier DBMS Architecture is used when we wish to access the DBMS
with the help of an application. Client-side applications can access the database
server directly with the help of API calls, making the application independent of
the database in terms of operation, design, and programming.
The main advantages of having a two-tier architecture over a single tier are:
Multiple users can use it at the same time. Hence, it can be used in an
organization.
It has high processing ability as the database functionality is handled by
the server alone.
Faster access to the database due to the direct connection and improved
performance.
Because of the two independent layers, it's easier to maintain.
Highlights:
1- Similar to a client-server architecture.
2- Faster access, Easier to maintain, and can handle multiple users
simultaneously.
3-Used when we wish to access DBMS via applications and APIs.
4-Has scalability and security issues because of direct client-server connection.
4. Three Tier Architecture
Scalability - Since the database server isn't aware of any users beyond
the application layer and the application layer implements load balancing,
there can be as many clients as you want.
Data Integrity - Data corruption and bad requests can be avoided
because of the checks performed in the application layer on each client
reques.
Security - The removal of the direct connection between the client and
server systems via abstraction reduces unauthorized access to the
database.
Disadvantages:
Increased complexity of implementation and communication. It
becomes difficult for this sort of interaction to take place due to the
presence of middle layers.
DBMS Architecture
o 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.
o The client/server architecture consists of many PCs and a workstation
which are connected via the network.
o DBMS architecture depends upon how users are connected to the database
to get their request done.
1-Tier Architecture
o In this architecture, the database is directly available to the user. It means
the user can directly sit on the DBMS and uses it.
o Any changes done here will directly be done on the database itself. It
doesn't provide a handy tool for end users.
o 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
o 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.
o The user interfaces and application programs are run on the client-side.
o The server side is responsible to provide the functionalities like: query
processing and transaction management.
o To communicate with the DBMS, client-side application establishes a
connection with the server side.
Fig: 2-tier Architecture
3-Tier Architecture
o The 3-Tier architecture contains another layer between the client and
server. In this architecture, client can't directly communicate with the
server.
o The application on the client-end interacts with an application server which
further communicates with the database system.
o 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.
o The 3-Tier architecture is used in case of large web application.
Fig: 3-tier Architecture
--------------------------------------------------------------------------------------------
The main objective of three level architecture is to enable multiple users to access
the same data with a personalized view while storing the underlying data only
once. Thus it separates the user's view from the physical structure of the database.
This separation is desirable for the following reasons:
1. Internal Level
o The internal level has an internal schema which describes the physical
storage structure of the database.
o The internal schema is also known as a physical schema.
o It uses the physical data model. It is used to define that how the data will
be stored in a block.
o The physical level is used to describe complex low-level data structures in
detail.
45.2M
769
History of Java
2. Conceptual Level
3. External Level
The three levels of DBMS architecture don't exist independently of each other.
There must be correspondence between the three levels i.e. how they actually
correspond with each other. DBMS is responsible for correspondence between
the three types of schema. This correspondence is called Mapping.
The Conceptual/ Internal Mapping lies between the conceptual level and the
internal level. Its role is to define the correspondence between the records and
fields of the conceptual level and files and data structures of the internal level.
The external/Conceptual Mapping lies between the external level and the
Conceptual level. Its role is to define the correspondence between a particular
external and the conceptual view.
Advantages of Three-schema Architecture
Following are the advantages of three schema architecture:
This architecture makes the database abstract. It is used to hide the details
of how data is physically stored in a computer system, which makes it
easier to use for a user.
This architecture allows each user to access the same database with a
different customized view of data.
This architecture enables a database admin to change the storage structure
of the database without affecting the user currently on the system.
In the above diagram, the entities are Teacher and Department. The attributes
of Teacher entity are Teacher_Name, Teacher_id, Age, Salary,
Mobile_Number. The attributes of entity Department entity are Dept_id,
Dept_name. The two entities are connected using the relationship. Here, each
teacher works for a department.
Features of ER Model
Graphical Representation for Better Understanding: It is very easy and
simple to understand so it can be used by the developers to communicate
with the stakeholders.
ER Diagram: ER diagram is used as a visual tool for representing the
model.
Database Design: This model helps the database designers to build the
database and is widely used in database design.
Advantages of ER Model
Example 1: In the below example, two entities E1 (2, Angel, 19, 8709054568)
and E2(4, Analisa, 21, 9847852156) form an entity set.
Example 2: We can form another entity set by taking three entities from the
table. (2, Angel, 19, 8709054568) , (3, Priya, 20, 9864257315) and (4,
Analisa, 21, 9847852156) can also form a entity set. Similary, we can form
any combination of the entity set using any of the entities from the entity type
'STUDENT'. Also, we can understand that if we take all the records to the
entity set we get the entity type 'STUDENT'. So, we can say that the entity type
is the superset of the entity set.
This is all about an entity, entity type and entity set. Hope you learned the
difference between these terms.
Relational Model
Relational Model is the most widely used model. In this model, the data is
maintained in the form of a two-dimensional table. All the information is stored
in the form of row and columns. The basic structure of a relational model is
tables. So, the tables are also called relations in the relational
model. Example: In this example, we have an Employee table.
Features of Relational Model
Tuples: Each row in the table is called tuple. A row contains all the
information about any instance of the object. In the above example, each
row has all the information about any specific individual like the first row
has information about John.
Attribute or field: Attributes are the property which defines the table or
relation. The values of the attribute should be from the same domain. In
the above example, we have different attributes of the employee like
Salary, Mobile_no, etc.
Advnatages of Relational Model
. Relationship
a. One-to-One Relationship
When only one instance of an entity is associated with the relationship, then it is
known as one to one relationship.
For example, A female can marry to one male, and a male can marry to one
female.
b. One-to-many relationship
When only one instance of the entity on the left, and more than one instance of
an entity on the right associates with the relationship then this is known as a one-
to-many relationship.
For example, Scientist can invent many inventions, but the invention is done by
the only specific scientist.
c. Many-to-one relationship
When more than one instance of the entity on the left, and only one instance of
an entity on the right associates with the relationship then it is known as a many-
to-one relationship.
For example, Student enrolls for only one course, but a course can have many
students.
d. Many-to-many relationship
When more than one instance of the entity on the left, and more than one instance
of an entity on the right associates with the relationship then it is known as a
many-to-many relationship.
For example, Employee can assign by many projects and project can have many
employees.
Difference between a database and a relational database
A relational database can store and arrange the data in the It is used to store the data as files
tabular form like rows and columns.
The data normalization feature is available in the relational It does not have a normalization.
database.
In a relational database, the values are stored as tables that Generally, it stores the data in
require a primary keys to possess the data in a database. navigational form.
It is designed to handle a huge collection of data and It is designed to handle the smal
multiple users. files that requires a single user.
A relational database uses integrity constraints rules that It does not follow any integrity c
are defined in ACID properties. utilize any security to protec
manipulation.
Stored data can be accessed from the relational database There is no relationship between
because there is a relationship between the tables and their stored in files.
attributes.
Advantages of relational databases
1. Simple Model: The simplest model of the relational database does not
require any complex structure or query to process the databases. It has a
simple architectural process as compared to a hierarchical database
structure. Its simple architecture can be handled with simple SQL queries
to access and design the relational database.
2. Data Accuracy: Relational databases can have multiples tables related to
each other through primary and foreign keys. There are fewer chances for
duplication of data fields. Therefore the accuracy of data in relational
database tables is greater than in any other database system.
3. Easy to access Data: The data can be easily accessed from the relational
database, and it does not follow any pattern or way to access the data. One
can access any data from a database table using SQL queries. Each table in
the associated database is joined through any relational queries such as join
and conditional descriptions to concatenate all tables to get the required
data.
4. Security: It sets a limit that allows specific users to use relational data in
RDBMS.
5. Collaborate: It allows multiple users to access the same database at a time.
Hierarchical Model
Hierarchical Model was the first DBMS model. This model organises the data
in the hierarchical tree structure. The hierarchy starts from the root which has
root data and then it expands in the form of a tree adding child node to the parent
node. This model easily represents some of the real-world relationships like
food recipes, sitemap of a website etc. Example: We can represent the
relationship between the shoes present on a shopping website in the following
way:
Features of a Hierarchical Model
Network Model
This model is an extension of the hierarchical model. It was the most popular
model before the relational model. This model is the same as the hierarchical
model, the only difference is that a record can have more than one parent. It
replaces the hierarchical tree with a graph. Example: In the example below we
can see that node student has two parents i.e. CSE Department and Library. This
was earlier not possible in the hierarchical model.
As more and more relationships need to be handled the system might get
complex. So, a user must be having detailed knowledge of the model to
work with the model.
Any change like updation, deletion, insertion is very complex.
You can use this stored data for computing and presentation. In many systems,
data independence is an essential function for components of the system.
Levels of Database
Before we learn Data Independence, a refresher on Database Levels is
important. The database has 3 levels as shown in the diagram below
1. Physical/Internal
2. Conceptual
3. External
With Physical independence, you can easily change the physical storage
structures or devices with an effect on the conceptual schema. Any change done
would be absorbed by the mapping between the conceptual and internal levels.
Physical data independence is achieved by the presence of the internal level of
the database and then the transformation from the conceptual level of the
database to the internal level.
1. External views
2. External API or programs
Any change made will be absorbed by the mapping between external and
conceptual levels.
You need to make changes in the Application program A change in the physical level usually does no
if new fields are added or deleted from the database. change at the Application program level.
Modification at the logical levels is significant Modifications made at the internal levels may
whenever the logical structures of the database are not be needed to improve the performance of
changed. structure.
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.
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.
This is the main component, as this is the program which controls everything.
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.
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.
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.