Terminology

tags: #sql

C

Candidate Keys (Minimal Superkey)

A candidate key is a key that can potentially be used as the primary key of the table. To be a candidate key, it must satisfy the following 2 conditions:

  1. Unique - i.e., each value in the candidate key must be unique for every row in the table.
  2. Minimalness - i.e., a superkey that cannot be further reduced without losing the property of being able to uniquely identify each row of data.

Catalog

A catalog is a named collection of schemas in an EQL environment.

Column ("field", "attribute")

A column corresponds to an attribute or property that describes an entity.

D

Database Management System (DBMS)

A DBMS is a software used to create and manage databases (e.g., MySQL, Oracle, PostgreSQL). It serves as an interface between an end-user and a database, enabling users to store, retrieve, and run queries on data.

E

Entity Integrity

Entity integrity ensures that:

  1. Primary keys are unique (i.e., each row or record in a table represents a unique entity or object)
  2. Each tuple MUST HAVE a valid PK (i.e., PK CANNOT be missing = NULL)

This means that no two records in a table can have the same primary key value, and no record can have a null value in its primary key field.

R

Row ("tuple")

A row is also referred to as a "tuple". This is a collection of related information about an entity.

Referential Integrity

Ensures that any foreign key value in a table must match a primary key value in another table, or be null, i.e., tuples in referencing relation R1 have attributes FK that references the PK attribute(s) of the referenced relation R2.

600

⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠

Text Elements

PK
A1
A2
FK
2
PK
A1
A2
A3
tn in R1 "references" tn of R2, if tn[FK] = tn[PK]
1
1
2
Referencing relation R1
Referenced relation R2

Referential integrity can be enforced through the use of foreign key constraints, which prevent the creation of orphaned records (i.e., records in a child table that reference non-existent records in the parent table) and the deletion of records that are referenced by other records in a different table.

S

Superkey

A superkey (SK) is a set of one or more attributes that can uniquely identify each tuple or row in a table, such that:

tn in r(R) ,t1[SK]t2[SK]...tn[SK]

i.e., for all distinct tuples in r(R) - in a given relational state, no two tuples will have the same SK values.

T

Table ("relation")

A table is also referred to as a "relation" (i.e., a collection of records).

Powered by Forestry.md