Databases – theory only Flashcards
What is a database?
A database is a software program used to store data in a structured way.
What is a field?
Each is a single item of data and has a field name, which is used to identify it within a database. Remember to use underscores for spaces
What is a record?
Collection of fields which may contain different data types
What is a flat file database?
Flat File database: stores data in one table, which is organised by rows and columns.
What is a relational database?
Relational database: stores data in more that one linked table, stored in a file. They are designed so that the same data is not stored many times. The links are called relations.
What are the advantages of flat file database?
- All records are stored in one place
- Easy to understand
- Good option for small databases
- Requires less hardware and software components
What are the disadvantages of flat file database?
- Harder to update
- Harder to change data format
- Can only hold one table not multiple
- Data inconsistency
What are the advantages of relational databases?
- Since there are several tables, some of which can be made to be confidential if necessary
- Multiple users will be able to access a relational database at the same time
- Does not requite any specific path to access data
- Reduces data inconsistency and better for accuracy
What are the disadvantages of relational databases?
- Some relational databases have a limit on field lengths
- They are isolated databases
- While using the relational database over multiple servers, its structure changes and becomes difficult to handle, especially when the quantity of the data is large
- Harder to search
What is the alphanumeric data type?
Used to store text and numbers not used for calculations. This is called a ‘text’ field in Microsoft Access.
What is the numeric data type?
A data type that is used to store numeric values that may be used for calculations
What are the sub types of numeric data?
- Integer: sub-type which stores whole numbers
- Decimal: sub-type, which will allow a large number of decimal places, or a specified restricted number if this is set in the field properties when the database is created
- Currency: sub-type, money
- Boolean - data type that stores data as 0/-1 but can display it as Yes/No. A tick box can be used as Boolean and gender
What is a primary key?
Most tables will have a primary key field that holds unique data and is the field used to identify that record.
What is a foreign key?
A foreign key field in one data table that stores values from a primary key field in another table.
What do you have to include for caluclations?
What you want to calculate: [x_y][7_y]
e.g. Total_Costs: [Meal_Cost][Guest]