We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Databases
- Set and Algebra
- Databases - Keys
- Discussions
Databases - Keys
Databases - Keys
Sort by
recency
|
27 Discussions
|
Please Login in order to post a comment
now we consider this table it has bookname,author has a combosite primary key .now table use consider bookname is primary
@TocaBocaMOD I appreciate your detailed analysis of the question. You've raised a valid point about the potential issues with using "bookname" as a primary key in a real-world scenario due to the possibility of different authors writing books with the same title.
In a more robust database design, using a surrogate key like ISBN or introducing a unique identifier specific to each record might be a better practice. However, given the options provided and the context of the question, it seems that "bookname" is the intended answer for this particular exercise. It's important for learners to understand both the simplifications made in such exercises and the complexities that can arise in real-world scenarios.
bookname
The question is a bit confusing, there are two case scenarios.
Case 1 - If we just look at the data, Booknames are not repeated anywhere. And we don't have to think about the test case since we just have to consider this particular data, also in test case it is written that no test cases are there in this question.
Case 2 - If we start considering the test cases, bookname and author will be composite key and can we consider them as primary key. But the people who are not from the book publishing industry might not know that, two books can't have the same name since there is a copyright issue. So, the bookname is the primary key.
How's this problem medium?