Monday, 6 February 2017

What is degree of a relation in dbms

What is degree of a relation in dbms, define degree of a table, example for degree of relational table


Degree of a relation (table)


The degree of a relation is the number of attributes (columns) in the given table. It is also called as Arity.
[Note: In some books, each row of the table is called as degree-tuple, for example, in a table with 3 attributes each row is a 3-tuple.]

EMPLOYEES Table
EMPID
HIREDATE
SALARY
DEPT
JOBCODE
SEX
119012
01JUL1973
42340.58
CSR010
602
F
120591
05DEC1985
31000.55
SHP002
602
F
127845
16JAN1972
75320.34
ACC024
204
M
129540
01AUG1987
56123.34
SHP002
204
F
135673
15JUL1989
46322.58
ACC013
602
F
212916
15FEB1958
52345.58
CSR010
602
F
216382
15JUN1990
34004.65
SHP013
602
F

For the EMPLOYEES table given above, the degree is 6. That is there are 6 attributes (columns/fields) in this table.

STUDENT
RegNo
SName
Gen
Phone
R1
Sundar
M
9898786756
R3
Karthik
M
8798987867
R4
John
M
7898886756
R2
Ram
M
9897786776
For the STUDENT table given above, the degree is 4. That is there are 4 attributes in the STUDENT table.
















No comments:

Post a Comment

SQL exercises for beginners one

SQL Exercises for Beginners / Simple SQL Exercises with Answers / Solved SQL exercises / SQL solved exercises with simple conditions / So...