March 7, 2011 at 12:23 am
Hi to all, I have no idea about how to create relation and solve their queries. I want to relation as follows:
BookAuthor(book, author, earnings)
BookReference(book, referenceBook, times)
BookReview(book, reviewer, score)
BookPublih(book, year, publisher, price, number)
In these database, each book may have 1 or more authors & each author may make a diff. amt. of money from that book. One book may make reference to other book.1 book may be reviewed by diff. reviewers and get diff. scores. an author could also be a reviewer & a publisher.
I want to solve following queries
Find all books published in 2003 & reviewed by both Sammer Tulpule & Hemant Mehta.
Find all the reviewers who never reviewed their own books.
Find all authors who reviewed more than 2 books written by Sita Mitra.
Find all authors who have written exactly 1 book and reviewed more than 1 book.
Find all the reviewer who reviewed every book from 'Stephen King'.
Find all books published in 1995-2000 in descending order.
I know, these is not good to find an answer, but believe me i really don't understand.
March 7, 2011 at 3:47 am
Is this a homework assignment?
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
March 8, 2011 at 4:28 pm
Wow, if this truly is a homework assignment, and the poster has no experience in relational databases, as seemingly is the case… then that’s going to be one heck of an assignment.
Try googling the obvious, like...
"getting started with t-sql'
"introduction to relational databases"
etc... untill you find something that suits your taste and ability. Good luck.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply