---
# System prepended metadata

title: Database Management for Beginners

---

# Database Management for Beginners

![IMG_256](https://lh5.googleusercontent.com/vLKXnUqPFCNmmaTEUb0bav9G7K7YV3U4mjQV8tpS2d5pi5SVgllS3ojy5ODfKaj8gj2zaJzlVL7YD7hPKGaGihuh_aPgJkyHxJjOIWWAg0fARSl4hCcAs4q_VX2hxg56cAxi4JI)

[Source](https://s7280.pcdn.co/wp-content/uploads/2016/06/database-blue.png)

## What is a Database?

A database is simply a collection of data or records, which is organized in a manner that we can perform operations on it. These records are stored in the form of tables with rows and columns. Rows are known as tuples and columns are known as attributes of the database.

A database stores its metadata in a data dictionary. Metadata is any information about the data, like its schema, constraints, structure, etc. 

## What is a Database Management System?

Database management is basically the management of different types of data, such as textual data, numerical data, and binary data with the use of database management systems.

A database management system or DBMS is a software used to manage a database (stored data). Some well-known DBMSs are MySQL, PostgreSQL, etc. A DBMS provides us a platform to interact with data, store it, and use it.

Let's see some popular DBMSs in detail.

### MySQL

The first popular database we will discuss is MySQL. So, [what is MySQL](https://en.wikipedia.org/wiki/MySQL)? It is an open source relational database management system (RDBMS) that organizes data into data tables, which helps in structuring the data. 

It uses SQL, which is a language, used to create, modify, and extract data from databases. MySQL is developed by Oracle Corporation.

MySQL is used by big MNCs like Youtube, Facebook, Paypal, Netflix, Uber, and many more.

### PostgreSQL

The next database we will turn to is PostgreSQL. And, [what is PostgreSQL?](https://www.openlogic.com/blog/what-is-postgresql) It is a free, open-source relational database management system (RDBMS). It's an enterprise-class database that provides extensibility and is compatible with SQL. It's also known as Postgres.

Postgres transacts with [ACID properties](https://www.geeksforgeeks.org/acid-properties-in-dbms/) (Atomicity, Consistency, Isolation, Durability). It supports both SQL (relational) and JSON (non-relational) querying. PostgreSQL is used by MNCs like Apple, Instagram, Spotify, NASA, etc.

### MongoDB

And not the final DB you should know about: [What is MongoDB?](https://www.mongodb.com/) It is a document database which provides scaling and helps in the development process as it has the same structure as some programming languages. In MongoDB, a record is composed of key(field) and value pairs.

MongoDB has many unique features---replication, indexing, load-balancing, server-side Java execution, etc. It can be used as a file system and provides serverless accessibility.

MongoDB is also available as an on-demand fully managed service. MongoDB Atlas runs on AWS, Microsoft Azure, and Google Cloud Platform. Big companies like Forbes, Google, Toyota, KPMG, and many more use MongoDB.

## What are the Types of DBMS?

### Hierarchical DBMS

A hierarchical DBMS organizes data in a tree-like structure, either in a top-down or bottom-up design. It's defined by a parent-child relationship.

There are two types of relationships:
-   one-to-one: A parent has a single child.
-   one-to-many: A parent has multiple children.

One child can't have multiple parents.

![IMG_256](https://lh5.googleusercontent.com/mQPD9Xag0cRAfu537w9RwWaBFO6lDQ2Hs91voTVfs-Z6O2BMD5WloULVW6aOS7Wv2KKyR6VjO20rivP8HgGIrTl3iULSBtxWeUCQEWOgtde-TFHHBHDAw7MG5KrOiHr0sqb0AZU)

[Source](https://assets-global.website-files.com/5debb9b4f88fbc3f702d579e/60957895922cdf1ccc04cf66_hierarchical-database-diagram.png)

### Network DBMS

A Network DBMS is an extension of a hierarchical DBMS in which data can have many-to-many relationships and appears in the form of a network. In this database structure, a child can have multiple parents. Therefore, it allows you to model more intricate relationships.

![IMG_256](https://lh6.googleusercontent.com/YbdP0EE5lpKiS-1bmy5J8QPe7pSTDDQz4yqDm5lJoxH94VnhuhIsvR--4VKFUq9uVRsKapSceEBNeZKf8YTatU1DFqOkwodsIPofCe3-BaAaGy1v72OKC9DUuGr8NqdbIsF_nbc)

[Source](https://miro.medium.com/max/1400/1*ZuDEekCV_ScCSLSS8rT17g.png)

### Relational DBMS

A relational DBMS uses a logical relationship of entities to create a database. It's one of the most extensively used arrangements for organizing databases. It organizes and stores data in independent tables and allows them to relate and connect with one another.

The data stored in this is structured and can be accessed/modified by SQL.

![IMG_256](https://lh4.googleusercontent.com/09IhS-LZzxaYHcoYGuAdNb3NhiYsxSYGkEwNnLylIWNrYCkJAUlIRCO8KU4aW6jAsLodtbOTPpZlqJtR2KufjTIsIrXD-Af_KxRBrW0IowNeXfvfCxefr-yQp8nFu24q3fwsF5Y)

[Source](https://image.slidesharecdn.com/qkyd0fqnshudfiqh1gze-signature-b00b7e26786e448a9438a5e7a46bd568dbe79c6f8aa718c0ef5ec168127fd4f9-poli-160413023002/95/database-management-system-9-638.jpg?cb=1460514896)

### Object-Oriented DBMS

An object-oriented DBMS describes data as an object that stores values and operations. Objects with similar features are grouped as a class. This is compatible with many OOPS languages, like C++, Python, Java, Scala, etc.

![IMG_256](https://lh4.googleusercontent.com/xgdlURFNRYlKFN4SwfJPWSSjjNk0Zre6GqW6TJiBcfL925r0oM1DLPidHMPF8uK9BtCWF0o3Bt_3nHQOsbPQ9d4isHyfYrsPdDL31jxnTu7XmgFLtV39SNS1zgdwToxGDnZ6bE0)

[Source](http://www.databaseguides.com/wp-content/uploads/2012/03/Object-Database-Model.gif)

### NoSQL DBMS

A NoSQL DBMS is used to store a wide range of data sets. It's not a relational database. We can further divide it into four types:

1.  **Key-value storage:**  Every item is stored in the key-value format.
2.  **Document-oriented storage:** It stores data in JSON-like documents. It stores data in the same format as used in the application code.
3.  **Graph database:** It stores vast amounts of data in a graph-like structure.
4.  **Wide-column stores:** Data is stored in large columns together, instead of storing in rows.

## What are Database Languages?

Database languages are used to read, store, and update data in the database. These are used to express database queries and updates.

1.  **Data Definition Language (DDL):** It's used to define a database's structure and patterns. You can create the skeleton of the database. It's used to store the metadata in a database, like schemas, constraints, etc.
2.  **Data Manipulation Language (DML):** It's used for accessing and manipulating data in databases. It handles user requests, like SELECT, INSERT, UPDATE, etc.
3.  **Data Control Language (DCL):** It's used to retrieve stored data. Its execution is transactional. It includes tasks like GRANT, REVOKE, etc.
4.  **Transaction Control Language (TCL):** It's used to run the changes made by the DML. It can be grouped into logical transactions. This includes tasks like COMMIT, ROLLBACK, etc.

## Why Do We Need DBMS?

DBMSs provide the following advantages:

- Data sharing: With a DBMS, it's easy to share data using the correct authorization protocol. Multiple users can access and work on data concurrently.
- Data integration: They store all data in one database file, which removes redundancy and improves integration of data.
- Efficient and safe: It saves time in maintenance and operations. Also, due to their in-built authorization protocols, the data is safer. DBMSs provide better confidentiality and safety guidelines. It reduces a lot of external efforts from users.
- Backups and Better view of data: A DBMS provides well-managed and structured data, on which operations are easy to perform and observations and decisions can be made more effectively. It also provides backup subsystems, which help when there is some problem or crash. It restores your data if required.

## Conclusion
Data is the future. In times like these where everything is online, there is a ton of data generated on a daily basis. All this tells us that data is very important. With different types of large, unstructured data, there is a need to manage that and use that in a way that would be helpful for all. There are many roles and streams developing for this duty like Data Engineer or Data Scientist, but it all starts with a Database Management System.