Week 1 Relationship Databases Flashcards
What are the 3 layers of Business Databases?
1) Front-end Clients (HTML, JavaScript)
2) Domain Server (Java, Python, PERL)
3) Storage & Database Servers (SQL)
What are the properties of a transaction?
There has to be:
1) An agreed upon proposal
2) Both ends of the proposal to be fulfiled.
What is a Foreign and Primary Key?
Foreign Key is a Primary Key that is being referred to outside of the Primary Key’s Database.
Why do we need databases? Why can’t we just use word, excel…?
Databases allow for con-current and on-going transactions to happen and can manage those automatically (Automatic Transactional Mechanisms). While spreadsheets and word does not have the capabilities of contantly updating by itself.
What are the 4 problems when it comes to storing redundant data?
1) Could end up deleting some, but not all, instances of data.
2) Might only be able to update some, but not all, instances of data.
3) Inserting multiple data entries can introduce inconsistency.
4) Multiple data entry is expensive.
How do you know which column is the Primary Key?
The Primary Key should be underlined to represent the unique trait.
Why do you have to create the Foreign Key table first?
You have to create he Foreign Key table first as without the Foreign Key already created the Main table will come back with an error as it would not be able to find the key you are trying to link.
Why should you include aliases when using SQL commands?
You should include aliiases as it protects your information from potiential users while also keeping the columns neat and organised.
What are the properties of ACID?
A) Atomicity
If a transaction has two or more discrete pieces of information, either all of the pieces are committed or none are.
C) Consistency
A transaction either creates a valid new database state, or, if any failure occurs, the transaction manager returns the database to its prior state.
I) Isolation
A transaction in process and not yet committed must remain isolated from any other transaction.
D) Durability
Committed data are saved by the DBMS, so that in the event of a failure and system recovery, these data are available in their correct state.