BSc (Hons) Computer Science with Network Security. Examinations for / Semester1

Similar documents
BSc (Hons) Web Technologies, BSc (Hons) Business Information System. Examinations for / Semester 2. Resit Examinations for BIS/15B/FT

BSc (Hons) Software Engineering. BSc (Hons) Computer Science with Network Security. Examinations for / Semester 2 & 2017 / Semester 1

Multiple-Choice. 3. When you want to see all of the awards, even those not yet granted to a student, replace JOIN in the following

The University of Nottingham

Sankalchand Patel College of Engineering, Visnagar B.E. Semester III (CE/IT) Database Management System Question Bank / Assignment

GUJARAT TECHNOLOGICAL UNIVERSITY

VIEW OTHER QUESTION PAPERS

1 (10) 2 (8) 3 (12) 4 (14) 5 (6) Total (50)

THE COPPERBELT UNIVERSITY

Bsc(Hons) Web Technologies. Examinations for / Semester 2

. : B.Sc. (H) Computer Science. Section A is compulsory. Attempt all parts together. Section A. Specialization lattice and Specialization hierarchy

QSCU Merchandise Store

The appendix contains information about the Classic Models database. Place your answers on the examination paper and any additional paper used.

UNIVERSITY OF TORONTO MIDTERM TEST SUMMER 2017 CSC343H Introduction to Databases Instructor Tamanna Chhabra Duration 120 min No aids allowed

Database Management Systems

Bachelor in Information Technology (BIT) O Term-End Examination

Entity Relationship Diagram (ERD) Dr. Moustafa Elazhary

1. (a) Briefly explain the Database Design process. (b) Define these terms: Entity, Entity set, Attribute, Key. [7+8] FIRSTRANKER

Database Systems CSE Comprehensive Exam Spring 2005

BSc (Hons) in Computer Applications. Examinations for / Semester 1

CITS3240 Databases Mid-semester 2008

DATABASE DEVELOPMENT (H4)

CS40 Exam #1 October 17, 2001

MCA (Revised) Term-End Examination December,

CS 327E Class 3. February 11, 2019

Translation of ER-diagram into Relational Schema. Dr. Sunnie S. Chung CIS430/530

Database Management Systems

FINAL Examination Paper (COVER PAGE)

The DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data.

BSc (Hons) Web Technologies. BSc (Hons) Business Information System. Examinations for 2016 Semester 2. Resit Examination for BIS/15A/FT & BIS/15B/FT

12. MS Access Tables, Relationships, and Queries

Birkbeck. (University of London) BSc/FD EXAMINATION. Department of Computer Science and Information Systems. Database Management (COIY028H6)

UNIVERSITI SAINS MALAYSIA. CIT503 Databases and E-Commerce Rapid Application Development. CSI512 Database Management Systems

Bsc (Hons) Software Engineering. Examinations for / Semester 1. Resit Examinations for BSE/15A/FT & BSE/16A/FT

1. Database Design. Assignment 2: Database Design A Basic ER Diagram and a Data Dictionary (40 points)

Faculty of Environment & Technology

EECS-3421a: Test #2 Queries

Birkbeck. (University of London) BSc/FD EXAMINATION. Department of Computer Science and Information Systems. Database Management (COIY028H6)

CSE 344 Midterm. Wednesday, February 19, 2014, 14:30-15:20. Question Points Score Total: 100

PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science

CITS2232 Databases Mid-semester 2010

COMP Instructor: Dimitris Papadias WWW page:

SUMMER EXAMINATIONS 2013

EXAMINATION FOR THE BSC (HONS) IN INFORMATION SYSTEMS; YEAR 2

Northern India Engineering College, New Delhi Question Bank Database Management System. B. Tech. Mechanical & Automation Engineering V Semester

Detailed Data Modelling: Attribute Collection and Normalisation of Data

Official Statistics - Relational Database Management Systems. Official Statistics - Relational Database Management Systems

SAMPLE FINAL EXAM SPRING/2H SESSION 2017

Appendix A Database Design. Data Modeling and the Entity-Relationship Model

KINGDOM OF SAUDI ARABIA-JAZAN UNIVERSITY COLLEGE OF COMPUTER SCIENCE & INFORMATION SYSTEMS 221 INFS 3 DATABASE SYSTEMS-1 REVIEW QUESTIONS

