Summary -
In this topic, we described about the below sections -
What is database?
Database is a systematic collection of data, then it can easily modify, read, and write. The main purpose of the database is to operate a large amount of information by storing, retrieving, and managing data. Database is combination of fields, records, files. It can store data only once. Database is interlinked that information of one file can combined with another file to get exact result.
Types of Databases
There are different types of databases as follows
- Non-relational Database
- Relational Database
Non-relational Database
A collection of data in the form of keys & values which is not organised is called Non-relational Database.
For Ex - JSON, XML.
Relational Database
A collection of data in the form which is organised by following some kind of rules is called Relational Database. In this type, all the data will be stored in the form of tables. SQL is used to interact with relational database. It is easy to relate multiple tables to fetch the required information.
Database Components
The components of database are explained as below -
- Data - Data is useful distinct information. It is most important thing in the Database. DBMS process and stores the data.
- Hardware - It is a group of physical electronic devices such as I/O devices, storage devices. Complete physical module of a computer system like mouse, memory, hard disc, printer comes under this. It acts like an interface between computers and real-world systems.
- Software - It is a set of programs that are used to manage the data in database. DBMS is used to manage data in database. Operating system manages all the computer data.
- Procedure - It is a set of rules and instructions to guide users on how to use database in order to design and run DBMS.
- Database Access Language - It is used to access data from database. TO insert the new data into the database or fetching data from database, we use database access language commands as per our requirement.
In this, we re using SQL as a Database Access Language to store, read and update data stored in a relational database. SQL is a standardised language to interact with RDBMS (Relational Database Management System). SQL is used to perform all types of data operations in RDBMS.
In Database, data is stored in the form of tables. Table consists of rows and columns. These rows and columns are indexed to get easily accessible.
Advantages of Database -
- Duplicate data is reduced
- Wastage of space is reduced
- It requires less time to fetch data
- Data security increases
- Data integrity increases
- Data consistency increases
Disadvantages of Database
- It is complex
- Cost increases by additional requirement of hardware, software.
- The large size matters in some situations.
What are the operations Can perform on Database using SQL?
SQL can perform various operations on the database that includes creating, renaming, deleting, selecting and many more. The below list specifies most popular operation on the database and those are –
- CREATE Database
- DROP Database
- RENAME Database
- SELECT Database
- BACKUP Database
We will discuss about these operations in the further chapters.