Basic Database stuff Flashcards
Wat is een table?
Synonym: Relation (now obsolete). The Relational Model was invented by E. F. Codd in the
sixties, who was a mathematician and regarded tables as mathematical constructs called
‘relations’. Not to be confused with the Relationship Types in ERM.
Wat is een Column
Vertical part of a table (synonym: attribute) containing values of one particular kind; see also
Domain.
Wat is een row?
Horizontal part of a table (synonyms: tuple, record), containing values that belong together.
Each row represents the properties of one ‘item’ or ‘entity’ in the table.
Wat is een Cell
A single compartment (synonym: field) in a table, containing exactly one value.
Wat is een Domain?
To each column belongs a domain: a set of values appropriate for this attribute. A domain
can be seen as a source from which values of a particular kind can be drawn (SURNAME,
CALENDAR DAY, PERCENTAGE, …). Different columns can have the same domain. A data type
is assigned to each domain (char(20), date, smallint, …). Different domains can have the same
data type.
Wat is een Candidate Key?
olumn (or smallest set of columns) with the property that the value (or combination of
values) must be unique in each row of the table. There is always at least one candidate key
Wat is een Primary Key?
One of the candidate keys, chosen to be the standard way of identifying the entities (or
items) in the table.
Wat is een Alternative Key?
A candidate key that is not the primary key (if any).
Wat is een Natural Key?
A key that contains information about the entity it identifies, like a surname or a purchase
date, often conveniently used by domain experts. See also Surrogate Key.
Wat is een Surrogate Key?
A key that contains no information about the entity it identifies, like a sequence number or
a meaningless code, often used in information systems because it never changes. See also
Natural Key.
Wat is een Foreign Key?
A column (or set of columns) that is a copy of the primary key from another table (or even
from the same table). The values in the rows of the foreign key must also exist in the primary
key of the other table. See also Reference.
Wat is een Reference?
A constraint that runs from a column (or a set of columns) in one table to a column (or set
of columns) in another table. It specifies that the values in the from-side of the reference
must also exist in (i.e.: must ‘come from’ or ‘be a part of’) the values in the to-side of the
reference. A reference is usually shown graphically as an arrow (from the tail to the head). A
foreign key is always at the from-side of a reference, the corresponding primary key at the
to-side.
Wat is Foreign Key Reference?
The reference between a foreign key (from-side) and its corresponding primary key (to-side).
Wat is een Parent Table?
A table at the to-side of a foreign key reference.
Wat is een Child Table?
A table with a foreign key, therefore at the from-side of a foreign key reference.
Wat is een Mandatory Child table?
The values in a foreign key must always be a part of the values in the corresponding primary
key. However sometimes the foreign key must contain all the values in the corresponding
primary key. If that is the case, then the child table is a mandatory child table: every parent
value (in the primary key) must have a child value (in the foreign key).
Wat is een Mandatory Child Reference?
This can be seen as an ‘ordinary’ foreign key reference, extended with another reference in
the opposite direction. Together these references result in the two populations being equal.
The ‘ordinary’ foreign key reference (from child to parent) can be easily implemented in
modern database management systems. The one in the opposite direction however will
usually have to be programmed seperately.