Edited - MMIS103 2023 S2 Assignment 3
Edited - MMIS103 2023 S2 Assignment 3
Disclaimer: The data that populates the database are artificially constructed and do not
correspond to real-world data.
A conceptual data model (an entity-relationship diagram) representing these data is given below.
If you wish to do this part of the assignment using your own computer, you must install SQLite
Studio 3.4.4. The instructions for installing, configuring, and using SQLite Studio are provided
along with Week 2 and 3 tutorial/lab material. Also included is the pre-built Library database in
SQLite format (Library.db) you could use in this exercise.
Write SQL queries on SQLite Studio for the following tasks. Save each query as a separate file.
1. [4 marks] Display the first and last names of authors who wrote books on the subject
"DataBases".
a. Write your query using a sub-query.
b. Write your query using JOINs.
2. [3 marks] Who translated the book "American Electrician's Handbook"? Display the first
name, middle name, and last name of the translator. Each author’s role in the book’s writing
is described in the “role” attribute in the “written_by" table.
3. [3 marks] Display the titles of books that haven't been borrowed.
4. [6 marks] A borrower wants to borrow the book titled "PRINCIPLES AND PRACTICE OF
DATABASE SYSTEMS", but all its copies are already borrowed by others. Write two
queries to display other recommended titles using the following methods.
a. Using partial matching of the book title -- note that the borrower is interested in a
"DATABASE" book.
b. By searching for other books written by the same author (i.e. the author of
"PRINCIPLES AND PRACTICE OF DATABASE SYSTEMS"
5. [3 marks] Display the list of publishers who have published books on the subject
"DataBases". Your query should display the publisher's full name and the "DataBases"
book titles they published.
6. [6 marks] Display the titles of books that were never borrowed.
a. Write your query using OUTER JOINs.
b. Write the query again without using OUTER JOINs.
7. [3 marks] Display full names of publishers with whom the author Alfred Aho published his
book(s).
Your query must use EXISTS clause.
8. [3 marks] Display the first and last names of authors who wrote over three books. Along
with each name, display the number of books as well.
9. [4 marks] Display the book title with the most physical copies. Your query should show the
number of copies along with the title.
Your report must include a discussion of the pros and cons of the different data warehouse design
methods and the justification for selecting a specific method with solid arguments to back up your
claims and recommendations supported by research. The discussion must cover novel Data
Warehousing solutions.
================================================
Introduction
Task 2
Task 3
(Use sections, section/sub-section headings as appropriate)
Conclusion
================================================
4 Potential Resources
Business Report-writing