Database Systems

Database Systems

Components of a Database System

  • Database: An organised collection of data structured into tables.
  • Database Management System (DBMS): The software that interacts with the database for creating, retrieving, updating and managing data.
  • Tables: Also known as relations, they are composed of rows (records) and columns (fields).
  • Forms: A user interface for data input and editing within the DBMS.
  • Queries: Data requests written in a specific database language like SQL to retrieve or manipulate data.
  • Reports: Summarised and presentable forms of data output, useful for decision making.

Database Models

  • Hierarchical Database: Data is structured in a tree-like model, using parent-child relationships. Each parent can have many children, but each child can have only one parent.
  • Network Database: Similar to the hierarchical database but more flexible as it allows each child to have multiple parents.
  • Relational Database: Stores data in separate tables that are related to each other through primary keys and foreign keys. It is the most common database model due to its flexibility.

Keys in Databases

  • Primary Key: A unique identifier for each record in a table. Every table in a relational database has a primary key.
  • Foreign Key: A field in a table that is a primary key in another table. Foreign keys create logical relationships between tables.
  • Composite Key: A key that is composed of multiple columns (fields) to identify a unique record.

Normalisation

  • Normalisation is the process of organising data in a database to reduce redundancy and improve data integrity. It is typically implemented during database design.

Introduction to SQL

  • SQL (Structured Query Language) is a standardised language used to manage and manipulate relational databases.
  • Basic commands include SELECT for retrieving data, INSERT INTO for adding new data, UPDATE for modifying data, and DELETE for removing data.

Fundamentals of Database Security

  • Authentication: Verifying the identity of a user, process, or device, often as a prerequisite to allowing access to a database.
  • Authorisation: The process of giving someone permission to do or have something. In terms of databases, it determines what operations a user can perform.
  • Encryption: Security measure that disguises data to prevent unauthorised access to sensitive information in a database.
  • Backup: A copy of a file or entire database, made regularly to prevent data loss from hardware failures or other disasters.