1.3.2: Databases Flashcards
What is a Relational Database?
- A database that recognises the differences between entities by creating different tables for each identity
What is an Entity?
- An item of interest about which information is stored
- (A category of object, person, an event)
What is a Flat File?
- A database consisting of a single file
What will a Flat File be based around?
- Most likely be based around a single entity and its attributes
- Are typically written out as: Entity1(Attribute1, Attribute2, Attribute3…) E.g. Car(CarID, Age, Price)
What is the Primary Key?
- The unique identifier for each record in the table
- What is different for each row of the table
- The Primary Key is always underlined in a table
What does the Secondary Key allow for?
- The database to be searched quickly
What is a Foreign Key?
- A key existing as the Primary Key in one table but having travelled to another table is no longer the Primary Key
- Foreign Keys are shown using an asterisk in the table
What is a One-To-One relationship?
- Each entity can only be linked to one other entity
- [A single line used to connect two entities]
What is a One-To-Many relationship?
- One table can be associated with many other tables
- [A single line on one side, with a branch on the other]
What is a Many-To-Many relationship?
- One entity can be associated with many other entities and vice versa
- [Branches on both sides]
What is Normalisation?
- The process of coming up with the best possible layout for a relational database
What does Normalisation attempt to accomplish?
- No redundancy (Unnecessary duplicates)
- Consistent data throughout linked tables
- Records can be added and removed without issues
- Complex queries can be carried out
What is the criteria for First Normal Form?
- There must be no attribute containing more than a single value
- Field names unique
- Field values from same domain
- Values in fields atomic
- Records can’t be identical
- Must have a primary key
What is the criteria for Second Normal Form?
- A database that doesn’t have any partial dependencies and is in First Normal Form (No attributes can depend on part of a composite key)
What is the criteria for Third Normal Form?
- The database is in Second Normal Form and contains no non-key dependencies (The attribute only depends on the value of the Primary Key and nothing else)
What is Indexing?
- A method used to store the position of each record ordered by a certain attribute
What is Indexing used for?
- Looking up and accessing data quickly
Why is the Primary Key almost never queried?
- The Primary Key is automatically indexed
- It is not usually remembered therefore almost never queried
Why are Secondary Keys used for Indexing?
- To make the table easier and faster to search through
How is data Captured?
- Data needs to be input into the database, the chosen method is always dependent on the context
What is Magnetic Ink Character Recognition used for?
- To scan bank cheques: All the details excluding the amount are printed
What is Optical Mark Recognition used for?
- Multiple choice questions on a test
What is Optical Character Recognition used for?
- Other data capturing forms
What is Selecting data?
- An important part of data preprocessing
- Could involve only selecting data that fits a certain criteria to reduce the volume on input
How can collected data be Managed?
- Using SQL to sort, restructure, and select certain sections
What is Exchanging data?
- The process of transferring the collected data, commonly through Electronic Data Interchange
What are the advantages of Electronic Data Interchange?
- Doesn’t require human interaction and enables data transfer from one computer to another
What is Structured Query Language?
- A Declarative Language (From the Declarative Programming Paradigm) used to manipulate databases