edited by
1,071 views
1 1 vote

Consider the below instance of relation : 

Employee: 

Emp_rating Emp_name Emp_mail Emp_sal
1. Surabhi sm301@gj 40000
2. Vishu sp11@ap 60000
1. Surabhi Null 50000
3. Yashy ar@dy 60000

 

The maximum possible number of alternate keys for the above relational instance is/are _____

2 Answers

Best answer
7 7 votes
There are 2⁴ possibilities of making a CK

out of which mail-id attribute is always ignored as it contain a null and it will violate the entity integrity constraint

So (Mail-id),(Mail-id,_),(mail-id,,)and (mail-id,,,__)

always ignored 1+3+3+1=8

 

We need the check the remaining 8

for the potential cks

 

Rating has aa repeated value

Name has a repeated value

Sal has repeated value

Rating,Name has repeated value

Rating,Salary has no repeated values so it's a possible ck

Name,Salary has no repeated values it's a possible CK

Name,Rating,Salary has no repeated values so it's a possible ck

 

But we said we will have 8 possibilities to check...we did for 7...the last one is ∅ so it's not a CK

 

Hence the given relation will have 3 possible cks,and max no of alternate keys will be 2
selected by
0 0 votes
2^4 = 16 possibilites

Emp_mail = NULL cannot be in a candidate key so
16 - 1 + 3 + 3 + 1 = 8
Repating tuples ! so the attributes alone cannote be a key
8 - 3 = 5
Emp_rating, Emp_name together also has a repeating tuple (1, Surabhi)
5 - 1 = 4
Empty Set
4 - 1 = 3
After taking 1 primary key we are left with 2 alternate keys
Answer - 2
 
Position:
Show:

Related questions

1 1 vote
1 1 answer
680
680 views
Athul 1 asked Jan 5, 2025
680 views
 Can someone help me out in giving example for each, For Example 1:N Both Mandatory : Person->No of Classes Attended, This can be (PersonName,ClassName) but how is the nu...
0 0 votes
1 1 answer
888
888 views
ace0-0 asked Dec 21, 2025
888 views
What is the minimum number of tables for a BINARY RELATIONSHIP WITH ATTRIBUTES for the follwoing cases:Case 1: One-to-One relationship between two entities and partial pa...
0 0 votes
0 0 answers
543
543 views
Shamim Ahmed asked Dec 18, 2018
543 views
How 1:1 cardinality with total participation of atleast 1 entity needs min no. of tables = 1 ?1:1 with partial participation of both entities needs min no of tables = 2?