CSCI835 Database Systems Assignment 0 (Zero) : Saturday 29 August, 2020, 7.00 PM (Sharp)
CSCI835 Database Systems Assignment 0 (Zero) : Saturday 29 August, 2020, 7.00 PM (Sharp)
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).
This assignment consists of 5 tasks and specification of each task starts from a new page.
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.
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 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.
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
SPOOL OFF
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
SPOOL OFF
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
SPOOL OFF
We would like to change the contents of the database created and loaded with data in the
previous steps in the following ways.
(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
SPOOL OFF
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
(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
SPOOL OFF
End of specification