UNIVERSITY OF BOLTON WESTERN INTERNATIONAL COLLEGE FZE BSC (HONS) COMPUTING SEMESTER ONE EXAMINATION 2015/2016 DATABASE THEORY AND PRACTICE

CS425 Midterm Exam Summer C 2012

D B M G. SQL language: basics. Managing tables. Creating a table Modifying table structure Deleting a table The data dictionary Data integrity

NOTE: DO NOT REMOVE THIS EXAM PAPER FROM THE EXAM VENUE

CSE 544 Principles of Database Management Systems

EXAMINATION PAPER. Exam in: INF-2700 Database Systems Date: Thursday Time: Kl 15:00-19:00 Place: Åsgårdveien 9. Approved aids: None

CSE 344 Final Examination

Database Applications (15-415)

Management of Information Systems Session 3

LAB 3 Part 1 ADBC - Interactive SQL Queries-Advanced

PES Institute of Technology Bangalore South Campus (1 K.M before Electronic City,Bangalore ) Department of MCA. Solution Set - Test-II

LECTURE 3: ENTITY-RELATIONSHIP MODELING

CIS 330: Applied Database Systems. ER to Relational Relational Algebra

HW1 is due tonight HW2 groups are assigned. Outline today: - nested queries and witnesses - We start with a detailed example! - outer joins, nulls?

School of Computing and Information Technology. Examination Paper Autumn Session 2017

BIRKBECK (University of London)

Logical Database Design. ICT285 Databases: Topic 06

King Fahd University of Petroleum and Minerals

RELATIONAL DATA MODEL

CSE-3421 Test #1 Design

Multiple-Choice. 1. Which of the following is equivalent to a table? (3 pts.) a. record b. relation c. relationship d. constraint e.

Lecture4: Guidelines for good relational design Mapping ERD to Relation. Ref. Chapter3

Relational Model History. COSC 304 Introduction to Database Systems. Relational Model and Algebra. Relational Model Definitions.

Introduction to Databases Exam

Revised Guidelines for B.A. Programme Semester II Paper: Database Management System (Meeting held on 15 th Jan 2015)

