What is database, its types and examples?

What is Database?

A database is a collection of information or data which are organized in such a way that it can be easily accessed, managed and retrieved.

Database is abbreviated ad DB.

Different definitions of the database

  1. “a usually large collection of data organized especially for rapid search and retrieval (as by a computer) an online database” (merriam-webster)
  2. “a comprehensive collection of related data organized for convenient access, generally in a computer.” (dictionary)
  3. A database is an organized collection of data. (Wikipedia)

What is data?

It is used as both singular and plural form. It can be a quantity, symbol or character on which operations are performed. Data is information which is converted into digital form.

Growth of Database

Database was evolved in the 1960’s started with the hierarchical database. Relational database was invented by EF Codd in 1970s while object oriented database was invented in 1980s. In 1990s object-oriented database rose with the growth of object oriented programming languages. Nowadays, databases with SQL and NoSQL are popular.

growth of database

Image source: slideshare

Elements of Database

Database elements are fields, rows, columns, tables. All these are building blocks of database.

Table

A database table consists of rows and columns which contain data. For example, you have a table that stores profiles of individuals that is, ID, name, address and contact details.

database table

Rows

Rows contain data having one or more columns. Reading data in rows is easier to understand the information. For example, reading a profile having ID, name, address and contact a single record in one row.

Columns

Columns are similar to fields, individual items that contain data. In above example a profile record has a name, address and contact have three columns.

Fields

A field is a piece of a record and contains a single piece of data. In the above example of database field is “Leeds” as a single cell.

Components of database

The database has following four main components:

Data

Data has a lot of importance in database. It ranges from small to huge quantity and forms the main source for rest components to interact with each other. Data is  categorized into further two types, one user data that is responsible for database. It is stored in different tables in the form of rows and columns. Second is metadata also called data about data. It contains information about data, for example, names of tables in database, constraints of database, primary keys and foreign keys etc.

DBMS

Database management system is a software or application that enable the user to interact with the database, thus allowing users to insert, retrieve, update and delete data.

Database Application

It is an application program that helps users to interact with the database by using query languages. Database applications have no idea about the underlying DBMS. The operations performed on data are handled by structured query language (SQL).

User

Users are the persons who use the database for accessing data. Types of database users include administrators, developers, and the end users.

Database System Environment

Database environment involves hardware, database, software, procedure, data, and users. Hardware includes physical parts and devices, software is operating system and database management system, a database is a collection and procedures involves set of rules that governs the design and usage of database, while data is a collection of information and users may be administrators, database designers and end users who use database to access data.

Types of Database

There are many categories of database but some most common categories:-

  1. Centralized database
  2. Cloud database
  3. Distributed database
  4. Document Oriented database
  5. Navigational database
  6. Object oriented database
  7. Relational database

Centralized Database

As the name shows, the centralized database stores information and application programs at a central place where it is accessed by users from different remote locations.

The application programs retrieve the appropriate data from the database based on the transactions sent by the communication controller for processing of a transaction.

Data validation and verification is carried out by the central application programs and a registration number is allotted by the application programs located at central point.

Cloud database

Cloud database has scalable content and runs on cloud computing platform. It provides scalability and availability of database. It can be accessed through web interface or API (provided by vendor).

The benefit of cloud database is that it enables the enterprise users to host database without buying dedicated hardware.

It can be managed by a user or by a provider as a service also called database as a service(DBaaS). 

Distributed database

The processing in a distributed database is replicated among different points of a network, as portions of database are stored in different physical locations.

There are two types of distributed database; homogeneous and heterogeneous. In homogeneous type, the physical locations have same underlying hardware and same operating systems and database applications while in case of heterogeneous type of database; the operating system, database applications and hardware may be different at different locations. 

[yellowbox]You may also like: Difference between Cloud Computing and Distributed Computing[/yellowbox]

Document oriented database 

A special computer program is designed to store, retrieve and manage document oriented information. It is also called document store database.

Unlike relational database, the model of document oriented database is not in a structured form of tables, rows, and columns.

Document oriented database is one of the main type of NoSQL database.

Data is encoded using standard formats like XML, JSON and BSON as well as binary formats that is, PDF and MS-Word etc.

Most popular example of document oriented database is MongoDB. Data is grouped into sets called collections which have unique names in database.

Navigational database

In navigational database, objects are found by following reference from other objects. These types of databases were common when data was stored on magnetic tapes. The navigational reference was used to point out where the next record is stored.

Navigational access is usually associated with the hierarchical model and network models. Navigational techniques use pointers and path to navigate among records. Navigation is characterized by instructions like “next”, “previous” etc.

Object oriented database

Unlike other databases which depend upon actions and data, the object oriented database is organized around objects

Object oriented database is suited for those items which are created by object oriented programming languages.

For example, a record in database can be a data object rather than alphanumeric values. Objects consist of attributes and methods. These have data as well as executable codes.

Attribute: The data which define characteristics of an object.

Methods: It shows behavior of an object, formerly called functions.

Another important term used in object oriented programming languages is classes. Class is a template for an object.

Object oriented database is used in multimedia applications, commerce projects, computer aided design projects etc.

The main advantage of object oriented database is that there is no need for assembly and disassembly of object ultimately save time in coding and execution. The concurrency control also becomes better in the projects. 

Operational database

Operational database contains information pertaining to operations of an enterprise.

Such kind of databases is generally organized on functional lines such as marketing, production, employees, etc.

For example, a company may use an operational database to keep track of quantity of different products in a warehouse. Similarly, in the online web store, such databases may be used to view the quantity of stock sold.

The operational database work as a source for data warehouse. It can be SQL-based and NoSQL-based.

Operational database management system is also referred as On-Line Transaction Processing database(OLTP). 

Relational database

Relational database was invented in 1970’s by EF Codd at IBM. Relational database management systems(RDBMS) are meant for better performance to manage data in desktop database applications especially due to their multiple user access who can work with data simultaneously.

The data is stored in tabular form so that it can easily be accessed. These are made with a set of tables. The set of tables makes a schema and a number of schemas create a database.

These databases are easy to extend and a new category can be added to existing database without modifying all existing applications.

The standard interface for relational database is Structured Query Language(SQL).

NoSQL Database

NoSQL databases are non-relational database and provide storage mechanism other than tabular format. NoSQL database are mostly used in big data and real time web applications. These are also called “Not only SQL” as they support for SQL like languages.

The classification of NoSQL database includes document, key-value and graph.

Relational data can be handled in NoSQL database using multiple queries, caching, replication and non-normalized data.

Characteristics of database 

The data in a database should have the following features:

  • The data is organized and related.
  • The data in database is shared among different users and applications.
  • The data in database is persistent.
  • The data is secured from unauthorized access.
  • The data in database is non-redundant.
  • Validity and integrity of data is also ensured in database.
  • The data is easily accessible and available to users as and when required.

Advantages of Database

  • Enhanced and improved data security.
  • Data redundancy is reduced.
  • The consistency of data is increased.
  • Data integrity and independence.
  • Improved data access to users through use of host and query languages
  • Development of new applications program is facilitated

Disadvantages of Database

  • Time is consumed in designing complex database systems
  • Damage to database affects virtually all applications programs
  • Considerable hardware and software start-up costs
  • Extensive conversion costs in shifting from a file-based system to a database system
  • Training is required for all programmers and users