Degree is the number of columns in a table.
Eg: Consider the following tables:
Supposing Table : Account contains 3 rows and 2 columns.
Cardinality of Account table is : 3
Degree of Account table is :2
7 questions · timed · auto-graded
Degree is the number of columns in a table.
Eg: Consider the following tables:
Supposing Table : Account contains 3 rows and 2 columns.
Cardinality of Account table is : 3
Degree of Account table is :2
Table: Product
| Pno | Name | Qty | PurchaseDate |
| 101 | Pen | 102 | 12-12-2011 |
| 102 | Pencil | 201 | 21-02-2013 |
| 103 | Eraser | 90 | 09-08-2010 |
| 109 | Sharpener | 90 | 31-08-2012 |
| 113 | Clips | 900 | 12-12-2011 |
(a) Write the names of most appropriate columns, which can be considered as candidate keys.
(b) What is the degree and cardinality of the above table?
Degree:4
Cardinality:5
Table: Item
(UPDATE, SELECT, ALTER, DROP)
DML stands for Data Manipulation Language and comprises of commands which are used to insert, edit, view & delete the data stored in a database object.
DDL Commands are: ALTER, DROP
DML Commands are: UPDATE, SELECT
Alternate Key: A candidate key that is not selected as a primary key is called an Alternate Key.
Table: CLUB
| MEMBER_ID | MEMBER_NAME | ADDRESS | AGE | FEE |
| M002 | NISHA | GURGAON | 19 | 3500 |
| M003 | NIHARIKA | NEW DELHI | 21 | 2100 |
| M004 | SACHIN | FARIDABAD | 18 | 3500 |
(a) What is the cardinality and degree of the above given table?
(b) If a new column contact_no has been added and three more members have joined the club then how these changes will affect the degree and cardinality of the above given table.
Cardinality = 3
(b) After adding one more column Contact_no, then Degree is 6
After adding 3 more members Cardinality is 6.
Table: Club
| Member_id | Member_Name | Address | Age | Fee |
| M001 | Sumit | New Delhi | 20 | 2000 |
| M002 | Nisha | Gurgaon | 19 | 3500 |
| M003 | Niharika | New Delhi | 21 | 2100 |
| M004 | Sachin | Faridabad | 18 | 3500 |
(i) What is the cardinality and degree of the above given table?
(ii) If a new column contact_no has been added and three more members have joined the club then how these changes will affect the degree and cardinality of the above given table.
Degree: 5
(ii) Cardinality: 7
Degree: 6