RDBMS structure

Relational Database Management Systems (RDBMS) are designed to store, organise and manage data in a structured format using tables. Their structural characteristics provide a robust framework for handling relationships and ensuring data integrity.

  1. Data types and field sizes
    • Data types: RDBMS supports various data types, such as:
      • Text / string: For storing characters or words.
      • Numeric: Integer, float or decimal values for calculations.
      • Date / time: For temporal data.
      • Boolean: For true / false values.
    • Field sizes: Define the maximum size or length of data in a field (e.g., VARCHAR(50) limits text to 50 characters). This helps optimise storage and maintain consistency.
  2. Data in tables
    • Tables: Data is stored in tables, which consist of rows (records) and columns (fields).
    • Normalisation: Data is organised to minimise redundancy and improve data integrity.
    • Rows: Represent individual records or data entries.
    • Columns: Define the attributes or properties of the data, such as "Name" or "Age."
  3. Relationships using primary and foreign key fields
    • Primary key:
      • A unique identifier for each record in a table.
      • Ensures no duplicate rows and enforces data integrity.
      • Example: "CustomerID" in a customers table.
    • Foreign key:
      • A field in one table that references the primary key in another table.
      • Establishes relationships between tables (e.g., linking orders to customers).
    • Types of relationships:
      • One-to-one: A single record in one table relates to one record in another.
      • One-to-many: A single record in one table relates to multiple records in another.
      • Many-to-many: Requires a junction table to manage relationships between multiple records in two tables.
  4. Use of SQL to generate queries
    • SQL (Structured Query Language):
      • The standard language for interacting with RDBMS.
      • Used for data retrieval, manipulation and management.
      • Common SQL operations include:
        • SELECT: Retrieve specific data from one or more tables.
        • INSERT: Add new records to a table.
        • UPDATE: Modify existing data.
        • DELETE: Remove records.
      • Queries can include conditions (WHERE), sorting (ORDER BY), and aggregations (GROUP BY, SUM, AVG).

RDBMS provides a flexible and efficient framework for managing structured data, ensuring relationships and integrity through primary and foreign keys, and enabling dynamic data manipulation using SQL.

Reflection: SQL superpowers

Read and reflect upon this question.

  • Data's structure: How does the structured nature of RDBMS make it easier to manage and analyse large amounts of data compared to unstructured data formats?