CS Professional · Artificial Intelligence, Data Analytics and Cyber Security - Laws and Practice · Database Management
In a bank's database, the customer table has the column AccountNo as its unique identifier, and the loan table has a column AccountNo that must match an existing customer. In relational terminology, AccountNo in the loan table is a:
It is a foreign key referencing the customer table. A foreign key is a column in one table that points to the primary key of another and enforces referential integrity, so every loan record must link to an existing customer account.
- APrimary key of the loan table
- BForeign key referencing the customer tableCorrect
- CCandidate key of the customer table only
- DComposite attribute
Explanation
A foreign key is a column in one table that refers to the primary key of another table and enforces referential integrity. Here the loan table's AccountNo must match a customer record. It would be the loan table's primary key only if it uniquely identified loan rows, which is not stated.
Did you get it right without looking?
One question tells you little. A timed set on Database Management shows your real accuracy, how long you take and where you lose marks.
More Database Management questions
- A bank's employee, while a transaction updating a customer's balance is still uncommitted, is shown by another session a balance value that …
- In the ETL process used to populate a data warehouse, which activity is performed in the 'Transform' step?
- An e-commerce firm stores personal data of buyers. Its database designer finds that a Buyer table holds buyer name, city and also the city's…
- A table EMP has 6 rows with salaries 20000, 30000, 30000, 40000, 50000 and NULL. Which of the following statements about the results is corr…
- An insurer's DBA wants staff in the claims department to see only the claim number, claimant name and claim status from a table that also ho…
- An e-commerce firm analyses its past transaction records and finds that customers who buy a mobile phone very often buy a screen guard in th…