edited by
937 views
2 votes
2 votes

If $R$ is a relation in Relational Data Model and $A_1,A_2,\dots A_n$ are the attributes of relation $R$, what is the cardinality of $R$ expressed in terms of domain of attributes?

  1. $\mid R\mid\leq\mid \text{ dom }(A_1) \times \text{ dom }(A_2)\dots \text{ dom }(A_n)\mid$
  2. $\mid R\mid\geq\mid \text{ dom }​​​​​​​(A_1)\times \text{ dom }​​​​​​​(A_2)\dots \text{ dom }​​​​​​​(A_n)\mid$
  3. $\mid R \mid = \text{ max } ( \mid \text{dom}(A_1 ) \mid, \mid \text{ dom }(A_2) \mid , \dots \mid \text{ dom } (A_n) \mid) $
  4. $\mid R \mid = \text{ min } ( \mid \text{dom}(A_1 ) \mid, \mid \text{ dom }(A_2) \mid , \dots \mid \text{ dom } (A_n) \mid)$​​​​​​​
edited by

2 Answers

2 votes
2 votes

Option A

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. 

In the context of databases, cardinality refers to the uniqueness of data values contained in a column.
Cardinality refers to a number. It gives the number of unique values that appear in the table for a particular column.

cardinality of relation= multipication of domain of each attribute

 

$∣R∣≤∣ dom (A1)× dom (A2)… dom ​​​​​​​(An)∣$

For eg: you have a table called Person with column Gender. Gender column can have values either 'Male' or 'Female".

Then the cardinality of Gender column is 2, since there are only two unique values that could possibly appear in that column – Male and Female.

0 votes
0 votes
  1. In the Relational Data Model, data is organized into relations or tables. Each relation consists of rows (also called tuples) and columns (also called attributes).

  2. The cardinality of a relation refers to the number of tuples or rows in that relation. It represents the number of records or instances that the relation holds.

  3. When we consider a relation R with attributes A1, A2, ..., An, the cardinality of R, denoted as |R|, is determined by the number of unique combinations of values across all the attributes.

  4. The cardinality of R can be expressed by considering the domains of the attributes. The domain of an attribute represents the set of possible values that attribute can take.

  5. To calculate the cardinality of R, we multiply the cardinalities of all the individual attribute domains together. So, |R| = |Domain(A1)| x |Domain(A2)| x ... x |Domain(An)|.

  6. The expression |Domain(Ai)| represents the number of distinct values or elements in the domain of attribute Ai. For example, if an attribute A has a domain of {1, 2, 3, 4}, then |Domain(A)| would be 4.

  7. By multiplying the cardinalities of all the attribute domains, we obtain the overall cardinality of the relation R. This value represents the total number of distinct tuples or records in the relation.

  8. It's important to note that the above expression assumes that each tuple in the relation is distinct and there are no duplicate tuples. If there are duplicate tuples present in the relation, they would be considered as separate instances and contribute to the cardinality of the relation.

In summary, the cardinality of a relation in the Relational Data Model is determined by the number of distinct tuples in that relation. The cardinality can be calculated by multiplying the cardinalities of all the individual attribute domains together, where each domain represents the set of possible values for a specific attribute.

Answer:

Related questions

1 votes
1 votes
1 answer
1
admin asked Mar 30, 2020
1,090 views
Related fields in a database are grouped to form adata filedata recordmenubank
1 votes
1 votes
1 answer
2
admin asked Mar 30, 2020
767 views
'AS' clause is used in SQL forSelection operationRename operationJoin OperationProjection Operation
1 votes
1 votes
1 answer
3
admin asked Mar 30, 2020
2,135 views
Cross Product is aUnary OperatorTernary OperatorBinary OperatorNot an operator
0 votes
0 votes
2 answers
4
admin asked Mar 30, 2020
870 views
A table joined with itself is calledJoinSelf JoinOuter JoinEqui Join