click below
click below
Normal Size Small Size show me how
databases
1.3.2 - databases
Term | Definition |
---|---|
database | an organised collection of data |
tables / entities (overall a file) | where all the data is stored |
records / rows / tuples | the information regarding one item (eg a student) |
fields / columns / attributes | a type of characteristic items would fall under (eg hair colour) |
flat file database description | databases that only contain a singular table ie there are no relationships between the tables in a file |
flat file database pros / cons | can be easy to set up / make, but often includes a lot of redundancy and maintenance issues the bigger the table is |
relational databases | where there is some kind of relationship that means that given a piece of information from the primary table, more information is found via the secondary one |
common fields | the piece of data that relates databases together (often the same as the foreign key) |
key fields | a field where the piece of data that is unique for each record there has to be at least one for each table in a database |
entity-relationship diagrams (ERDs) | represents the kind of relationship between tables in a file |
One to One relationships (1:1) | given one piece of information from one table, there is only be one result from the other table (eg only one student will have one ID number) |
One to Many relationships (1:M) | given one piece of information from one table, there are multiple results from another table (eg in a given class, one teacher will have multiple students but not the other way around) |
Many to Many relationships (M:M) (UNF - unnormalized data) | given multiple pieces of information in one table, there are multiple results from another table (eg a teacher will have multiple students, who then have multiple teachers in return in a school), generally considered “bad practice” |
normalisation | the process of converting a M:M relationship to another one |
composite keys | When multiple attributes are used to uniquely define a record |
referential integrity | no foreign key in one table can not reference a non-existent field in another table |
key types | whilst all key fields are unique, only the primary key is used when searching. all other key fields are secondary keys |
capturing | how data is collected and put into the database |
selecting | how data is queried and retrived |
managing | how data is manipulated |
exchanging | how data is transferred to other people |
paper based forms | where data is collected on paper, then manually inputted into a digital database. Proper care must be done when designing the form for errors to be limited. |
Optical Character Recognition (OCR) | using technology to automatically read font-based text |
Optical Mark Recognition (OMR) | Efficiently collects data such as multiple choice tests and lottery tickets) |
other examples of capturing data | magnetic strips (library cards) Chips and pin (bank cards) Smart cart readers (apple pay) Barcodes (self-checkout aisle) Qr Codes (microsoft forms) Sensors (microphones) |
Structured Query Language (SQL) | the msot common query language used in databases, done via SELECT FROM WHERE |
Query By Example (QBE) | the first graphical query language, forming the front-end of most databases. Removes the need to use SQL's syntax |
Database Manipulation Languages (DMls) | languages that allow for the modification of data once the datahbase has been made, often done using UPDATE, DELETE or INSERTS |
Database Managent Systems (DBMSs) | uses a graphical interface to abstract the details of database design from the user whilst still following all the rules and managing all the errors. |
exchanging data types | can be done in file types like XML and JSON or Comma-seperated Value files (CSVs) |
manual method examples of exchanging data | uses of secondary storage, emails, paper based |
automated method example of exchanging data | Electronic Data Interchange (EDI) allows for data to be transferred automatically, however that includes any errors in the documents. |
First Normal Form (1NF) | when the database contains no repeating attributes or groups or fields and is atomic (1 field can't contain multiple data items) |
Second Normal Form (2NF) | is in 1NF and has no partial dependencies and can only occur if the primary key is a composite key |
Third Normal Form (3NF) | is in 2NF and contains no non-key dependencies - "All fields are dependent on the key, the whole key and nothing but the key" |
ACID | Atomicity, Consistency, Isolation, Durability done so that the integrity of the database is mantained |
reduncancy | any uneeded/unwanted data (ie multiple repeats of data) |
transactions | a single logical operation (the overall act of an item which can contain multiple "steps") |
Atomicity | a transaction is either FULLY processed, or NOT AT ALL there are no "half-done transactions" |
Consistency | no transaction can violate any pre-defined validation rules ie referential integrity is always upheld |
Isolation | Concurrent executions of transactions is equal to sequencial transactions in terms of their outputs |
Durability | Once a transaction has been committed, it will continue until it is" finished" - each part can remain on storage until it is done and THEN the database is changed |
Record locking | the process of preventing multiple users from changing the same objects in a given time frame in a multi-user system |
Deadlocking | if two records are updated at the same time such that neither can continue, an "infiinte" delay can occur |