Databases Flashcards
What is an entity?
A table in a data base
What is a field?
A column on a table
What is a primary key?
The field which uniquely identifies every record in the entity
What is a foreign key?
A primary key in a different entity
What are the possible relationships between entities?
One-to-one, one-to-many and many-to-many
What is data validation?
This is what makes sure data is sensible, reasonable, complete and within acceptable boundaries
What is range check?
It is used for numbered data and it allows you to set suitable boundaries
What is type check?
This is what makes sure the correct type of data has been entered into the field (e.g. String, Date, Integer etc.)
What is “check digit”?
This checks a range of numbers to see if they have been entered correctly. This is usually for barcodes or ISBN numbers.
What is length check?
This makes sure that the length of your data is correct. E.g. sometimes you need exactly 11 numbers (for phone numbers).
What is “lookup”?
When you have a field which can only contain a limited list of items then a lookup is used to improve accuracy.
What is picture/format check?
It is for when you have data which always consists of the same pattern. The format/picture check checks whether the data inputted fits the pattern.
What is presence check?
It is when there is a field which cannot have any blank entries. The presence check checks whether something has been entered for each box.
What is SQL?
It is the Standard Query Language used by database programs
In SQL, what does SELECT do?
It extracts records from an entity without modifying them