Chapter 6: Databases Flashcards
Database
A structured collection of related data
A database is structured in a way that allows you to… (3)
- Search (find data)
- Sort (order the data)
- Add, update and remove (change the data)
Popular ways of sorting data include… (3)
- Alphabetical OR reverse alphabetical
- Numerical OR reverse numerical
- Chronological OR reverse chronological
What are the two main types of databases?
- Flat-file
2. Relational
Flat-file database
Stores all of its data in a single table
Pros and Cons of a Flat-file database (3 | 3)
Pros
- Simple and easy to implement
- Easy to access using many different applications
- Easy to understand - all information stored in one place
Cons
- Easy to extract information - less secure
- Data duplication makes data inconsistency more likely
- Searching process is time-consuming with larger databases
Relational database
Organises its data into related tables of records
Pros and Cons of a Relational database (4 | 2)
Pros
- Information only has to be written or updated in one area - less data duplication
- More efficient storage
- Flexible and well-established
- Standard data access language in SQL
Cons
- Harder to design and maintain
- Has a lot of overhead and complexity
Data duplication OR Data redundancy
Where the same data is stored more than once, unnecessarily
Data duplication leads to…
Data inconsistency
Data inconsistency
Where different and conflicting versions of the same data appear in different places, thus compromising data integrity
Entity
A single person, place or thing about which data can be stored
Table
A collection of data about a certain topic organised into records and fields
Record
Data stored about a particular entity within a table
Field
One specific data item being stored about a particular entity
Fill in the blanks:
Records form the _____ of a table. Fields form the table’s _____.
- Rows
2. Columns
Primary key
The field in a table that uniquely identifies a record
How many times can a primary key occur in a table?
Once
Foreign key
A field in one table that is the primary key in another, used to create a relationship between the two