You are on page 1of 6

COMP.

5205, Database Administration Semester 2 2018

ASSIGNMENT 2 – Database administration and SQL assignment


Assignment Due Date/Time Marks Weighting
Data management and SQL 100 40%
3 November
assignment
2018
Aim:
The aim of this assessment is to provide students with an understanding of the DBMS and
SQL database structure, relational database and understanding the differences between
databases
Notes:

This is an individual assignment and must be the product of your own work. Students are reminded
to read the pages related to assessment rules, including rules for dishonest work, in the Toiohomai
Student code of practice.

This assignment, with the completed standard cover sheet (available from CTC Reception) attached,
must be submitted to your lecturer in hard copy into the assignment drop box (at CTC reception
AFTER it has been date stamped).
Also an electronic copy (including the report and all SQL saved files

) is to be emailed to your lecturer (Bahram.Pishravi@toiohomai.ac.nz) by the due date and time. The
subject should have a format like: “Comp.5205- Assignment1--Your name- Student ID”

Late assignments will not be marked; nor will any without the BITA date stamp on the cover sheet.

No hand written assignment will be accepted, the minimum tool you can use for drawing and writing
is Microsoft word.

Important Note: In some cases if back up to external server was not possible a folder will be
provided for you to backup you’re backed up database to the Toiohomai server folders.

Report Quality/Presentation.
Your report should be presented in a professional manner meeting the following requirements:

 Must have the required cover page and table of contents, with your student name, student ID
and paper code.
 Should have sections and be error free.

Learning Outcome covered:


2. Demonstrate knowledge of relational data management, including making use of basic SQL
commands.
3. Apply relational database administration, including setting up database users, granting
permissions, and backing up data as well as importing data from and exporting data to
external systems.
COMP.5205, Database administration Assignment 2

Marks available:

Section Topic Marks


A (V1) Building data base in SQL server from given ERD / using GUI 30
A ( V2) Building data base in SQL server from given ERD /Using SQL 25
commands
B Manipulating database using SQL commands 28
C Conceptual questions ( research) 10
D Neatness of the report ( Cover page including all required 7
details, table of contents, neatly presented context, typed and
properly drawn diagrams electronically, all sections marked and
titled correctly), Referencing and in text citations
Totals 100

Part A – Building Databases in SQL server environment


- Consider the following ERD diagram:

Directions :

You are required to build two version of this database in SQL server :

A (V1)- Build a database from above ERD diagram using graphical tools of SQL server
and select proper type for each arributes and populate and create diagram .

A(V2)- Build the same databases and their relationship with polulated data using SQL
command ( Create & Instert )
COMP.5205, Database administration Assignment 2

Instructions:

Use flowing attributes to build tables in your Databases.

LECTURER SUBJECT
Attribute Name Data Type

LecturerID

LastName

FirstName CLASSROOM
StreetAddress
BUILDING

Suburb

City
Attribute Name Data Type

BuildingID

BuildingName

Building type

Location

A-V1) Requirements & Marking


scheme for A-V1 ( 30 marks)
A V1- 1) Build a database with all 4 tables graphically in SQL server correctly (8 marks)

A V1- 2) Identify and build all primary keys and foreign keys correctly (4 Marks)

AV1- 3) Identify and choose all attribute types correctly for each tables (4 marks)

AV1- 4) Populate all tables with at least 5 lines of data of your choice appropriately (6 marks)

AV1- 5) Create and save a (schema) diagram for this relational database in SQL server with correctly
created relationship between tables ( 3 Marks)

AV1- 6) Backup and save your database file at given location with proper naming, AV1 Ass2-
Yourname ( 5 marks)

Note: Submit the backup file, and screen shot of the database, including the tables’ relationship
diagram and each table in design view and as populated table

A-V2) Requirements & Marking scheme for A-V2 (25 marks)


COMP.5205, Database administration Assignment 2

Build a databases and create tables using SQL code to create all four tables with their relationship
and given constraint

A V2- 1) use create command (including constraints) to crate all four tables in the database, save and
submit the SQL file as “Av2-Create-Yourname.sql” file (12 marks = 3 marks for each correct
table creation and its relationships)

A V2- 2) Use insert command to populate all four tables, save and submit the SQL file as “AV2-Insert-
Yourname.sql” (8 marks = 2 marks for each correct table creation and its relation)

AV2- 3) Backup and save your database file in given location with proper naming, AV2- Ass2-
Yourname (5 marks)

Note: Submit the backup file, and attach electronic file saved for written codes. Additionally provide
screen shot of the database, including the tables’ relationship diagram and each table in
“design view” and as “populated table”

Part B – SQL command manipulation (28 marks)


Answer following questions or execute the instructions using SQL code manipulation:

B1- Write an SQL statement which returns the first name and last name of the lecturer.
Save the file as B1-SQL [use of select statement] (4 Marks)

B2- Write a SQL statement to return the lecturer surname and subject that lecturer is teaching. Save
the file code as B2-SQL (4 marks)

B3- Write a SQL statement which returns class room id with the highest number of desks. Save the
file code as B3-SQL (4 marks)

B4- Write a SQL statement which indexes your databases according to lecturers ID. Save the file code
as B4-SQL (4 marks)

B5- Write a SQL code which adds a column “Lecturer phone number “to the Lecturer table.
Save the file code as B5-SQL (4 marks)

B6- Write a SQL code to create a view for building name renamed as (B-Name) and building type
returned as (B-Type), and additional code for showing the view you have created.
Save the file code as B6-SQL (4 marks)

B7 – Write a Joint statement that joins “Room-ID” from class room table and “location” from
building table on the “building ID” in class room table is the same as “Building ID” in the Building
table and order the result on “Room – ID” . Save the file code as B7-SQL (4 marks)

Note: You need to submit all SQL electronic file created, as well as you need to write the code as the
answer of each of these sections in your report.

C – Answer following research questions, your answers should be brief,


concise and additional to what you learned in the class: (10 marks)
COMP.5205, Database administration Assignment 2

1- Research and explain (briefly) your understanding of :


a) Data Warehousing and Datamining in comparison with the relational
database
b) What role SQL server can play in implementing Data warehousing and
Data mining.
(5 marks will be awarded to the this question if the answer is fully
comprehensive yet concise and well referenced (+ in text citation)

2- Research and explain


a) The advantages of using RAID data storage techniques
b) Briefly explain techniques used in RAID

(5 marks will be awarded to the this question if the answer is fully


comprehensive yet concise and well referenced (+ in text citation)

D – REPORT NEATNESS (7 MARKS)

Students are expected to comply with reports professionalism Assigned marks for each
requirements. requirements

Requirement D1 Cover page including :

Student full name / student ID , paper name/


2 marks
paper number , date , assignment name/
assignment number, lecturer name,
department name

Requirement D2 Table of contents (named and numbered),


including sections name, task names and 1 marks
indentations for each sub section.

Requirement D3 All sections and tasks are neatly titled, 2 marks


COMP.5205, Database administration Assignment 2

numbered and separated clearly.

In text citation in required sections

Requirement D4 Overall report presented and typed neatly


with proper font, paragraph spacing, etc.
2 marks

Referencing page as required

Overall Totals 7 marks

You might also like