Chapter 8 - Databases Flashcards

(23 cards)

1
Q

What are the limitations of using a file based approach for the storage and retrieval of data?

A
  • data redundancy as the same data is stored in multiple files, leading to duplication
  • data inconsistency when one file is updated but other aren’t, leading to unreliable data; additionally it is difficult to update data since changes must be made in multiple areas, increasing time and risk of error
  • lack of data integrity since it’s harder to ensure data is consistent and accurate over multiple files
  • poor security as there is limited control over who can access and modify different files
  • limited scalability as it is not suitable for large volumes of data or complex data relationships
  • no central control and bad data management since each application manages its own data
  • hard to manage relationships as cannot easily link related data across files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe the features of a relational database that address the limitations of a file based approach

A
  • organises data into multiple tables instead of a single table
  • uses keys to connect related data which reduces data redundancy, makes efficient use of storage, and is easier to maintain
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

entity

A

a real world object or concept that data is stored about

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

table

A

a collection of data about an entity, organised in rows and columns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

record/tuple

A

a single row in a table representing one instance of an entity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

field/attribute

A

a single column in a table, storing one piece of data about the entity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

primary key

A

a unique identifier for each record in a table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

candidate key

A

a field or a combination of fields that could be used as a primary key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

secondary key

A

a key used for searching and sorting which is not necessarily unique

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

foreign key

A

a filed that links to a primary key in another table to create relationships

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

relationships

A

a logical connection between two tables/entities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

one-to-one

A

one record in a table relates to one record in another table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

one-to-many

A

one record in a table relates to many records in another table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

many-to-many

A

records in one table relate to multiple records in another

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

referential integrity

A

ensures foreign keys match a primary key in the related table to prevent broken links

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

indexing

A

a technique to speed up searching in a table by creating an ordered list of key fields

17
Q

first normal form

A
  • contains atomic values
  • no repeating groups
  • has unique column names
  • has a primary key
18
Q

second normal form

A
  • fulfil all 1nf requirements
  • have a compound primary key
  • have full functional dependency (all non-prime attributes must be fully dependent on the primary key)
  • have no partial dependencies (separate tables should be created for partially dependent attributes)
19
Q

third normal form

A
  • fulfil all 2nf requirements
  • have no transitive dependencies (non prime attributes must not rely on other non-prime attributes)
  • have separate tables for attributes with transitive dependencies which are linked with a foreign key
20
Q

what is a DBMS?

A

software that is used to create, manage, and interact with databases

21
Q

describe the features of a DBMS that address the limitations of a file-based approach

A
  • eliminates data redundancy by centralising data
  • ensures data consistency by updating a single source of truth
  • has good data management by utilising a data dictionary that defines all data elements across the system (field name, data type, table name)
  • uses data modelling tools to define entities and relationships
  • uses logical schema to show how data is organised and is used independently of how it is physically stored
  • high data security by utilising user accounts, access rights, and permissions
  • has automated backup and recovery tools to reduce the risk of data loss
22
Q

what is the purpose of the developer interface DBMS tool?

A
  • allows developers to write database queries using SQL
  • more flexible than using query-by-example tools
  • allows the developer to create more complex and precise queries to search, update, or manage data
23
Q

what is the purpose of the query processor DBMS tool?

A
  • responsible for handling and executing SQL queries
  • consists of:
  • DDL interpreter: interprets DDL commands and updates data dictionary
  • DML compiler: compiles DML statements into low level instructions and optimises the query
  • query evaluation engine: executes the compiled instructions to retrieve or manipulate the actual data in the database