A database is an organized collection of data or set of related data.
Database has the capability of storing information, through which a user can retrieve stored information in an effective and efficient manner.
People use databases every day without realizing it. For example, a phone book is a database. The data contained consists of individuals’ names, addresses, and telephone numbers.
The main purpose of the database is to operate a large amount of information by storing, retrieving and managing.
There are many databases available like MySQL, Sybase, Oracle, MongoDB, Informix, Postgre, SQL Server etc.
Databases have evolved since their inception in the 1960s, beginning with hierarchical and network databases, through the 1980s with object-oriented databases, and today with SQL and NoSQL databases and cloud databases.
The following figure shows a simple structure of Database –
Data is organized into rows, columns, and tables, and it is indexed to make it easier to find relevant information. Data gets updated, expanded and deleted as new information is added.
Small databases can be maintained on personal-computer systems and may be used by individuals at home. In larger companies, the database is organized into big cloud servers.
Modern databases are managed using a database management system (DBMS). It allows users to interact with one or more databases and provides access to all of the data contained in the database.
Types of Database
There are mainly two types of databases –
- Relational Database
- Non-relational Database
Data is not organized in form of tables. Data is stored in form of key & value pairs. The examples of non-relational databases are: JSON & XML.
We cannot interact with non-relational databases using SQL.
In relational database, data is organized in form of tables. A table contains rows and columns of data. Table has a unique key to identify each row of the table.
SQL is used to interact with relational databases. We often refer relational database as SQL database.