DATABASE
DATABASE
TOPIC: DATABASE
Databases are structured collections of data that are organized and stored for efficient retrieval and
manipulation. They play a critical role in various applications, from managing business information to
supporting websites and applications. Here are some fundamental concepts related to databases:
Types of Databases:
1. Relational Databases: These databases use tables (relations) to store data, and relationships
between data are defined through keys. Common relational database management systems
(DBMS) include:
MySQL
PostgreSQL
Oracle Database
SQLite
3. NewSQL Databases: These databases attempt to combine the benefits of both relational and
NoSQL databases. They aim to provide the scalability of NoSQL while maintaining ACID
(Atomicity, Consistency, Isolation, Durability) properties. Examples include Google Spanner and
CockroachDB.
1. Table: A fundamental database object that stores data in rows and columns.
3. Field/Column: A specific data attribute within a table that represents a particular piece of
information.
4. Primary Key: A unique identifier for each record in a table, used to ensure data integrity and
enforce relationships.
5. Foreign Key: A field in one table that references the primary key in another table to establish
relationships between tables.
6. Index: A data structure that enhances data retrieval speed by creating a lookup mechanism for
specific columns.
7. Query: A request for data from a database using SQL (Structured Query Language) or a query
language specific to the DBMS.
2. Network Database: Data is organized using a more complex structure of sets and subsets,
allowing multiple relationships. CODASYL databases are an example.
3. Relational Database: Data is organized in tables with rows and columns, and relationships are
established through keys.
4. Object-Oriented Database: Data is stored as objects with attributes and methods, suitable for
object-oriented programming languages.
5. Document Database: Stores data in a document format (e.g., JSON, XML) and is suitable for
semi-structured data.
6. Graph Database: Designed to handle data with complex relationships, making it efficient for
graph-like structures.
7. Column-Family Database: Designed for storing and retrieving columns of data, often used in big
data and NoSQL databases.
The choice of database type and organization depends on the specific requirements of an application,
including data volume, complexity, and performance considerations.