UNIVERSITY OF BOLTON CREATIVE TECHNOLOGIES GROUP COMPUTING TECHNOLOGY SEMESTER ONE EXAMINATION 2017/2018 DATABASE THEORY & PRACTICE MODULE NO: CPU5002

Similar documents
UNIVERSITY OF BOLTON CREATIVE TECHNOLOGIES GROUP COMPUTING TECHNOLOGY SEMESTER ONE EXAMINATION 2018/2019 DATABASE THEORY & PRACTICE MODULE NO: CPU5002

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

DATABASE DEVELOPMENT (H4)

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

UNIVERSITY OF BOLTON RAK ACADEMIC CENTRE BSC (HONS) COMPUTING SEMESTER ONE EXAMINATION 2017/2018 DATABASE THEORY AND PRACTICE MODULE NO: CPU5002

The University of Nottingham

King Fahd University of Petroleum and Minerals

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

Do not turn over until you are told to do so by the invigilator. Module Contact: Dr. Beatriz de la Iglesia (CMP)

EE221 Databases Practicals Manual

ER Modeling ER Diagram ID-Dependent and Weak Entities Pg 1

In mathematical terms, the relation itself can be expressed simply in terms of the attributes it contains:

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

Relational Model. IT 5101 Introduction to Database Systems. J.G. Zheng Fall 2011

Assignment Session : July-March

CS348: INTRODUCTION TO DATABASE MANAGEMENT (Winter, 2011) FINAL EXAMINATION

Chapter 4. The Relational Model

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

UNIVERSITY OF BOLTON WESTERN INTERNATIONAL COLLEGE FZE. BSc (HONS) COMPUTING SEMESTER ONE EXAMINATION 2018/2019 DATABASE THEORY AND PRACTICE

Introduction to Relational Databases. Introduction to Relational Databases cont: Introduction to Relational Databases cont: Relational Data structure

In This Lecture. The Relational Model. The Relational Model. Relational Data Structure. Unnamed and named tuples. New thing:scheme (and attributes)

Vendor: CIW. Exam Code: 1D Exam Name: CIW v5 Database Design Specialist. Version: Demo

Using Relational Databases and SQL for Social Scientific Research: Theory and Practice

DBMS. Relational Model. Module Title?

EGCI 321: Database Systems. Dr. Tanasanee Phienthrakul

WHAT IS SQL. Database query language, which can also: Define structure of data Modify data Specify security constraints

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

The Relational Model

AC61/AT61 DATABASE MANAGEMENT SYSTEMS DEC 2013

High-Level Database Models. Spring 2011 Instructor: Hassan Khosravi

Oracle 1Z Oracle Database 11g SQL Fundamentals I. Download Full Version :

CMPT 354: Database System I. Lecture 2. Relational Model

MySQL. A practical introduction to database design

Elements of the E-R Model

Final Project CS619 VIVA Preparation Notes

Database Systems Relational Model. A.R. Hurson 323 CS Building

Relational Model Concepts

Informatics 1: Data & Analysis

SYLLABUS. Departmental Syllabus. Structured Query Language (SQL)

Review The Big Picture

RELATIONAL DATA MODEL

ACS-3902 Fall Ron McFadyen 3D21 Slides are based on chapter 5 (7 th edition) (chapter 3 in 6 th edition)

CSE 135. Applications View of a Relational Database Management System (RDBMS) SQL. Persistent data structure. High-level API for access &modification

Ministry of Higher Education and Scientific research

A hypothetical M:M student schedule example

Introduction to Database. Dr Simon Jones Thanks to Mariam Mohaideen

Introduction to Databases

THE COPPERBELT UNIVERSITY

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

FUNCTIONAL DEPENDENCIES CHAPTER , 15.5 (6/E) CHAPTER , 10.5 (5/E)

A Flat file database. Problems with a flat file database (data redundancy)

MINFS544: Business Network Data Analytics and Applications

SUMMER EXAMINATIONS 2013

L12: ER modeling 5. CS3200 Database design (sp18 s2) 2/22/2018

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

CS211 Lecture: Database Design

Cambridge International Examinations Cambridge International Advanced Subsidiary and Advanced Level

Introduction to Database Systems. The Relational Data Model

Copyright of the University of East Anglia Version 2

Introduction to Database Systems. The Relational Data Model. Werner Nutt

UNIVERSITY OF BOLTON SCHOOL OF CREATIVE TECHNOLOGIES COMPUTER AND NETWORK SECURITY SEMESTER TWO EXAMINATIONS 2016/2017 NETWORK SECURITY

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

