U1T2 - Databases Flashcards
Databases
What is a database?
Collection of data shareable between diff apps. Structured so data can be searched. + retrieved.
What are the disadvantages of a paper database?
Lots of paper, 1 person at time, long time to find, docs get lost.
What are the advantages of computer databases?
Lots data, small space, quick, less likely to be lost + multiple users at once.
What are the disadvantages of computer databases?
Comp equip expensive to buy + install, data collection + setup expensive, staff need training + if system fails, can’t get info.
What is a logical database model?
Determines if all business’s requirements gathered.
What does a logical database model do?
Identifies entities + relationships with keys and attributes. Produced during design phase. Gather info about business needs, doesn’t design database, used across various database software + implementations, includes ERD, business process diagrams + user feedback documentation.
What is physical database modelling?
Depends on software being used in organisation. Software specific.
What does a physical database model do?
Produced during implementation. Describes table content, fields + records + criteria. Derived from logical. Required for database design, software + hardware specific + has indexes + constraints, includes server model diagram, database design documentation + user feedback documentation.
Flat-file System
Single table used to hold all data for app. 1 row for each record + 1 column for each field. Data redundancy high here.
Relational Database
Complex structure made of several related tables consisting of records which contain data linked by foreign and primary keys. Data items uniquely identified by primary key. Tables set up acc. to normalisation rules.
Describe tables.
Contain records (each holds all data about 1 thing), records divided into fields, each holding 1 piece of data about 1 thing. Fields have data types.
What are the diff data types?
Text, number, date/time, currency, yes/no + autonumber.
Describe these data types:
Text
Number
Date/Time
Letters, symbols + numbers (Alphanumeric)
Numbers only (Can hold decimal places)
Dates + Times
Describe these data types:
Currency
Yes/No
AutoNumber
All monetary data (Includes symbols £, $)
Yes/No, True/False (Data can only be 1 or other)
Unique value generated by Access for each diff record.
What is a key field/primary key?
Field/attribute that uniquely identifies one record in a table.
What is an entity?
Object about which data is stored.(table)
What are attributes?
Data item held in entity. aka field.
What is a relationship?
Link/association between 2 entities. Foreign key links to primary key. E.g. Dentist + Patient,
What are the 3 types of relationship?
One-to-One (1:1), One-To Many (1:m) + Many-To Many (m:n)
Give an example of each type of relationship.
1: 1
1: m
m: n
Husband + Wife
Mother + Kids
A Level Students + Subjects
What does a data model include?
Entity, attribute + relationship. Usually diagram of database.
What is an ER diagram?
ENTITY-RELATIONSHIP Diagram. Diagrammatical way of representing relationships between entities in database.
What is a foreign key?
Primary key from 1 table which is used as link in another table.
What is a composite key?
2+ attributes used together to uniquely identify 1 record in a table.