0% found this document useful (0 votes)
49 views12 pages

CSCI835 Database Systems Assignment 0 (Zero) : Saturday 29 August, 2020, 7.00 PM (Sharp)

This document provides instructions for Assignment 0 in the subject CSCI835 Database Systems. It consists of 5 tasks related to designing, creating, loading data into, modifying, and querying a relational database. Students must complete each task individually and submit SQL scripts and reports from processing the scripts in SQLcl by the due date of August 29, 2020. Submissions must follow specified formatting and compilation requirements. Plagiarism will result in failure of the assessment.

Uploaded by

Masud Zaman
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)
49 views12 pages

CSCI835 Database Systems Assignment 0 (Zero) : Saturday 29 August, 2020, 7.00 PM (Sharp)

This document provides instructions for Assignment 0 in the subject CSCI835 Database Systems. It consists of 5 tasks related to designing, creating, loading data into, modifying, and querying a relational database. Students must complete each task individually and submit SQL scripts and reports from processing the scripts in SQLcl by the due date of August 29, 2020. Submissions must follow specified formatting and compilation requirements. Plagiarism will result in failure of the assessment.

Uploaded by

Masud Zaman
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/ 12

School of Computing and Information Technology Session: Spring 2020

University of Wollongong Lecturer: Janusz R. Getta

CSCI835 Database Systems


Assignment 0 (zero)
21 August 2020

This assignment is only for the students who are enrolled in a subject
CSCI835 Database Systems

Scope
This assignment includes the tasks related to the design and creation of a relational
database, loading data into a database, modification of database structures,
implementation of data manipulation and data retrieval operation from a database.

The outcomes of the laboratory work are due by Saturday 29 August, 2020, 7.00 pm
(sharp).

Please read very carefully information listed below.

This supplementary assignment contributes to 10% of the total evaluation in a subject


CSCI835.

A submission procedure is explained at the end of assignment specification.

This assignment consists of 5 tasks and specification of each task starts from a new page.

A submission marked by Moodle as "late" is treated as a late submission no matter how


many seconds it is late.

A policy regarding late submissions is included in the subject outline.

A submission of compressed files (zipped, gzipped, rared, tared, 7-zipped, lhzed, … etc)
is not allowed. The compressed files will not be evaluated.

All files left on Moodle in a state "Draft(not submitted)" will not be evaluated.

An implementation that does not compile due to one or more syntactical errors scores no
marks.

All submissions must be in a form of reports from processing of SQL scripts. It is


explained at the end of specification of each task how to create a report from processing
of SQL script. Plain SQL files without the reports from the processing will not be
evaluated.
It is expected that all tasks included within Assignment 0 (zero) will be solved
individually without any cooperation with the other students. If you have any doubts,
questions, etc. please consult your lecturer or tutor during lab classes or office hours.
Plagiarism will result in a FAIL grade being recorded for the assessment task.
Task 1 (2 marks)
An objective of this task is to implement a relational database

We would like to implement a relational database to store information about real estate
properties and owners of real estate properties.

To simplify a design, we consider only two types of real properties: stand-alone houses
and blocks of land.

Both types of real estate properties are described by a full address that consists of city,
street, building number/lot number, and area.

Stand-alone houses are additionally described by the total number of bedrooms.

Stand-alone houses and blocks of land are uniquely identified by a group of attributes
city, street, and building number/lot number.

The real estate properties are owned by the owners. A typical owner is described by first
name, last name, and mobile phone number. An owner is identified by a mobile phone
number.

Whenever a real estate property is put on a market the owners provide information about
their asking price for such property.

Implement SQL script solution1.sql with CREATE TABLE statements that


implement the database described above.

When ready use SQLcl to process SQL script file solution1.sql and save a report
from processing in a file solution1.lst. You must use SQLcl to create a report !

Your report must include a listing of all SQL statements processed. To achieve that put
the following SQLcl commands:

SPOOL solution1
SET ECHO ON
SET FEEDBACK ON
SET LINESIZE 300
SET PAGESIZE 200

at the beginning of SQL script and

SPOOL OFF

at the end of SQL script.


It is strongly recommended to implement a script dbdrop.sql that drops the relational
tables created during testing. The script can be used at the testing stages to avoid the
errors when processing CREATE TABLE statements.

It is explained in Cookbook, Recipe 2.5 How to use SQLcl client ?


Step 9 How to create and to save a report ? how to create a report
from processing of SQL script.

Deliverables
A file solution1.lst with a report from processing of a script file
solution1.sql. A report must have no errors and it must list all SQL statements
processed.
Task 2 (2 marks)
An objective of this task is to enter sample data into a relational database

We would like to store in the database information that satisfies the following constraints.

(1) The database contains information about 5 real estate properties that include 2
stand-alone houses and 3 blocks of land.

(2) The database contains information about 3 owners. The first owner owns 1 stand-
alone house and 2 blocks of land. The second owner owns 1 stand-alone house. The
third owner owns only one block of land.

(3) All values of attributes must be meaningful, for example the first name of an owner
like QQQ is unacceptable. No marks will be granted for task 2 and 30% will be
deducted from the total evaluation of Assignment 0 (zero) for meaningless values of
the attributes.

Please also note, that the values of attributes will be used to verify originality of your
work.

Implement SQL script solution2.sql with INSERT statements that enter data into
the database created in the previous step.

When ready use SQLcl to process SQL script file solution2.sql and save a report
from processing in a file solution2.lst. You must use SQLcl to create a report !

