: merge with
primary key
In the relational model of databases, a primary key is a ''specific choice'' of a ''minimal'' set of attributes (Column (database), columns) that uniquely specify a tuple (Row (database), row) in a Relation (database), relation (Table (database), t ...
In
database model
A database model is a type of data model that determines the logical structure of a database. It fundamentally determines in which manner data can be stored, organized and manipulated. The most popular example of a database model is the relational ...
ing, a first class item is one that has an
identity
Identity may refer to:
* Identity document
* Identity (philosophy)
* Identity (social science)
* Identity (mathematics)
Arts and entertainment Film and television
* ''Identity'' (1987 film), an Iranian film
* ''Identity'' (2003 film), ...
independent of any other item. The identity allows the item to persist when its attributes change, and allows other items to claim relationships with the item.
As a general rule, first class items represent things rather than relationships. For example, the database representations of a human and of a company are each first class items. However, the fact that the person is an employee of that company is not a first class item. Likewise, data ''about'' that relationship, e.g. information about the salary the company pays to its employee, is not a first class item.
Typically, a
relational database
A relational database is a (most commonly digital) database based on the relational model of data, as proposed by E. F. Codd in 1970. A system used to maintain relational databases is a relational database management system (RDBMS). Many relatio ...
will include several
table
Table may refer to:
* Table (furniture), a piece of furniture with a flat surface and one or more legs
* Table (landform), a flat area of land
* Table (information), a data arrangement with rows and columns
* Table (database), how the table data ...
s, each of which contains
rows representing first class items of a given type (e.g. a table of people, a table of companies). It will also contain other tables representing relationships between these first class items.
In a table representing first class items, one
column
A column or pillar in architecture and structural engineering is a structural element that transmits, through compression, the weight of the structure above to other structural elements below. In other words, a column is a compression member. ...
of the table will typically contain a different
integer
An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign (−1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
assigned to each row (effectively, to each item) as a unique
identifier
An identifier is a name that identifies (that is, labels the identity of) either a unique object or a unique ''class'' of objects, where the "object" or class may be an idea, physical countable object (or class thereof), or physical noncountable ...
: that is to say, unique for objects of this type; objects of different types, represented in different tables, can coincidentally have the same identifier, but the coincidence is meaningless.
In a relational database, a table representing a ''relationship'' between two or more first class items (or data about that relationship) will usually ''not'' have special identifiers for its rows. Instead these rows will be identified by an ordered
tuple
In mathematics, a tuple is a finite ordered list (sequence) of elements. An -tuple is a sequence (or ordered list) of elements, where is a non-negative integer. There is only one 0-tuple, referred to as ''the empty tuple''. An -tuple is defi ...
consisting of unique identifiers of the first class items involved in the relationship.
{{DEFAULTSORT:First Class (Computing)
Data modeling