Databases – Keys – HackerRank Solution

In this post, we will solve Databases – Keys HackerRank Solution. This problem (Databases – Keys) is a part of HackerRank Databases series.

Task

A database table with three fields (bookname, author, language) has been created. If the table is as provided below, which of these three fields may be used as the primary key?

bookname-author-language
A Tale of Two Cities, Charles Dickens, English
Oliver Twist, Charles Dickens, English
Godaan, Premchand, Hindi
Chandrakanta, Devaki Nandan Khatri, Hindi
Hamlet, William Shakespeare, English
The Merchant of Venice, William Shakespeare, English

Output Format

Only fill in the name of the field which may be used as the primary key. Grading is case-sensitive.

Solution – Databases – Keys – HackerRank Solution

bookname

Note: This problem (Databases – Keys) is generated by HackerRank but the solution is provided by CodingBroz. This tutorial is only for Educational and Learning purpose.

Leave a Comment

Your email address will not be published. Required fields are marked *