Computing - Databases Flashcards
What is a database?
A store that is:
Persistent (held on permanent storage)
Related (all bits of information related to each other)
Organised (stored in structured predictable way)
In what 3 ways can a database be viewed at?
External
Conceptual
Physical
What is external view?
This is what the user sees and is designed to be useful for a particular job
What is conceptual view?
This shows how the data and tables are organised and linked
What is physical view?
The code that shows how the data is actually stored
Designers and users of the database don’t see this
What are the 2 ways that you can construct a database?
Flat file
Hierarchical
What is the difference between a flat file database and a hierarchical database
Flat file is a single table that is set up like a spreadsheet
Hierarchical is when items are linked like branches in a tree instead of an organised table
What is the most commonly used database language?
SQL
Structured query language
What is a DBMS?
A database management system is a system that provides the software tools to create, maintain and interrogate a database
What 7 things must a DBMS do?
Allow data sharing
Allow multiple user access
Allow multiple application to work on them
Hold only one copy of the data
Make it possible to change data without changing applications
Provide multiple views
Present different users with data in different ways
What is the ACID test?
All database transactions must be:
Atomic (change is completely performed or not at all)
Consistent (must take a database from one consistent state to another)
Isolated (should not be visible to any other user or transaction until it is completed)
Durable (when a change is made, it must not be lost due to a subsequent failure)
What is referential integrity?
Different applications must not cause conflicts meaning records are locked to other applications while one application is using it
What are relational databases?
Database with multiple tables that are linked to reduce data redundancy
What is data redundancy?
The storing of the same data in multiple locations
What are entities?
Something in the real world that some data is about
What are attributes?
Something that describes an entity (eg. last name)
What is the difference between a field and a record?
A field is like a cell in a spreadsheet, it contains a single attribute
A record is often a row in a table, it contains all of the attributes about an entity
What is the difference between a primary key and a foreign key?
A primary key is a field that is chosen to be unique for that record (usually a reference number)
A foreign key is a field that is not unique but links to a primary key in another table
What are forms?
Screen designs that present only the data the user needs
What are queries?
Used to link tables and extract the data required for some purpose
What is a boolean expression?
A value that can be only true or false
What are reports?
An output from a database due to what the user needs
An example of an output is a spreadsheet or text document
What are modules?
The units of code that have been written by the user in a DBMS