Storing data is crucial for the preservation of knowledge. The archives that give us a look into our past exist because information was gathered and stored for reference.
The way data is stored has also evolved over the years. From writing on cave walls to scrolls and books, and more recently, to digital notebooks and digital storage systems.
As data-driven problem-solving grows in popularity, likewise the different methods of storage. Databases are a more modern way of storing data, and this method of storing data is conveniently and easily accessible.
In this article, we’ll explore the definitions and types of databases, including their importance in storing personal or business data. But before diving into databases, let’s talk about data.
What is Data?
Data can be basic values or facts. Computers use data to perform tasks or process it to produce information. In fact, computers need data because, without it, they wouldn’t function as they should.
There are different ways to represent and organise data, particularly data used in computer systems and how it is represented in digital form and organised in databases. Data can be represented as either digital or analogue;
Digital data can also be images, videos, and software, all of which can be shared over networks without losing their quality over time.
Data is generated through various means, like manual entry (e.g., filling out forms) or social interactions (e.g., comments). All of this data and information gathered must be stored somewhere and processed to develop meaningful insights.
This is where databases become useful, as they provide a structured and efficient way to store and manage data. Data storage has evolved with the introduction of databases and database management systems technology. Data is organised in a structured way that allows easy storage, retrieval and management
What is a Database?
A database is an organised collection of structured data or information stored in a computer system. It is used for storing, maintaining, and accessing a variety of data, which can be organised in tables, rows, columns, and indexes to facilitate easy retrieval of relevant information.
Databases are also used to extract business intelligence, aiding in decision-making that benefits the customers.
Purpose of a Database
The different purposes for using or creating a database include;
To keep track of information: Storing all data in one area is efficient, and it ensures that you keep track of data and also receive the most updated version of data.
Consistency: The database helps to maintain data integrity and accuracy, which ensures that data remains consistent across multiple instances and is always organised.
Manage large amounts of data: Database systems manage large volumes of data, and can be used to quickly access, modify, and essentially manage data efficiently.
Improved Decision Making: Databases provide data on insights into a company's sales trend or other relevant information that the business requires. This data can help businesses make better and more informed decisions.
Data Security: Database secure data. It also ensures that it maintains backup copies to restore the database in case there's a breach or failure.
Types of Databases
There are different types of databases and they are classified according to how they organise data. The different types include;
Centralised Database: This database operates within a single location. The database is located on a central database management system, and users can access the database using a computer network.
However, the central computer handles data access and maintains the security of the database with the help of a DBMS for instance. This type of database is used by large organisations or universities.
Relational Database: A relational database stores and provides access to data that are related to one another. It is based on a relational model which is an intuitive way of representing data in tables. An example would be storing user's information like name, phone number, email address, etc.
Object-oriented Database: This type of database represents data as objects and classes. An object can contain information, such as a student with attributes like name, ID, etc. While a class defines the structure and behaviour of the objects. It can be used for handling large and complex data and relationships.
Cloud Database: A cloud database typically runs on a cloud computing platform. In a cloud database, data is stored on a server and the information is available online, making it easy to access files from anywhere as long as an internet connection is available. A user can build a cloud database or use a cloud database provided as a service.
Hierarchical Databases: This database organises data into a tree-like structure where each record is represented as a node. The node is connected to a parent node that can have one or multiple child nodes, which form a parent-child relationship.
Child nodes can have their own set of child nodes which creates a hierarchy that models one-to-many relationships between records. An example could be a record for clothing (parent node), then we have male and female clothing (children nodes), and then different types of designs like shirts, blouses (children of the child node), etc.
NoSQL Databases: This is also referred to as an unstructured or non-relational database. It does not follow the tabular structure of organising data, instead it follows other data models like; key-value pairs, JSON or XML formats, etc. The lack of rigid structure allows it to process large amounts of data and makes it easier to scale.
Distributed Databases: This is a database that is spread across multiple devices instead of being stored on a single device. It operates across different machines either within the same location or across a network, allowing data distribution, and availability and ensuring data is consistent and accessible across all devices.
Personal Databases: A personal database is one designed for individual use. It is typically on a mobile device or personal computer. It can be used to manage budget, store important dates, and any other personal information.
Operational Databases: This type of database allows users to modify databases in real-time, especially in business analytics and inventory. Data is organised in a tabular form, which means entries and retrieval of data can be made quickly. It also supports high volumes of data, ensuring that any modification is processed fast.
Network Database: This type of database uses a flexible model to represent data relationships. The child records can associate with multiple parent records which causes a network of databases linked with multiple threads.
For example: In an education network database, records of students, departments, courses, and course scores can be linked together in a flexible, interconnected structure. A student can be associated with multiple courses, each of which is linked to the student’s corresponding scores.
This interconnected structure allows for efficient management of complex data relationships where a connection across different data entries can be established and navigated easily and efficiently.
Today, databases are managed by a database management system. DBMS are used by professionals to create and manage databases, which are containers for storing and organising data.
What is DBMS?
A DBMS is a software used for creating and managing databases, allowing you to create, read, update and delete data in a database.
There are different purposes of a DBMS including;
Having a centralised database with centralised control of data by the database administrator within a DBMS control helps to manage and reduce redundancy, which is duplication of data.
Centralised control of data helps define integrity constraints within the database. This ensures that data in the database is reliable and accurate.
Data is managed by the DBMS and access to data is managed by the database administrator DBA which leads to effective data processing.
DBMS is managed by the Database Administrator (DBA) which means the DBA has authority over operational data and ensures the only means of access to the Database is through proper and secure channels. This means the DBA can also define authorization checks when sensitive data access is requested.
Limitations of Database Management Systems (DBMS) include;
DBMS can be a bit complex, which is why developers need to understand how to use the software properly to maximise its usage.
DBMS uses large amounts of memory because of its complexity and functionality to run efficiently.
DBMS works on a centralised system, meaning users from all over can access this database, therefore, if there's a failure, it'll affect users connected to the database.
Architecture of Database Management System [DBMS]
One-Tier Architecture
This is considered the easiest DBMS architecture. Users of this system have direct access to the database; therefore, they can interact, execute, and manage operations in the DBMS as both client and server are available on the same machine. One-tier architecture is simple, cost-effective and easy to implement. As an added advantage, there is no need for external network connectivity to be able to carry out database operations.
Two-Tier Architecture
This consists of a Database and some applications that access it. This follows a server-client model where the application on the client side communicates with the database on the server side.
For this to occur, ODBC (Object Database connectivity) and JDBC (Java Database connectivity) which are sets of rules recommended for efficient communication with a database are used in this interaction.
The client side is where the user interface and application programs are run. The application on the client side connects with the server side to communicate with the DBMS.
Separation of client and server allows for better scalability, performance, and security and also introduces network dependency, which makes the application performance reliant on the quality of network connectivity.
Two-Tier architecture makes it easy to retrieve data from a database, it is cheaper than Three-Tier architecture, and it is easy to understand and deploy.
Three-Tier Architecture
This consists of a Database, an intermediate layer in between the data and an application called a server, and multiple other applications.
In this architecture, the client does not communicate directly with the server; it, however, interacts with an application server that communicates with the database system to enable querying and transaction management. The intermediate layer acts as the middleman for the exchange of data between the server and the client.
The Three-tier architecture is the most common type of architecture because it offers better security, scalability, and reliability. For instance, unlike one-tier architecture, which relies on a single server and causes service disruption when there’s an issue with the server, a three-tier architecture ensures that the entire service is not affected by such disruptions.
Database Management Systems can be classified into relational and non-relational databases:
Relational Database: This type of database stores data in tables using rows and columns representing data attributes and the relationship between the data values.
Relational databases use SQL (Structured Query Language) for querying and managing data.
SQL is a programming language for storing and processing data in a relational database. Database professionals use SQL directly by writing and executing queries against data within databases.
As individuals, when we use it in executing searches or when we submit or save something, an SQL statement is generated to retrieve the relevant data.
SQL integrates well with different programming languages, which is why it's frequently used in different types of applications.
- MySQL
- PostgreSQL
- SQLServer
- SQLite
- MariaDB
Note: All relational DBMS support SQL standard
Non-Relational Database: Non-Relational databases are based on data structures like documents, key-value pairs, and graphs; they do not store data in tabular form. They can handle large data because they are designed in a way that data can be spread across numerous servers. This makes it easier for scaling as data grows and it's also great for performance.
Examples of Non-Relational Database Management Systems Include;
- MongoDB
- Cassandra
- Firebase Realtime
- DynamoDB
- Apache HBase
Summary
Everything we do passes through a database, when we visit a website and fill in certain information, we’re providing it data, or when we visit a search engine to ask “What does a pygmy three-toed sloth look like?”, we’re retrieving data from a database. This means whatever we do digitally involves inputting or retrieving data.
Frequently Asked Questions
How do graph databases differ from traditional relational databases?
Graph databases prioritize relationships between data points, representing them as nodes and edges. In contrast, traditional relational databases organize data into structured tables with predefined schemas, focusing less on complex relationships.
Can NoSQL completely replace relational databases?
NoSQL can complement relational databases but may not fully replace them due to different strengths.
Why is transactional integrity more emphasized in SQL databases?
Transactional integrity, ensured through ACID compliance, is crucial for applications that require reliable data consistency, such as financial systems, e-commerce platforms, and inventory management systems. SQL databases emphasize transactional integrity to guarantee that all transactions are processed securely and accurately.
How does Verpex Hosting handle databases for JavaScript hosting?
We support both SQL (like MySQL, PostgreSQL) and NoSQL (such as MongoDB) databases for JavaScript hosting, ensuring seamless integration and management for Node.js applications.
Jessica Agorye is a developer based in Lagos, Nigeria. A witty creative with a love for life, she is dedicated to sharing insights and inspiring others through her writing. With over 5 years of writing experience, she believes that content is king.
View all posts by Jessica Agorye