Total No. of Questions :09] [Total No. of Pages : 02

1. Considering functional dependency, one in which removal from some attributes must affect dependency is called

Entity Relationship Modelling

MIS Database Systems Entity-Relationship Model.

The Next Step: Designing DB Schema. Chapter 6: Entity-Relationship Model. The E-R Model. Identifying Entities and their Attributes.

Principles of Data Management

Databases Model the Real World. The Entity- Relationship Model. Conceptual Design. Steps in Database Design. ER Model Basics. ER Model Basics (Contd.

Example Examination. Allocated Time: 100 minutes Maximum Points: 250

ALLAMA IQBAL OPEN UNIVERSITY, ISLAMABAD (Department of Computer Science)

Consistency The DBMS must ensure the database will always be in a consistent state. Whenever data is modified, the database will change from one

EECS-3421a: Test #1 Design

BCS THE CHARTERED INSTITUTE FOR IT BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT DATABASE SYSTEMS

Score. 1 (10) 2 (10) 3 (8) 4 (13) 5 (9) Total (50)

CONCEPT ON STRUCTURED QUERY LANGUAGE (SQL) By: Rohan Byanjankar Sainik Awasiya Mahavidyalaya, Sallaghari, Bhaktapur

Schema And Draw The Dependency Diagram

Note: Select one full question from each unit

Practice questions recommended before the final examination

CSE 444 Midterm Exam

DATABASE DESIGN I - 1DL300

Module Contact: Dr Beatriz de la Iglesia, CMP Copyright of the University of East Anglia Version 1

CS403- Database Management Systems Solved Objective Midterm Papers For Preparation of Midterm Exam

The Relational Model. Week 2

ARTICLE RELATIONAL ALGEBRA

THE UNIVERSITY OF BRITISH COLUMBIA CPSC 304: MIDTERM EXAMINATION SET A OCTOBER 2016

ER Model Overview. The Entity-Relationship Model. Database Design Process. ER Model Basics

Transcription:

BSc (Hons) Computer Science with Network Security Cohort: BCNS/14/FT Examinations for 2014-2015 / Semester1 MODULE: DATABASE DESIGN MODULE CODE: DBT 1111C Duration: 2 Hours 30 Mins Instructions to Candidates: 1. Answer ANY FOUR questions. 2. Questions may be answered in any order but your answers must show the question number clearly. 3. Always start a new question on a fresh page. 4. All questions carry equal marks. 5. Total marks 100. 6. Appendix included [3 pages] This Exam Paper contains 5 questions and 11 pages. Page 1 of 11

ANSWER ANY FOUR QUESTIONS QUESTION 1: (25 MARKS) (a) Explain the term query and list any four functions performed by a query. [1 + 4 marks] (b) List and briefly describe five potential benefits of the database approach compared to conventional file systems. [5 X 2 marks] (c) Differentiate between Database System and Database Management System. Support your answer with an appropriate example of each.. [4 marks] (d) Explain the terms entity integrity and referential integrity and state how they should be supported in relational database management systems. Support your answer with appropriate example [6 marks] QUESTION 2: (25 MARKS) The UTM Flower and Plant Nursery (UFPN) has been created by the UTM Student Union in order to help generate some additional funds to finance some of their activities. The UFPN sells seeds and plants of flowers and vegetables to the public in general as well as insecticides/pesticides and fertilizers (both chemical fertilizers and manure). All these items are recorded under one generic Page 2 of 11

component i.e. Product but with their respective details as specific items. Usually the nursery produces all of its seeds/plants but in periods of high demand additional seeds/plants are bought from local planters. The UFPN wishes to computerize its database system to better monitor its transaction and stock. The customers can be any of these: Public, Staff, or Student (Including Student Union members). The system would hold data about the following: CUSTOMER: Customer Number (C_NO), Forename (CFName), Lastname (CLName), Street, City, Phone1 (Home), Phone2 (Mobile), Email, National ID Number (NIC), Credit Card Number (CCN), Type (Public, Staff, Student). For the public, the following details are also recorded: Employed/Unemployed/Self Employed and Employer address. For UTM staff, Staff Number (S_NO), Department (Dept) and School are recorded. For the student, Student Number (St_NO), Cohort and Programme as well as whether they are Student Union member or not, are recorded. All these details will be later used to generate statistics about the sales and revenues. At the end of each academic year, during the End of Year Party, student who sells/buy more products are rewarded with a symbolic shield. Only Student Union members are allowed to operate as staff for the nursery. They will buy additional seeds/plants from local planters, Fertilizers and Herbicides/pesticides from local suppliers. Details recorded for planters are: Planter_Id (P_Id), Planter forename (PFName), Planter last name (PLName), Planter Category (Fruits/Vegetables) Address, City, Phone1, Phone2, Fax, and Email. Details recorded for suppliers are: Supplier_Id (S_Id), Supplier forename (SPFName), Supplier last name (SPLName), Supplier Type (Fertizers/Herbicides/Pesticides) Address, City, Phone1, Phone2, Fax, and Email. Page 3 of 11

Details of payment include Payment_Id (PY_Id), Payment date (PY_Date), Amount Tendered (Amt_T), Amount Returned (Amt_R), Method (Cash (CH) or Credit Card (CC). Details of Stock are Stock date (STK_date), products Name and their quantity. Products fall under the following categories: Seed: Seed Id (SD_Id), Common Name (CN), Scientific Name (SN), Seed Type (Fruits/Vegetables), Quantity in grammes (Qty), Production date (Prod_date), Expiry date (Exp_date). Plant: Plant Id (PL_Id), Common Name (CN), Scientific Name (SN), Plant Type (Fruits/Vegetables), Quantity in grammes (Qty), Production date (Prod_date), Expiry date (Exp_date). Fertilizer: Fertilizer Id (F_Id), Common Name (CN), Scientific Name (SN), fertilizer Type (Chemical/Organic), Quantity in Kilogrammes (Qty), Production date (Prod_date). Medecine: Medecine Id (M_Id), Common Name (CN), Scientific Name (SN), Medecine Type (Herbicide/Pesticides), Quantity in Litres (Qty), Production date (Prod_date), Expiry date (Exp_date). Apart from the Ids for the different categories, a Product Id (PR_Id) and a product Name (PR_Name) are also recorded in the system. A customer can buy any number of products and a product may be bought by one or more customers, depending on its availability in stock. A planter may provide any number of seeds/plants and a seed/ plant is provided by one or more planter. A fertilizer is supplied by one or more supplier. Each supplier supplies one or more fertilizers. An Herbicide/Pesticide is supplied by one or more suppliers. Each supplier can supply one or more herbicide/pesticide. A student Union member can sell one or more product. A product can be sold by one or more student union member. Page 4 of 11

A student Union member can buy one or more product. A product can be bought by one or more student union member. After each transaction, payment is effected either by cash or credit card and the stock is updated immediately. (a) Produce an Entity Relationship Diagram (Logical Data Structure) for the above scenario. For each entity list the attributes and underline their respective primary key. Identify any double relationship that may exist between any two entities. [11 Marks] (b) Translate your ERD into a relational database schema. [10 Marks] (c) Identify two Supertype entities and their respective Subtypes entities in the system. [2+2 Marks] QUESTION 3: (25 MARKS) (a) Explain the need for Normalization in Database Design and define the following terms with appropriate example: (i) First Normal Form (ii) Second Normal Form (iii) Third Normal Form. [8 marks] Based on the data provided below (Fig 3) carry out the tasks mentioned below (i.e. parts (i) to (iv)) to normalize the table up to the third Normal Form Page 5 of 11

S_ID is student ID and S_Name is student name Br_NO is Branch number and B_Name is Branch name C_ID is Course ID Ins_ID is Instructor ID and Ins_Name is Instructor Name Assumptions: Each student is enrolled on at least one course Each course has got its minimum break through to be run Each branch is running at least one course. Fig 3 (b) Explain why the table is un-normalised and convert it into 1 st Normal Form identifying an appropriate Primary key for this 1NF table. [2 + 3 marks] (c) Draw the 1 st Normal Form Table. [4 marks] (d) Decompose the 1 st NF into 2 nd Normal Form [4 marks] (e) Decompose the 2 nd Normal Form into 3 rd Normal Form [4 marks] Page 6 of 11

QUESTION 4: (25 MARKS) Using the tables provided in the Appendix A, express the following queries in SQL USING ORACLE 9I SYNTAX. (a) Write the SQL code that will create the table structure for the (i) OWNER table (without specifying any primary key). (ii) PET table (without specifying C_NO and V_NO) [3 + 3 marks] (b) Having created the table OWNER in question (a) above, write the SQL code that will enter the first data row into the Experiment table. [3 marks] (c) Add a PRIMARY KEY constraint to make O_NO the primary key of the CUSTOMER table [2 marks] (d) Add a FOREIGN KEY constraint to make O_NO the foreign key in the PET table. [3 marks] (e) Add a new column in the OWNER table with the following data definition (Column Name EMAIL of Varchar2 data type and field size of 25, and contains a constraint that data cannot be NULL ) [2 marks] (f) The parrot named Angel suffered from a rare disease and passed away recently. Write the SQL code to delete the parrot from the PET table. [2 marks] (g) The Veterinary Issacjee recently left the country to work abroad for two years. During his absence from the country he has requested Dr Huang to continue his consultation with his patient. Consequently you have been asked to update the PET table. Write SQL code to update the veterinary number (V_N0) [3 marks] Page 7 of 11

(h) Write SQL code to display the name of the youngest dog registered in the system. [4 marks] QUESTION 5: (25 MARKS) This question refers to the database tables given in the Appendix A. Formulate each of the following queries in Relational Algebra. (a) Display the last names of all owners who own both a dog and a cat. [6 marks] (b) Display the forename of all owners who own either a dog or a cat. [6 marks] (c) Display the last names of all owners who do not own a cat. [6 marks] (d) Display the forenames and last names of all owners who own all categories of pet at their place. [7 marks] Page 8 of 11

APPENDIX A Data in Appendix A are meant for Question 4 and Question 5. Below are three tables: OWNER, PET AND VETERINARY. The OWNER Table consists of the OWNER Number (O_No) as Primary key, Fname as owner Forename, Lname as Owner Lastname, Street, City and Phone. The PET Table consists of the Pet Number (P_NO) as Primary Key, Pet name as P_name, Age (in Months), Category, vaccinated (YES/NO), O_NO, V_NO. The VETERINARY Table consists of the Veterinary Number (V_NO) as Primary key, Veterinary First Name (Vfname), Veterinary Last Name (Vlname), Address, City and Mobile number. A customer can have one or more pet(s). A pet is bought by one customer only. A veterinary can consult one or more pets of different category. A pet is consulted by one veterinary. Your task is to express each of the given queries in SQL using Oracle 9i syntax. Example data are provided in these tables for your convenience but note that they are only example data. Your queries must work for all potential data residing in the given tables, not just those illustrated here. Page 9 of 11

APPENDIX A FOR QUESTION 4 AND QUESTION 5 Page 10 of 11

***END OF PAPER*** Page 11 of 11