Topic 3: Exchanging Data Flashcards
What is Normalisation
- The process of designing a relational database.
- Aims to produce the best and most effective design
What are some considerations of normalisation
- Remove redundant or duplicated components.
- Ensure data in linked tables is consistent.
- Allow complex queries to be carried out.
- Ensure records can be added or removed without problems.
What is first normal form
Attributes may contain a single value only
What is second normal form
- In First Normal Form.
- Partial dependencies are not allowed.
What is Third Normal Form
- In Second Normal Form.
- Non key dependencies are not allowed.
What is Run Length Encoding
- A lossless compression method.
- Repeated values are replaced with a single instance of the value and the number of times the value occurs.
- It relies on all consecutive pieces of data being the same.
- It offers poor reduction in file size if there is little repetition.
What is Indexing
- Stores the position of each record when records are ordered by a certain attribute.
- The primary key is automatically indexed.
- Allows data to be found and accessed quickly
Ways of Capturing Data
- There are many ways to capture the data needed for a database.
- The most appropriate way will depend on the type and quantity of data needed and available resources.
- Data may be manually entered by a human or scanned in using optical character recognition, sensors or barcodes.
What are the 3 types of Entity Relationship Modelling
One - One
One - Many
Many - Many
What is One - One ERM
Each Entity can be associated with one other entity only
What is One - Many ERM
A single record can be associated with many records in another table
What is Many - Many ERM
Each record in one entity can be associated with multiple records in another entity, and vice versa
What is SQL used for
To sort, structure and filter the data
What is Referential Integrity
- Ensures consistency.
- Ensures that information is not removed if it is needed elsewhere in the database.
What is Transaction Processing
- A single operation executed on data.
- Must be processed in line with ACID
What is ACID
Atomicity
Consistency
Isolation
Durability
What is Atomicity
The whole transaction must be processed
What is Consistency
Transactions must maintain the referential integrity rules between linked tables
What is Isolation
Executing transactions at the same time must produce the same result as if they were executed one after the other.
What is Durability
When a transaction has been executed it will not be undone
What is Record Locking
- Prevents records being accessed by more than one transaction at the same time.
- Prevents inconsistencies and data loss.
- Can result in deadlock.
What is a Redundancy
- Multiple copies of the data are kept in different physical locations.
- If data in one copy is lost or damaged it can be retrieved from another copy.
What are the 3 main SQL commands
SELECT
FROM
WHERE
What does LIKE mean in SQL
Used to specify wildcard criteria in conjunction with the % character
e.g. Searching for records that contain a specific word pattern
What does JOIN do in SQL
Allows rows from multiple tables to be returned
and defines how the tables are linked.
What does INSERT INTO do in SQL
Inserts a new record into an existing table
What does DELETE do in SQL
Deletes a record from a table
What does DROP do in SQL
Deletes an Entire table
What is an Entity
An entity is item about which information is stored such as books, or customers
What is an Attribute
Attributes are the categories in which data is collected such as height or name
What is a Flat File Database
- Consists of a single file.
- Usually based around a single entity.
- Only one table.
What is a Relational Database
- Uses many tables to store data about different entities.
- These tables are linked together.
What is a Primary Key
- A unique identifier, different for each object in the database
- Usually and ID number or other unique ID