Computer Science
If a table which has one Primary key and two alternate keys. How many Candidate keys will this table have ?
- 1
- 2
- 3
- 4
Relational Database
4 Likes
Answer
3
Reason — In a table, the primary key uniquely identifies each record, and alternate keys also uniquely identify records but are not the primary key. In this case, with one primary key and two alternate keys, the table will have three candidate keys in total: one primary key and two alternate keys. Candidate keys are potential keys that can uniquely identify records in a table.
Answered By
2 Likes
Related Questions
If my_dict is a dictionary as defined below, then which of the following statements will raise an exception ?
my_dict = {'apple' : 10, 'banana' : 20, 'orange' : 30}
- my_dict.get('orange')
- print(my_dict['apple', 'banana'])
- my_dict['apple'] = 20
- print(str(my_dict))
What does the list.remove(x) method do in Python ?
- Removes the element at index x from the list
- Removes the first occurrence of value x from the list
- Removes all occurrences of value x from the list
- Removes the last occurrence of value x from the list
Write the missing statement to complete the following code:
file = open("example.txt", "r") data = file.read(100) ............... #Move the file pointer to the beginning of the file next_data = file.read(50) file.close()
State whether the following statement is True or False:
The
finally
block in Python is executed only if no exception occurs in the try block.