10: Databases Flashcards
What is a database?
An organised collection of data
What is the benefit of organising data into a database?
Allows for easy:
- Adding
- Modification
- Deletion
- Searching
What are the benefits of using electronic databases over paper-based systems?
- easier to retrieve, add, delete, update and modify data
- Easier to back up and make copies of data
- Can be accessed by multiple people at the same time and from different locations
What are the 3 features of a database?
- data is stored in a table (entity/file)
- tables contain records (rows/tuples)
- tables contain fields (columns/attributes)
Why might someone choose to store data in a flat-file database?
- Very simple
- quick to set up
- require little expertise to maintain
- suitable for storing small amounts of data
What are some typical uses of flat file databases?
- Storing contact details
- Small product database
- Maintaining a game or music collection
Why might someone not choose to use a flat file database?
- become very inefficient as repeated data takes up more space
- they become slow to query and difficult to maintain
What is a primary key?
A field in a record that is unique
what is a foreign key?
If two tables have a relational link, the primary key of one table is the foreign key of the other table
What are the 3 types of relationship tables/databases can have?
- one to one
- one to many
- many to many
What are the 4 ways you can handle data?
- Capturing
- Selecting
- Managing
- Exchanging
What are the 4 ways of capturing data?
- Paper-based forms
- Optical character recognition
- optical mark recognition
- other methods
How you use paper-based forms to capture data?
- involves a human reading the form and typing the information into a computer-based system
- to reduce human error and make the process as quick as possible, you can make sure:
— every part of the form is clearly labelled
— there are instructions to complete the form in a black pen
— instructions to complete in capital letters
— tick boxes are used
— squares are used for entering each letter separately
How is OCR used to capture data?
- automatically reads text by interpreting the shape of the letters
- post offices uses OCR to read postcodes and route mail
- road cameras use automatic number plate recognition
How is OMR used to capture data?
- used for multiple choice tests and lottery tickets
- very fast and efficient
- significantly reduces the possibility of human error
What are other methods of capturing data?
- magnetic stripes
- chip and pin
- barcodes
- QR codes
- sensors
What are 2 ways of selecting data?
- SQL
- Query by example
How is SQL used to select data?
- allows for fast and efficient retrieval, deletion and manipulation of data
- uses commands: SELECT, FROM, WHERE
how is Query by Example used to select data?
- graphical query language, making use of visual tables where the user would enter commands and conditions
- Once a query is built, it is converted into statements that can be executed against the database
- this means the user doesn’t need to remember the finer details of SQL syntax
What can both SQL and QBE allow you to do?
- specify tables
- specify fields
- specify criteria
- specify output sorting
- use boolean expressions
What commands can you use to manage data in SQL?
- UPDATE
- DELETE
- INSERT
What is the purpose of a database management system?
- provides a layer of abstraction for the user and programmer
What are the main features of a DBMS?
- preventing the creation of duplicate primary keys
- enforcing validation rules
- providing secure access
- providing encryption
- providing program data independence
- managing multiple users
What must be considered before exchanging data?
- The common formats used for exchanging data
- manual methods of data exchange
- automatic methods of data exchange