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.
A trader advertises that he sells sugar at cost price but uses a false weight where ‘N’ grams is shown as 1 kilogram. If he earns a profit of 25% pe...
- A woman bought a handbag at an 8% discount. If she had bought it at a 16% discount, she would have paid ₹1600 less. Find the market price of the handbag.
- The selling price, cost price and marked price of a bag are in the ratio 7:5:10. If the profit is Rs. 800, calculate the discount allowed on the marked pri...
After selling 45% of the items, Neha is left with 30 fewer than 80% of the number of items she initially had. Find the number of ...
Cost price of an article is Rs.100. Find the selling price of the article, if it is sold at two successive discounts of 20% and 30% and the ratio betwee...
- The cost price of a gadget is Rs. 3,250. It is tagged 25% above its cost and sold after a flat discount of Rs. 275. What is the approximate profit percenta...
Sundar bought 400 books for a total cost of Rs. 40,000. If 10% of the books are damaged due to rain, and 33â…“% of the remaining books are sold at the m...
A bought an article at 40% less of the marked price and sold it at 35% more than the marked price. Find the profit earned by him.
- A shopkeeper marked an item 50% above its cost and offered a 30% discount. If the item is sold at Rs. 3,150, then what is the profit?
A table is marked (z+5)% above its cost price and a discount of 35% was given on it while selling. If the cost price of the table is Rs. 1485 more than ...