T1. Databases Flashcards
What is a database?
A database is a collection of data items structured so that data can be searched and retrieved when necessary.
What are the main features of a relational database?
Data is stored in tables consisting of records. Each record is uniquely identified by a primary key. The tables are linked via primary keys and foreign keys.
What is an attribute?
An attribute is each data item within an entity, such as the Title of the Book.
What is an entity?
An entity is an object or subject about which information is stored, such as a member.
What is a primary key?
A primary key is an attribute which uniquely identifies an entity record, such as BookID.
What is a composite key?
A composite key consists of two or more key fields, each of which may be a primary key in another table, which together uniquely identifies an entity occurrence.
What is a foreign key?
A foreign key is a key field in a table which is not the primary key in this table, but which defines a link to another table, example CustID.
What is referential integrity?
Referential integrity means a foreign key must correspond to a valid/existing primary key.
What is data duplication?
Data duplication refers to data which is re-entered frequently, taking up unnecessary data space and becoming redundant.
What is data inconsistency?
Data inconsistency occurs when data is entered many times, increasing the chance of error.
What is a logical data model?
A logical data model is produced during the design of the database and is independent of the database software. It identifies the relations between entities, the attributes, and keys for each entity.
What is a physical data model?
A physical data model is produced during implementation and defines the physical structure of the database, including table structure, column names, data types, and validation rules.
What is un-normalised data form?
To create un-normalised data form, select a name for the main entity and list each field contained within the entity in brackets. Primary keys are underlined, foreign keys are represented with *, and repeating groups are contained within {}.
What is data modelling?
Data modelling is used when designing relational databases. It produces Entity Relationship (ER) diagrams and constructs plans for the table design.
What is First Normal Form (1NF)?
Data is said to be in 1NF if all attributes are atomic and entities do not have repeating groups.
What is Second Normal Form (2NF)?
Data is in 2NF if it fulfills the conditions for 1NF and all non-key attributes in the relation are fully dependent on the primary key.
What is Third Normal Form (3NF)?
Data is in 3NF if it is in 2NF and there are no non-key dependencies, meaning an attribute does not depend on another attribute that is not the primary key.
What are the components of a data dictionary?
A data dictionary contains descriptions about the data held in a database, including field name, field size, formal, default value, identification of keys, and validation rules.
What is SQL?
SQL is a programming language for creating, accessing, and manipulating databases. It provides commands to create tables and to insert, search, update, and delete records.
What is QBE?
QBE provides a graphical way of querying a database, where the user enters commands, example elements, and conditions into a blank form to specify fields and values to be used in a query. QBE generates SQL code.