0% found this document useful (0 votes)
32 views4 pages

Edited - MMIS103 2023 S2 Assignment 3

Uploaded by

williamkoech111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views4 pages

Edited - MMIS103 2023 S2 Assignment 3

Uploaded by

williamkoech111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

MMIS103 – Database Management

Systems & Design

Assignment 3 – SQL Scripting and Research Report


Semester 2 2023
Submission Type: Compressed ZIP file (*.SQL (SQL Scripting); *.docx (Business report)

Word limit: Business Report 2500 words (see further instructions)

Duedate: 11:59PM (AEST), May 29, 2024

50% of your overall grade

1 SQL Scripting (35 Marks)


LibraryDB is a database system that keeps track of information concerning books and their
circulation in an imaginary library.

Disclaimer: The data that populates the database are artificially constructed and do not
correspond to real-world data.

The schema for the LibraryDB database is given below.

BORROW(transactionID, personID*, borrowdate, duedate, returndate)


AUTHOR(authorID, firstname, middlename, lastname)
BOOK_COPY(bookID, bookdescID*)
BOOK(bookdescID, title, subtitle, edition, voltitle, volnumber,
language, place, year, isbn, dewey, subjectID*)
BORROW_COPY(transactionID*, bookID*)
PERSON(personID, firstname, middlename, lastname, address, city,
postcode, phonenumber, emailaddress, studentno, idcardno)
PUBLISHER(publisherID, publisherfullname)
WRITTEN_BY(bookdescID*, authorID*, role)
PUBLISHED_BY(bookdescID*, publisherID*, role)
subject(subjectID, subjecttype)
The primary keys are underlined. The foreign keys are denoted by asterisks (*).

Description of the schema


• person -- keeps track of the people who borrow books from the library. The attributes
contain personal and contact information.
• author -- keeps track of personal information about authors.
• publisher -- keeps track of the publisher’s information. To make it simple, most of the
attributes have been truncated in the sample database.
• subject -- this relation keeps the information about the subjects on which the library
collection has books (such as Mathematics, Database, etc.)
• book -- contains information about the books available in the library. Every book can have
one or more physical copies in the collection. Each book can have one or more authors,
published by one or more publishers.
• book_copy -- keeps track of the physical copies of the books in the library collection.
• borrow -- keeps track of the check-ins and check-outs of the books. Every transaction is
done by one person. However, it may involve one or more book copies. If there is no return
date, the book has been checked out but not returned.
• written_by -- associates books with authors. A book may be associated with several
authors and an author may be associated with several books. There is also an attribute
'role' that specifies the role of the author for the book (author/ editor/ translator/ etc).
• published_by -- associates publishers with books. There is an attribute 'role' here too.
• borrow_copy -- associates physical copies of books with a transaction. Members are
allowed to borrow several books in a single transaction.

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.

2 Business Report (65 Marks)


The XYZ council that the library belongs to decided to merge all libraries. This decision was taken
with the announcement that all council systems’ data will be stored in a single data warehouse to
facilitate the collection and processing of data from the following systems.
a. The council HR system. SQL Database.
b. The customer relationship management system. SQL Database.
c. The council’s payment, finance, and accounting application. SQL Database.
d. System supporting the council’s mobile app data. SQL Database.
e. Systems supporting the council’s presence on social media platforms like Facebook, X
(formerly Twitter), YouTube, TikTok, and Instagram, data gathering and video streaming.
These applications use a NoSQL database.

Task 1 [30 Marks]


Identify and Justify a Data Warehousing Solution for the XYZ Council.
You are assigned the task of producing an analysis of data infrastructure needs that can cater to
the volume of data it is currently dealing with and projected growth over the next five years to set
up a data warehouse. Here, you are free to make assumptions, such as projected population
growth in the council area.

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.

Task 2 [30 Marks]


Identify and Justify Database Security needs of XYX Council that cover every aspect of the
systems and applications, including the proposed Dara Warehousing solution.
Research to determine potential vulnerabilities in the existing systems stemming from various
sources, i.e., people, data, networks, etc. Identify viable security measures. Your work must go
beyond preparing a list of vulnerabilities and present useful evidence from existing research to
support your arguments for vulnerabilities and security measures. The research evidence must
come from reputable sources or be written and published by reputable authors or publishers.

Appropriate Research evidence and presentation [5 marks]


3 Business Report Structure
Word limit (2,500 words +/- 10%; spread evenly across the two tasks)

================================================

Introduction

Task 2

Task 3
(Use sections, section/sub-section headings as appropriate)

Conclusion
================================================

4 Potential Resources
Business Report-writing

You might also like