Introduction to Database Management System
What is DBMS used for?
Answer: DBMS, commonly known as Database Management System, is an application system whose main purpose revolves around the data. This is a system that allows its user to store the data, define it, retrieve it and update the information about the data inside the database.
Q #2) What is meant by a Database?
Answer: In simple terms, Database is a collection of data in some organized way to facilitate its user’s to easily access, manage and upload the data.
Q #3) Why is the use of DBMS recommended? Explain by listing some of its major advantages.
Answer: Some of the major advantages of DBMS are as follows:
Controlled Redundancy: DBMS supports a mechanism to control the redundancy of data inside the database by integrating all the data into a single database and as data is stored at only one place, the duplicity of data does not happen.
Data Sharing: Sharing of data among multiple users simultaneously can also be done in DBMS as the same database will be shared among all the users and by different application programs.
Backup and Recovery Facility: DBMS minimizes the pain of creating the backup of data again and again by providing a feature of ‘backup and recovery’ which automatically creates the data backup and restores the data whenever required.
Enforcement of Integrity Constraints: Integrity Constraints are very important to be enforced on the data so that the refined data after putting some constraints are stored in the database and this is followed by DBMS.
Independence of data: It simply means that you can change the structure of the data without affecting the structure of any of the application programs.
Q #4) What is the purpose of normalization in DBMS?
Answer: Normalization is the process of analyzing the relational schemas which are based on their respective functional dependencies and the primary keys in order to fulfill certain properties.
The properties include:
To minimize the redundancy of the data.
To minimize the Insert, Delete and Update Anomalies.
Q #5) What are the different types of languages that are available in the DBMS?
Answer: Basically, there are 3 types of languages in the DBMS as mentioned below:
DDL: DDL is Data Definition Language which is used to define the database and schema structure by using some set of SQL Queries like CREATE, ALTER, TRUNCATE, DROP and RENAME.
DCL: DCL is Data Control Language which is used to control the access of the users inside the database by using some set of SQL Queries like GRANT and REVOKE.
DML: DML is Data Manipulation Language which is used to do some manipulations in the database like Insertion, Deletion, etc. by using some set of SQL Queries like SELECT, INSERT, DELETE and UPDATE.
File System :
The file system is basically a way of arranging the files in a storage medium like a hard disk. The file system organizes the files and helps in the retrieval of files when they are required. File systems consist of different files which are grouped into directories. The directories further contain other folders and files. The file system performs basic operations like management, file naming, giving access rules, etc.Example: NTFS(New Technology File System), EXT(Extended 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.
The database system consists of many components. Each component performs very significant tasks in the database management system environment. A database environment is a collective system of components that comprise and regulates the group of data, management, and use of data, which consist of software, hardware, people, techniques of handling database, and the data also. DBMS have several components. Below is a list of components within the database and its environment. The DBMS can be classified into five main components which are explained as follows:
Hardware
Software
Data
Procedures
Database Access Language
People
Hardware
The hardware refers to the physical parts of the computer and It also includes some various storage devices like hard disk and input output devices like monitor, printer etc.
Hardware is the most visible part of any information system: the equipment such as computers, scanners and printers that is used to capture data, transform it and present it to the user as output.
The hardware is the actual computer system used for keeping and accessing the database.
Servers have large data storage capacities enabling users to share files and application software, although processing will typically occur on the user’s machine.
Workstations, which provide high-level performance for individual users in computationally intensive fields such as engineering.
Databases run on a range of machines from microcomputers to mainframes. This also provides the interface between computers and real-world systems.
When we run oracle or MySQL on our personal computer, then our computer hard disk, our keyboard with which we type in all the commands, our computers RAM, and ROM all become a part of the DBMS hardware.
Software
The main component of a Database management system is the software.
Software is a collection or set of programs, or instructions that tell a computer what to do. The software comprises the entire set of programs, procedures, and routines associated with the operation of a computer system. A set of instructions that directs a computer’s hardware to perform a task is called a program, or software program.
It also includes the database software, operating system, network software used to share the data with other users, and the applications used to access the data.
This software component is capable of understanding the Database Access Language and converting it into actual database commands to execute or run them on the database.
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.
Some DBMS software examples include MySQL, PostgreSQL, Microsoft Access, SQL Server, FileMaker, Oracle, RDBMS, dBASE, Clipper, and FoxPro.
Data
The word data covers the collection of facts stored in the database. Because data are the raw material from which information is generated
Data stored in the database includes structure data, non-structural data, logical data.
Structured data is highly specific and is stored in a predefined format, where unstructured data is a conglomeration of many varied types of data that are stored in their native formats. This means that structured data takes advantage of schema-on-write and unstructured data employs schema-on-read.
Using a DBMS the database is first constructed, created or defined. After that the desired data is stored, accessed, and updated to the created database.
The primary reason behind the introduction of the database management system is to store and maintain the data within the database
It is the most important component of the database management system. The typical database contains both the metadata(data about data) and the actual(operational) data.
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.
Procedures
Procedures refer to general instructions to use a database management system. This includes procedures to setup and install a DBMS, To login and logout of DBMS software, to manage databases, to take backups, generating reports etc.
Procedures can be used for data validation, access control, or to reduce network traffic between clients and the DBMS servers. Extensive and complex business logic can be embedded into the subroutine, thereby offering better performance.
The basic purpose of the procedures is to help guide users to the operation and management of database systems.
Database Procedures are similar to Database Functions. The major difference is the way in which they are invoked – Database Functions can be used in the same way as for any other expression within SQL statements, whereas Database Procedures must be invoked using the CALL or EXEC statement, depending on the DBMS.
In Enterprise Architect, Database Procedures can be model in one of two ways:
As individual objects (the default method)
As operations in a container
CREATE [OR REPLACE] PROCEDURE procedure_name (<Argument> {IN, OUT, IN OUT} <Datatype>,...)
IS
Declaration section<variable, constant> ;
BEGIN
Execution section
EXCEPTION
Exception section
END
Database Access Language
Database Access Language is a simple language that allows users to write commands to perform the desired operations on the data that is stored in the database.
Database Access Language is a language used to write commands to access, upsert, and delete data stored in a database.
Users can write commands or query the database using Database Access Language before submitting them to the database for execution.
Through utilizing the language, users can create new databases, and tables, insert data, and delete data.
The examples of database languages are SQL(structured query language), My Access, Oracle, etc. A database language is comprised of two languages
Data Definition Language (DDL), which is used to construct a database. DDL implements database schema at the physical, logical, and external levels.
The following commands serve as the base for all DDL commands:
ALTER<object>
COMMENT
CREATE<object>
DESCRIBE<object>
DROP<object>
SHOW<object>
USE<object>
Data Manipulation Language (DML), which is used to access a database. The DML provides the statements to retrieve, modify, insert and delete the data from the database.
The following commands serve as the base for all DML commands:
INSERT
UPDATE
DELETE
LOCK
CALL
EXPLAIN PLAN
People
The people who control and manage the databases and perform different types of operations on the database in the DBMS.
The people include database administrator, software developer and End-user.
Database administrator-database administrator is the one who manages the complete database management system. DBA takes care of the security of the DBMS, its availability, managing the license keys, managing user accounts and access, etc.
Software developer- theThis user group is involved in developing and designing the parts of DBMs. They can handle massive quantities of data, modify and edit databases, design and develop new databases, and troubleshoot database issues.
End user – These days all modern applications, web or mobile, store user data. How do you think they do it? Yes, applications are programmed in such a way that they collect user data and store the data on a DBMS system running on their server. End users are the ones who store, retrieve, update, and delete data.
The users of the database can be classified into different groups
Native Users
Online Users
Sophisticated Users
Specialized Users
Application Users
DBA – Database Administrator
What is the difference between the component and the module of the database?
Conclusion
A DBMS makes it possible for end users to create, read, update and delete data in a database. The DBMS essentially serves as an interface between the database and end users or application programs ensuring that data is consistently organized and remains easily accessible.
Maybe you don’t realize it but you probably use a database almost every day of your life. You will no doubt be familiar with using a search engine like google. Library database:- A library stores details of all their books in a database. When you want to know if a book is in stock in OPAC you can enter either title, author, or ISBN number and search information about the book. You can find out how many copies are stored not only by your SDTML Library but also other toss branch libraries. The database also records details of all the borrowers. When they return their books the librarian will be informed if they are overdue and whether there are any fines outstanding. So this is the simple example that we can think of the component of the DBMS.
Applications of DBMS
Database Management systems are widely used. We use everything from playing games to shopping online. Everywhere DBMS software is used. Let’s understand the applications of DBMS in real life-
Online Shopping
We all must have purchased stuff online. We do what is, simply create an account on an E-commerce company’s website like Flipkart, Amazon, etc. And place the order of the product we require. And these companies keep a record of all of our information like name, phone, email, address, orders, etc.
Not only the customer information, but these companies also store the data that belongs to themselves for fulfilling the customer requirements like – Products List, Quantity available, purchases, sales, etc.
So these companies are using the database to store our information. And managing their database, they are using the database management software.
In the above image, Online shopping applications use Database and Database Management System software at the backend to serve the services to the customers.
Reservation System
We all have reserved seats in many places like- Movie theaters, Train Tickets, Airline tickets, etc. While booking, we are required to provide our details so that particular seat is reserved with me. So here also these reservations systems are using the database and database management system for achieving this. The data stores are like – Customer name, train number, price, date, etc. And these details are required to identify the correct person during the trip.
Telephone Companies
Telephone companies can’t even survive without databases and Database management systems. We all are using sim cards for calling and for internet access. And we might even wonder how these mobile operator companies keep track of the daily data limit, as well as the calls we made? They are using the database management software and database for storing our data. They store the data and generate the mobile bills as per our usage. That is all achieved with the help of the DBMS. Not even only the mobile companies, Internet Service providers, etc are also using DBMS.
Manufacturing Companies
Manufacturing companies usually keep a record of the products they build and for that, they are using the database and database management system. DBMS helps a lot in manufacturing companies because a giant manufacturing company (ex Samsung Manufacturing company for Display) is manufacturing tons of products daily. And also they are selling them to different companies. So keeping these records with the help of DBMS becomes very easy to manage.
Military
Military information is very crucial information. And every country has military and details of the soldiers. This information is kept very securely and that security feature is provided by the DBMS. The government stores military information like – Details of the soldiers, Operations performed by soldiers, locations, etc.
Human Resources management
Every large company has its Human Resource Team that takes care of all the things related to employees of the company like – Employee Salary, Employee Other Benefits, Employees Other services like Leaves Taxation, etc. So here also the Database management System is extensively used. Because it creates ease in maintaining all these things.
Universities and Colleges
Universities have to deal with lots of student data, courses in which the students are enrolled, Professors teaching for particular subjects, departments, Colleges attached with it, etc. And maintaining these records is very cumbersome without the help of Databases. So here also the database management system is used to keep the details of all these things.
Banking
Banking is the palace where a database management system is the main thing on which the bank operations can be performed. Bank stores information related to the customers like available account balance, transactions, loans, etc. And also the details related to the bank operation.
Previously, the banking operations were performed with the registers. In which the officials maintain the ledger. And the person depositing the money can only withdraw the money from the same branch. But with the help of databases, it becomes easy to manage these all things and global access for the customer of their money.
Income Tax Department
Every person has a unique number, with the help of this number the income tax department keeps track of all the details related to the person. Like – Income, Tax Paid, Credit Score, etc. And these all are centrally managed by the income tax department by connecting the person’s pieces of information from the banks with the help of a database. So here also Database Management Systems are used for maintaining all of these records.
Library Management System
Libraries have books, and usually, the library provides the books to the customers for reading, and then the customer returns the book to the library. So which custom has taken which book, what is the due date to return the book, what are the charges on taking that book, etc all need to be managed. So here also databases are used to manage all these records effectively.
Social Media Sites
We all have an account on social media like Facebook, Instagram, Linkedin, etc. But have we wondered how we can login and see the posts of our friends that we are connected to on social media. Or how friends are connected with our account? These all are managed with the help of a database management system. Social media sites usually store our information to make all operations possible.
Mobile Games
We all have played online mobile games. In that, we created an account, and the character we have earned, coins earned, levels, etc are stored. So how are these all possible? These all are possible with the help of the database and database management system so the data received to us is very fast with low latency.
Mobile Application
Mobile applications like contacts, in which we store the contact number and names of the people are also using the small database in our phone. And also other core operations on mobile like settings, user account, mobile password, etc are using database and database management systems to store all these things.
Conclusion
Database Management System is an essential part of the data to manage. It has a lot of the real-world applications listed above. Every digital gadget that stored any kind of piece of information has a database running somewhere behind. In the ongoing technology evolution, data is everything. These data are scattered. So to manage these data, we need a database management system that helps in managing these data. And large tech giants like Google, Amazon, etc are extensively using DBMS to organize their data.
Why DBMS?
Before the databases, the data are stored in a file using comma-separated values. That we call it the (.csv) file. Storing data in (.csv) files is all good when there are small data. But for large data, it is not a good idea to store the data in a (.csv) file. Because searching data from files and storing (updating) data in the files are a major tasks. And making it efficient can’t be managed by every software engineer.
So to solve this problem the database management system came into existence. Database Management System is the software that is responsible for accessing and storing data from the database efficiently. In the end, data are stored on the drives. But how it should be stored and how efficiently the things related to these are managed by DBMS Software.
Wherever there is the requirement of accessing the data from the database, then that needs to be asked to the DBMS software and DBMS Software gives the data. DBMS is the manager of the data.
DBMS 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 to 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.
DBMS 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, the 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 the case of the large web application.
Assignment :
1. Define data and information in DBMS.
2. What is DBMS used for?
3. What is meant by a Database?
4. Why is the use of DBMS recommended? Explain by listing some of its
major advantages.
5. Explain the File system and DBMS.
6. Differentiate between the file system and DBMS in the table.
7. Mention and explain the function of DBMS.
8. List the properties of the Database
9. List major popular DBMS software and explain them.
10. Explain the component of the database management system.
11. Explain the components of DBMS briefly with a diagram.
12. Develop the architecture of DBMS and explain it.
0 Comments