Question
In a relational database, which key uniquely identifies
tuples within a table and can never contain NULL values?Solution
A Primary Key uniquely identifies each record (or tuple) in a table and cannot contain NULL values. It enforces entity integrity, ensuring that every row in a table has a unique identifier. For example, in a table of employees, an employee ID serves as a primary key, ensuring no duplicate or NULL entries exist. Why Other Options Are Incorrect:
- Foreign Key: Links one table to another and can contain NULL values in some cases; its purpose is to enforce referential integrity, not uniqueness within its table.
- Candidate Key: A potential key that can uniquely identify tuples but is not chosen as the primary key.
- Alternate Key: A candidate key not selected as the primary key but still capable of uniquely identifying records.
- Composite Key: A primary key consisting of multiple columns but is a type of primary key, not a separate concept.
Merchant bought 60 sheep at Rs. 120 per sheep. He sold 40 of them at Rs. 150 each. 10 of them died. What should be the selling price of the remaining s...
By selling 72 articles, a loss equal to the selling price of 8 articles was incurred. What is the loss percentage?
'A' sold an article whose cost price is Rs. 'Y', at a profit of 25% to 'B'. 'B' marked the price of the article 25% above the price at which he bought i...
Ratio of Cost price to selling price of a book is 5:6 and ratio of selling price to marked price is 4:5. Marked price of the book is by what percent mo...
Jeetu purchased an article at some price and sold it at profit of 10%, he had purchased it at 15% more and sold it at a profit of 20%, then the selling ...
A person bought an article and sold it at a loss of 20%. If he had bought it at 10% loss and sold it for 74 more, he would have gained 30%. Find the pro...
A shopkeeper bought two articles for Rs. 450 each. If he sold one of them at 40% profit and the other at 22% loss, then find the difference between the ...
If a vendor sells a coconut at Rs 14.4 he makes 10% loss. If he wants to make 25% profit, then at what price (in Rs) should he sell?
The selling price of a product when sold at 20% profit is Rs. 60 more than its selling price when sold at a loss of 10%. What is the cost price of the p...
The combined cost price of Bournvita and Horlicks is Rs. 2000. With Horlicks sold at a 16% profit and Bournvita at a 20% profit, and given that the rati...