SQL Simple Queries. Chapter 3.1 V3.01. Napier University

CS530 Database Architecture Models. Database Model. Prof. Ian HORROCKS. Dr. Robert STEVENS. and Design The Relational

Lecture 8. Monday, September 29, 2014

BASIC SQL CHAPTER 4 (6/E) CHAPTER 8 (5/E)

Information Services. Essential Access Exercises. IT

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

The Relational Model and Normalization

BASIC SQL CHAPTER 4 (6/E) CHAPTER 8 (5/E)

LECTURE 3: ENTITY-RELATIONSHIP MODELING

Database Design and Administration for OnBase WorkView Solutions. Mike Martel Senior Project Manager

Referential integrity

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

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

The Relational Data Model. Data Models. Relational vs Semistructured. Structure Operations - Constraints

begin [atomic] operation, operation, { commit rollback} end

CS425 Fall 2016 Boris Glavic Chapter 2: Intro to Relational Model

Networks and Web for Health Informatics (HINF 6220)

3.1. Keys: Super Key, Candidate Key, Primary Key, Alternate Key, Foreign Key

Examination paper for TDT4145 Data Modelling and Database Systems

UNIVERSITY OF BOLTON CREATIVE TECHNOLOGIES HND/BSC (HONS) COMPUTING & WEBSITE DEVELOPMENT SEMESTER TWO EXAMINATION 2016/2017

CS619 Final Project Final Viva Preparation

Working with Databases and Java

Read this before starting!

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

1D0-541_formatted. Number: Passing Score: 800 Time Limit: 120 min File Version: 1.

CSC 453 Database Technologies. Tanu Malik DePaul University

Section 2.2: Relational Databases

Relational terminology. Databases - Sets & Relations. Sets. Membership

Introduction to Database Systems

Informatics 1: Data & Analysis

SQL - Subqueries and. Schema. Chapter 3.4 V4.0. Napier University

MySQL Creating a Database Lecture 3

B.C.A DATA BASE MANAGEMENT SYSTEM MODULE SPECIFICATION SHEET. Course Outline

Introductory SQL SQL Joins: Viewing Relationships Pg 1

A day in the life of a functional data scientist. Richard Minerich, Director of R&D at Bayard

The Relational Model. Why Study the Relational Model? Relational Database: Definitions

Chapter 1 SQL and Data

Database Management Systems,

Transcription:

[CRT01] UNIVERSITY OF BOLTON CREATIVE TECHNOLOGIES GROUP COMPUTING TECHNOLOGY SEMESTER ONE EXAMINATION 2017/2018 DATABASE THEORY & PRACTICE MODULE NO: CPU5002 Date: Monday 15 th January 2018 Time: 10:00 12:00 INSTRUCTIONS TO CANDIDATES: There are SIX questions on this paper. Section A Answer ANY TWO questions Section B Answer ANY TWO questions All questions carry equal marks.

Page 2 of 7 Section A Database Issues - Answer ANY TWO questions from this section. Question A1 - General database theory a. Discuss briefly the following: i) A Database and its purpose ii) A Database Management System and its advantages (6 marks) b. Consider these two tables: Staff (StaffID, FirstName, LastName, DeptID) StaffID FirstName LastName DeptID 11000 Peter John EDU 11001 Barrie Fisher BAM 11002 Mohammad Zakir COM 11003 Julie Banks PSY Department (DeptID, Name, Location) DeptID Name Location BAM Business Management M-Block COM Computing C-Block EDU Education M-Block PSY Psychology T2 i) How many attributes and tuples are shown in the Staff relation? ii) What is the degree and cardinality of the Department relation? iii) The StaffID column is set to be the primary key of the Staff table. Explain what this means, in terms of what the primary key is used for, the constraints associated with it, and why StaffID has been chosen as the primary key instead of any of the other columns. (4 marks) iv) The DeptID column of the Staff table is set to be a foreign key. Explain what this means, in terms of what this tells us about the values in this column. Question A1 continues over the page.

