Find the word definition

Douglas Harper's Etymology Dictionary
cardinality

1520s, "condition of being a cardinal," from cardinal (n.) + -ity. Mathematical sense is from 1935 (see cardinal (adj.)).

Wiktionary
cardinality

n. 1 (context set theory English) Of a set, the number of elements it contains. 2 (context data modeling English) The property of a relationship between a database table and another one, specifying whether it is one-to-one, one-to-many, many-to-one, or many-to-many.

Wikipedia
Cardinality

In mathematics, the cardinality of a set is a measure of the "number of elements of the set". For example, the set A = {2, 4, 6} contains 3 elements, and therefore A has a cardinality of 3. There are two approaches to cardinality – one which compares sets directly using bijections and injections, and another which uses cardinal numbers. The cardinality of a set is also called its size, when no confusion with other notions of size is possible.

The cardinality of a set A is usually denoted | A |, with a vertical bar on each side; this is the same notation as absolute value and the meaning depends on context. Alternatively, the cardinality of a set A may be denoted by n(A), A, card(A), or # A.

Cardinality (data modeling)

In database design, the cardinality or fundamental principle of one data table with respect to another is a critical aspect. The relationship of one to the other must be precise and exact between each other in order to explain how each table links together.

In the relational model, tables can be related as any of "one-to-many" or "many-to-many". This is said to be the cardinality of a given table in relation to another.

For example, consider a database designed to keep track of hospital records. Such a database could have many tables like:

  • a doctor table with information about physicians;
  • a patient table for medical subjects undergoing treatment;
  • and a department table with an entry for each division of a hospital.

In that model:

  • There is a many-to-many relationship between the records in the doctor table and records in the patient table because doctors have many patients, and a patient could have several doctors;
  • There is a one-to-many relationship between the department table and the doctor table because each doctor may work for only one department, but one department could have many doctors.

A "one-to-one" relationship is mostly used to split a table in two in order to provide information concisely and make it more understandable. In the hospital example, such a relationship could be used to keep apart doctors' own unique professional information from administrative details.

In data modeling, collections of data elements are grouped into "data tables" which contain groups of data field names called "database attributes". Tables are linked by "key fields". A "primary key" assigns a field to its "special order table". For example, the "Doctor Last Name" field might be assigned as a primary key of the Doctor table with all people having same last name organized alphabetically according to the first three letters of their first name. A table can also have a foreign key which indicates that field is linked to the primary key of another table.

A complex data model can involve hundreds of related tables. A renowned computer scientist, Edgar F. Codd, created a systematic method to decompose and organize relational databases. Codd's steps for organizing database tables and their keys is called Database Normalization. Database normalization avoids certain hidden database design errors (delete anomalies or update anomalies). In real life the process of database normalization ends up breaking tables into a larger number of smaller tables.

In real world, data modeling is critical because as the data grows voluminous, tables linked by keys must be used to speed up programmed retrieval of data. If a data model is poorly crafted, even a computer applications system with just a million records will give the end-users unacceptable response time delays. For this reason, data modeling is a keystone in the skills needed by a modern software developer.

Cardinality (disambiguation)

Cardinality may refer to

  • Cardinality of a set, a measure of the "number of elements" of a set in mathematics
  • Cardinality of a musical set, the number of pitch classes
  • Cardinality (data modeling), a term in database design
  • Cardinality (SQL statements), a term used in SQL statements
  • Cardinal utility, in contrast with ordinal utility, in economics
Cardinality (SQL statements)

In SQL (Structured Query Language), the term cardinality refers to the uniqueness of data values contained in a particular column (attribute) of a database table. The lower the cardinality, the more duplicated elements in a column. Thus, a column with the lowest possible cardinality would have the same value for every row. SQL databases use cardinality to help determine the optimal query plan for a given query.

Usage examples of "cardinality".

Those Wreeds who can perceive larger cardinalities obviously have a competitive advantage.

It would not have had to count because it can perceive that level of cardinality at a glance.

You would just perceive its cardinality: you would know there was one object.

Now, from any denumerable class, there may be removed a denumerable infinite number of denumerable infinite classes, without affecting the cardinality of the class.

He realised he had not spoken with Manchester for some days, since the revelation of Melie’s Cardinality some hours out from Undine in fact, and even then not about history.