Database
Database A database is a structured collection of data stored in a computer system. It is managed by a Database Management System (DBMS), which facilitates the storage, retrieval, and manipulation of data. Databases are categorized into two common types: Relational and NoSQL.
Structured vs. Unstructured Database
This section will cover briefly what's the different between structure and unstructured data.
Structured Data:
This is data that is organized into a predefined schema or format, such as tables with rows and columns. Examples include:- Customer data (name, age, email) stored in spreadsheets or relational databases.
- Financial records, transaction logs, etc.
- Structured data is easily searchable and can be queried using SQL.
Unstructured Data:
This is data that does not have a predefined format or organization. Examples include:- Text files, emails, images, videos, social media posts, etc.
- Unstructured data often requires specialized tools like NoSQL databases or machine learning models to process and analyze effectively.
Relational Database
A Relational Database uses a structured, table-based format to store data. These databases rely on a SQL-based system (Structured Query Language) for communication and querying. Data in relational databases is organized into rows and columns, making it intuitive, efficient, and suitable for complex relationships between data. Examples of relational databases include:
- MySQL
- PostgreSQL
- Oracle Database
NoSQL Database
A NoSQL Database is designed for unstructured or semi-structured data. Unlike relational databases, NoSQL databases use various models such as key-value pairs, documents, wide-columns, or graphs to store data. They are optimized for scalability, flexibility, and high-performance workloads. Examples of NoSQL databases include:
- MongoDB (document-based)
- Redis (key-value store)
- Cassandra (wide-column store)
Database Management System (DBMS)
A Database Management System (DBMS) is the core software responsible for managing the database. It allows users to perform CRUD operations (“Create, Read, Update, and Delete”) on the data. The DBMS acts as an intermediary between users and the database, ensuring data integrity, security, and efficient access.
Features of a DBMS:
- CRUD Operations: Enables data creation, retrieval, updates, and deletion.
- Data Management: Organizes and structures data.
- Access Control: Ensures secure access to data with user roles and permissions.
- Concurrency Management: Handles multiple simultaneous operations efficiently.
- Backup & Recovery: Provides tools to safeguard data and restore it in case of failure.
Types of DBMS by Database:
SQL-based (Relational DBMS):
- Examples: MySQL, PostgreSQL, Oracle Database.
- Best for structured data and complex queries.
NoSQL-based (Non-Relational DBMS):
- Examples: MongoDB, Redis, Cassandra.
- Best for large-scale, distributed, or unstructured data.