Relational Databases and SQL Flashcards
What is a database?
A structured, persistent collection of data
What are the 2 types of databases?
Flat file database
Relational database
What is a flat file database?
A single table database - all information stored in 1 table
- very inefficient
- difficult to query as data is all in one table
- used for smaller/ trivial data sets
- data is often duplicated
- data inconsistency
What is a relational database?
A database with more than one table which are connected together.
- eliminates data consistency and data redundancy
What are the 5 database concepts?
Field
Record
Table
Primary key
Foreign key
What is a field?
A name which refers to a single type of data from a database table
What is a table?
A complete set of related records on the same topic/subject
What is a record?
A set of related fields on a single entity within a database table
What is a primary key?
A field in a table which is used to identify any record within the table