Page 3 of 7 Question A1 continued. c. With regard to the tables above give an example of referential integrity. d. For each of the following statements specify if they are true or false: i) A null value indicates an erroneous value. ii) A primary key must be a numeric value. iii) A primary key can be set to a null value. iv) Two tuples can have the same primary key value. v) A foreign key can be set to a null value. (5 marks) Question A2 Structured Query Language (SQL) Consider these two tables, representing criminal investigation cases, police officers and suspects: Cases (CaseNumber, Charge, OfficerInChargeID, Suspect) CaseNumber Charge OfficerInChargeID Suspect 1 Drug possession B001 Avon Barksdale 2 Murder B002 Omar Little 3 Money laundering B003 Russell Bell 4 Murder B004 Roland Brice Officers (OfficerInChargeID, Name, Rank, Unit) OfficerInChargeID Name Rank Unit B003 Cedric Daniels Lieutenant Major crimes B002 Lester Freamon Detective Homicide B005 Thomas Hauk Sergeant Narcotics B004 Kima Greggs Detective Homicide B001 Jimmy McNulty Detective Major crimes a. Write an SQL query to return the names and ranks of all the police officers from the Officers table. (1 marks) Question A2 continues over the page.

Page 4 of 7 Question A2 continued. b. Write an SQL query to create the Cases table. The CaseNumber is the Primary Key attribute and the Suspect field should not be allowed to contain null values. c. Write a query using a join that returns the case numbers of all cases, along with the name and unit of the officer in charge. d. Write an SQL command to add a new column (SuspectAge) to the Cases table. This should be an integer value. e. Write an SQL command to set all the values for this new column (SuspectAge) to null. f. Write a query to return the case number, charge, and suspect's name and address for all murder charges. g. Write an SQL query to remove the suspect Omar Little from the Cases table. h. Write an SQL query to change the charge for the suspect Russell Bell from Money laundering to Murder. i. Write a query using a join that returns the name and unit of all police officers, including the number of any cases they are currently in charge of. j. Write an SQL query to return all the data from the Officers table, with the results presented in OfficerInChargeID order. k. Write a query to add the following rows into the Officers table: B007 Richie Brew Sergeant Homicide B006 Megan Hauk Detective Narcotics

Page 5 of 7 Question A3 Database design a. Consider this table: Actor DOB Film Year Fee Studio studio_city Tom Cruise 03/07/1962 Mission: Impossible II 2000 14 MGM Hollywood War of the Worlds 2005 20 MGM Hollywood Thandie Newton 06/11/1972 Mission: Impossible II 2000 6 MGM Hollywood Brad Pitt 18/12/1963 Ocean's Eleven 2001 10 Paramount Miami Moneyball 2011 11 Time Warner New York Jim Carrey 17/01/1962 Yes Man 2008 15 Time Warner New York Fee = the fee charge by an actor (in millions $) Define relations that would represent the above table in 3 rd Normal Form. Explain how this is determined by describing the rules for each of the 3 Normal Forms. b. Consider this table: Student ID Student Name Student Address Course ID Course Name S01 Jones Smith Bolton 50 Computing S02 Richard Thomas Liverpool 55 Accounts S10 Amanda Gill Glasgow 40 Maths (10 marks) The table shown is susceptible to different database anomalies. Provide examples of insertion, deletion, and modification anomalies. (7 marks) Question A3 continues over the page.

Page 6 of 7 Question A3 continued. c. The following entities and attributes are identified by the database designer for a University database: Students (StudentID, FirstName, LastName, Age, CourseID, Mode) Courses (ID, Title, UCAScode, Award, AcademicGroup, CourseLeader) AcademicGroups (Code, Name, Location) StaffMember (Name, AcademicGroup, Office) Draw an Entity-Relationship model (using the UML notation) that represents these 4 entities, assuming the following relationships: i. A student takes 1 or more courses ii. An academic group runs 1 or more courses iii. An academic group employs 1 or 6 staff members iv. A staff member teaches between 2 and 4 courses v. A staff member supervises between 1 and 6 students (8 marks) Section B Terminology, Security and Database Models. Answer ANY TWO questions from this section. Question B1 Database Models a. Draw a correctly labelled diagram that represents the ANSI-SPARC 3 layer model (13 marks) b. Explain the term ACID when related to database transactions. (8 marks) c. What are the four transaction types that databases need to support Relational Database Operations (4 marks)

Page 7 of 7 Question B2 Terminology a. Define the term relational database b. Define and give an example of the following terms i. Tuple ii. Relation iii. Attribute iv. Cardinality v. Degree vi. Domain (12 marks) c. Identify 3 MySQL datatypes and give an appropriate example of usage (6 marks) d. Explain what a view is, and why it might be used. (4 marks) Question B3 Database security a. Discuss briefly the following: i) Database security ii) The three main aspects of database security. b. Discuss 5 methods used to implement database security. (8 marks) (10 marks) c. Describe what is meant by an SQL injection attack and briefly describe 5 design principles that can be followed to reduce the risk of such an attack. (7 marks) END OF QUESTIONS