elpresidente90
Badges: 8
Rep:
?
#1
Report Thread starter 8 months ago
#1
Consider a book store for this scenario:


Find all books in a specific category within a specified date range
Find all books by specific authors
Write a comment on a book
List all details (including all comments and images, e.g., sample pages) of a book where the book description matches a specified pattern, e.g., the word “Machine Learning” appears in the book description

The application and its data access should be optimised for these use cases so that the number of separate queries required for a use case is minimised.

I am stuck with this.

At first, I thought that there would be two entities, Book(s), Author(s).

Book entity would have: category, data range, author name, comment, details, book description.

Author: would have name, and be a seperate entity of itself.

Then I thought it would be better to parse the book details into a seperate entity, bookDetails:

Looking at it, I think that categories and authors have a one to many relationship, a category can encompass a number of books, and an author can write many books.
Comments, details and book description could be better served in as an entity by themselves.

I guess, how do I normalise data from use cases as is the case here?
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

How would you feel if uni students needed to be double vaccinated to start in Autumn?

I'd feel reassured about my own health (48)
15.24%
I'd feel reassured my learning may be less disrupted by isolations/lockdowns (102)
32.38%
I'd feel less anxious about being around large groups (39)
12.38%
I don't mind if others are vaccinated or not (27)
8.57%
I'm concerned it may disadvantage some students (17)
5.4%
I think it's an unfair expectation (79)
25.08%
Something else (tell us in the thread) (3)
0.95%

Watched Threads

View All