Relational Databases

Cards (5)

  • What is a Database
    • A Database is an organised collection of data 
    • It allows easy storage, retrieval, and management of information 
    • Electronic databases offer a number of key benefits: 
    • Easier to add, delete, modify and update data 
    • Data can be backed up and copied easier 
    • Multiple users, from multiple locations, can access the same database at the same time
  • Database Terminology
  • Indexing (Secondary Keys) #1
    • Indexing is a technique used to speed up data retrieval in a database 
    • It works in a similar way to the index in a book  
    • If a student had a maths book and wanted to find the section on factorising, they could start at the first page and look at each page in turn until they found the section they wanted  
    • But this would be slow, so it is better to look in the index  to find where the factorising section is and just go directly to it
  • Indexing (Secondary Keys)#2
    • Likewise in a database, certain columns can be indexed so that the DBMS does not have to look at every single record during a search and can just go to the relevant records directly
    • This can greatly speed up searches  
    • Fields that are indexed are known as secondary keys 
  • Flat File vs Relational Database 
    A flat file database is one that stores all data in a single table 
    It is simple and easy to understand but causes data redundancy, inefficient storage and is harder to maintain 
    A relational database is one that organises data into multiple tables  
    It uses keys to connect related data which reduces data redundancy, makes efficient use of storage and is easier to maintain