Your report must include a listing of all SQL statements processed. To achieve that put
the following SQLcl commands:

SPOOL solution2
SET ECHO ON
SET FEEDBACK ON
SET LINESIZE 300
SET PAGESIZE 200

at the beginning of SQL script and

SPOOL OFF

at the end of SQL script.

It is explained in Cookbook, Recipe 2.5 How to use SQLcl client ?


Step 9 How to create and to save a report ? how to create a report
from processing of SQL script.
Deliverables
A file solution2.lst with a report from processing of a script file
solution2.sql. A report must have no errors and it must list all SQL statements
processed.
Task 3 (2 marks)
An objective of this task is to perform the structural modifications of a relational
database

We would like to change the structures of the database created and loaded with data in
the previous steps in the following ways.

(1) It should be possible to keep information about the dates when a real estate property
has been put on a market.

(2) It should be possible to keep information about total number of properties (both
blocks of land and stand-alone houses) owned by each owner.

(3) It should be possible to keep information about potential buyers and their interests in
the real estate properties offered for sale. A potential buyer is uniquely identified by
mobile phone number. Additional description of a buyer includes first name
and last name. A potential buyer expresses his/her interests in purchasing of one or
more real estate properties.

Implement SQL script solution3.sql with SQL statements that perform the
structural modification listed above.

When ready use SQLcl to process SQL script file solution3.sql and save a report
from processing in a file solution3.lst. You must use SQLcl to create a report !

Your report must include a listing of all SQL statements processed. To achieve that put
the following SQLcl commands:

SPOOL solution3
SET ECHO ON
SET FEEDBACK ON
SET LINESIZE 300
SET PAGESIZE 200

at the beginning of SQL script and

SPOOL OFF

at the end of SQL script.

It is explained in Cookbook, Recipe 2.5 How to use SQLcl client ?


Step 9 How to create and to save a report ? how to create a report
from processing of SQL script.
Deliverables
A file solution3.lst with a report from processing of a script file
solution3.sql. A report must have no errors and it must list all SQL statements
processed.
Task 4 (2 marks)
An objective of this task is to perform the data manipulations on a relational
database

We would like to change the contents of the database created and loaded with data in the
previous steps in the following ways.

(1) Remove one of the real estate properties from a market.

(2) Remove an owner that owns no real estate properties.

(3) Fill a column with information about the total number or properties owned by each
owner.

Implement SQL script solution4.sql with SQL statements that perform the
modifications listed above.

When ready use SQLcl to process SQL script file solution4.sql and save a report
from processing in a file solution4.lst. You must use SQLcl to create a report !

Your report must include a listing of all SQL statements processed. To achieve that put
the following SQLcl commands:

SPOOL solution4
SET ECHO ON
SET FEEDBACK ON
SET LINESIZE 300
SET PAGESIZE 200

at the beginning of SQL script and

SPOOL OFF

at the end of SQL script.

It is explained in Cookbook, Recipe 2.5 How to use SQLcl client ?


Step 9 How to create and to save a report ? how to create a report
from processing of SQL script.

Deliverables
A file solution4.lst with a report from processing of a script file
solution4.sql. A report must have no errors and it must list all SQL statements
processed.
Task 5 (2 marks)
An objective of this task is to implement data retrieval from a relational database

We would like to implement the following queries as SELECT statements.

(1) List full address of each real estate property together with the first and last name of
an owner.

(2) List the first name and last name of the owners together with the total number of a
stand-alone houses owned.

(3) List first name and last name of all owners together with information about blocks of
land owned. Note, if an owner does not own a block of land then still list his/her first
and last name.

(4) List the first and last name of all owners who own at least one stand-alone house and
at least one block of land.

Implement SQL script solution5.sql with SELECT statements that perform the
modifications listed above.

When ready use SQLcl to process SQL script file solution5.sql and save a report
from processing in a file solution5.lst. You must use SQLcl to create a report !

Your report must include a listing of all SQL statements processed. To achieve that put
the following SQLcl commands:

SPOOL solution5
SET ECHO ON
SET FEEDBACK ON
SET LINESIZE 300
SET PAGESIZE 200

at the beginning of SQL script and

SPOOL OFF

at the end of SQL script.

It is explained in Cookbook, Recipe 2.5 How to use SQLcl client ?


Step 9 How to create and to save a report ? how to create a report
from processing of SQL script.
Deliverables
A file solution5.lst with a report from processing of a script file
solution5.sql. A report must have no errors and it must list all SQL statements
processed.
Submission
Submit the files solution1.lst, solution2.lst, solution3.lst,
solution4.lst, and solution5.lst through Moodle in the following way:
(1) Access Moodle at http://moodle.uowplatform.edu.au/
(2) To login use a Login link located in the right upper corner the Web page or in
the middle of the bottom of the Web page
(3) When logged select a site CSCI835/CSCI235 (S220) Database
Systems
(4) Scroll down to a section SUBMISSIONS
(5) Click at a link In this place you can submit the outcomes of
Assignment 0 (zero) for CSCI835 students only
(6) Click at a button Add Submission
(7) Move a file solution1.lst into an area You can drag and drop
files here to add them. You can also use a link Add…
(8) Repeat a step (7) for the files solution2.lst, solution3.lst,
solution4.lst, and solution5.lst.
(9) Click at a button Save changes
(10) Click at a button Submit assignment
(11) Click at the checkbox with a text attached: By checking this box, I
confirm that this submission is my own work, … in order to
confirm the authorship of your submission.
(12) Click at a button Continue

End of specification

You might also like