CS 275 Final Project (50pts Total)

Similar documents
A hypothetical M:M student schedule example

Unit Assessment Guide

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

Database Foundations. 6-4 Data Manipulation Language (DML) Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Requesting an Independent Study

Introduction to SQL/PLSQL Accelerated Ed 2

Database Systems CSE Comprehensive Exam Spring 2005

Relational model continued. Understanding how to use the relational model. Summary of board example: with Copies as weak entity

ER to Relational Model. Professor Jessica Lin

SQL. SQL Data Manipulation: Queries

Oracle Database 11g: SQL and PL/SQL Fundamentals

How to Apply for the ACE Program

Table of Contents. PDF created with FinePrint pdffactory Pro trial version

SQL Retrieving Data from Multiple Tables

Continuing Education

Introduction to ERwin

THE COPPERBELT UNIVERSITY

Oracle Database 11g: Introduction to SQLRelease 2

Chapter 3: Introduction to SQL

Business Analytics. SQL PL SQL [Oracle 10 g] P r i n c e S e t h i w w w. x l m a c r o. w e b s. c o m

Oracle Database: SQL and PL/SQL Fundamentals NEW

FIT 100 More Microsoft Access and Relational Databases Creating Views with SQL

NGTC Course Catalog / Student Handbook PROGRAMS OF STUDY COMPUTER INFORMATION SYSTEMS COMPUTER INFORMATION SYSTEMS

Database Foundations. 5-1 Mapping Entities and Attributes. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Oracle Database: SQL and PL/SQL Fundamentals Ed 2

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

Midterm Review. Winter Lecture 13

The Relational Model. Suan Lee

PART 1 - E-R Modelling - THIS PART DOES NOT USE SQL*Plus or ORACLE AT ALL!

Topics. CSCI 403 Database Management DISTINCT. JOIN Clause 2/4/2019 DISTINCT JOINS. 12 Miscellaneous Topics

COMPUTER INFORMATION SYSTEMS

Full file at

DATABASE DEVELOPMENT (H4)

Question Bank PL/SQL Fundamentals-I

Chapter 3: Introduction to SQL

Chapter 4: SQL Basics

CS425 Midterm Exam Summer C 2012

Introduction to Databases

Oracle Database: Introduction to SQL Ed 2

The SQL data-definition language (DDL) allows defining :

Implementing Table Operations Using Structured Query Language (SQL) Using Multiple Operations. SQL: Structured Query Language

SIS Modernization Faculty (Instructor) Portal Training Guide

Chapter 6: Formal Relational Query Languages

ORACLE DATABASE 12C INTRODUCTION

Database Lab Lab 6 DML part 3

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

Curriculum Mapping for National Curriculum Statement Grades R-12 and Oracle Academy.

Chapter 3: Introduction to SQL. Chapter 3: Introduction to SQL

Computer Science E-66 Database Systems

Oracle Database 10g: SQL Fundamentals I

NGTC Course Catalog / Student Handbook PROGRAMS OF STUDY COMPUTER INFORMATION SYSTEMS COMPUTER INFORMATION SYSTEMS

Entity Relationship Graphs (14 pts)

normalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model

Relational Algebra. Procedural language Six basic operators

Referential integrity

CSCB20 Week 4. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2017

Important Notes: For this course you must check the Regis Bookstore: for the most current online course material information.

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

SQL: Structured Query Language Views. Database Views. Views in SQL. .. Cal Poly CPE/CSC 365: Introduction to Database Systems Alexander Dekhtyar..

SYLLABUS. Departmental Syllabus. Structured Query Language (SQL)

Chapter 7 Advanced SQL. Objectives

COSC344 Database Theory and Applications. Lecture 5 SQL - Data Definition Language. COSC344 Lecture 5 1

X. Query Optimization

Course Outline and Objectives: Database Programming with SQL

Oracle Database 11g: SQL Fundamentals I

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

Chapter 1 SQL and Data

LBSC 690: Information Technology Lecture 05 Structured data and databases

Oracle Database 10g: SQL Fundamentals I

ITT Technical Institute. PT2520T Database Concepts Onsite Course SYLLABUS

Handout 2. A very brief intro to relational databases (with more coming later). Conceptual Data Modeling Entity-Relationship Diagrams.

Note that your facilitator may provide additional required readings.

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

Database Management Systems

Doing database design with MySQL

Table of Contents. Oracle SQL PL/SQL Training Courses

In This Lecture. SQL Data Definition SQL SQL. Non-Procedural Programming. Notes. Database Systems Lecture 5 Natasha Alechina

Course Outline Faculty of Computing and Information Technology

SQL language. Jaroslav Porubän, Miroslav Biňas, Milan Nosáľ (c)

MySQL for Developers Ed 3

CS40 Exam #2 November 13, 2002

Continuing Education Flex Tutorial

Database Foundations. 4-1 Oracle SQL Developer Data Modeler. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

QQ Group

BIRKBECK (University of London)

Oracle Database: Introduction to SQL/PLSQL Accelerated

MTH020 Basic Math 4 ART115 Basic Design B&W* 4 ART207 Graphic Design Literacy* 4 ART118 Digital Design and Color 4

APPROVE STUDENT REGISTRATION CHANGES AND MONITOR FORMS D

INFO 1103 Homework Project 2

Review. Objec,ves. Example Students Table. Database Overview 3/8/17. PostgreSQL DB Elas,csearch. Databases

F453. COMPUTING Advanced Computing Theory ADVANCED GCE. Thursday 23 June 2011 Morning

E-R Diagram Example. E-R Diagram for Everfail. Translating E-R Diagrams into Relations. The Complete Relations for EverFail. Car. Customer.

Center for Financial Training & Miami Dade College

Computer Science E-66 Introduction Database Design and ER Models The Relational Model

Schema And Draw The Dependency Diagram

Oracle Syllabus Course code-r10605 SQL

Midterm Exam #2 (Version A) CS 122A Winter 2017

CS211 Lecture: Database Design

ensync: Your Certified Oracle Partner

DATA, DATABASES, AND QUERIES

Transcription:

CS 275 Final Project (50pts Total) Solve the following problems and save your queries and scripts in APEX and in a Word file. Name your saved file in APEX CS275FinalProj. Save your word file as follows: yourlastnamecs275finalproj and drop your file into the shared Google Drive folder. 1. Write a script to produce the following tables (3 points each): (remember to carefully choose your data types!) a. STUDENT b. FACULTY c. CRSSECTION

d. REGISTRATION e. DEPARTMENT 2. Reverse engineer an Entity Relationship Diagram from the tables above. (5pts) Note: Keep in mind the way foreign keys are decided from an ERD for a table implementation! Note: You may choose any non-transferrable, barred, or exclusive relationships you want as long as they include a brief

description as to why it is needed or wanted. 3. Write the query to produce a list of all the students that includes their first name, last name, and phone number list in alphabetical order by last name. (2pts) 4. Write a query that shows the average capacity for all courses and the actual average enrollment for all courses during winter and spring term. (2pts) 5. The CRSSECTION table contains a data entry error for CSID 1210, COURSEID CIS253 UPDATE the MAXCOUNT to 30 and the ACTUALCOUNT to 22 for the course. (2pts) 6. Write a query that lists all the students by first name, last name and their faculty advisor s name label the column Advisor and the advisor phone number label the column Ext. List the output by the Advisor s name in alphabetical order. Use an ANSI standard join. (3pts) 7. For the following queries you choose the order in which to execute the following instructions: a) Implement the foreign key constraint in the FACULTY table that references the Department table - ensure you name the constraint (3pts) b) Create a COURSE table with the following attributes: CourseID, Title, and Credits. The precision of CourseID should be six (6). The Title should be allowed to have a length of 20. The Credits should be allowed to have a length of 2. The CourrseID is the primary key and should be implemented at table level ensure you name the constraint. (5pts) c) Insert the following data into the department table using an explicit insert for the first 3 rows and an implicit insert for last 3 rows. (4pts) CourseID Title Credits EN100 Basic English 0 LA123 English Literature 3 CIS253 Database Systems 3 CIS265 Systems Analysis 3 MA150 College Algebra 3 AC101 Accounting 3 8. List the Faculty Department Chair for each Department, the department name and the department chair extension - include those departments that do not have a department head assigned. Use the Oracle proprietary join syntax. (3pts) 9. Create a view that displays all of the students by first name, last name, state, and major id. List by state and ensure the user can not make any changes to the student base table. (2pts) 10. Create a view that lists the CSID, COURSEID, SECTION, and TERMID for the CIS253 course. Ensure that your view will allow only DML transactions for CIS253. (4pts)

You should be able to (with minimal effort), be able to use the following script to iinsert data into your tables once they have been created: INSERT INTO course VALUES ('EN100', 'Basic English', 0); INSERT INTO course VALUES ('LA123', 'English Literature', 3); INSERT INTO course VALUES ('CIS253', 'Database Systems', 3); INSERT INTO course VALUES ('CIS265', 'Systems Analysis', 3); INSERT INTO course VALUES ('MA150', 'College Algebra', 3); INSERT INTO course VALUES ('AC101', 'Accounting', 3); INSERT INTO faculty VALUES (111, 'Jones', 11, 525, 1); INSERT INTO faculty VALUES (222, 'Williams', 20, 533, 2); INSERT INTO faculty VALUES (123, 'Mobley', 11, 529, 1); INSERT INTO faculty VALUES (235, 'Vajpayee', 12, 577, 2); INSERT INTO faculty VALUES (345, 'Sen', 12, 579, 3); INSERT INTO faculty VALUES (444, 'Rivera', 21, 544, 4); INSERT INTO faculty VALUES (555, 'Chang', 17, 587, 5); INSERT INTO faculty VALUES (333, 'Collins', 17, 599, 3); INSERT INTO student VALUES ('00100', 'Diaz', ' Jose', '1 Ford Avenue #7', 'Hill', 'NJ', '08863', 'WN00', TO_DATE ('02/12/1980', 'mm/dd/yyyy'), 123, 100, '9735551111'); INSERT INTO student VALUES ('00101', 'Tyler', ' Mickey', '12 Morris Avenue', 'Bronx', 'NY', '10468', 'SP00', TO_DATE ('03/18/1975', 'mm/dd/yyyy'), 555, 500, '7185552222'); INSERT INTO student VALUES ('00102', 'Patel', ' Rajesh', '25 River Road #3', 'Edison', 'NJ', '08837', 'WN00', TO_DATE ('12/12/1982', 'mm/dd/yyyy'), 111, 400, '7325553333'); INSERT INTO student VALUES ('00103', 'Rickles', ' Deborah', '100 Main Street', 'Iselin', 'NJ', '08838', 'FL00', TO_DATE ('10/20/1970', 'mm/dd/yyyy'), 555, 500, '7325554444'); INSERT INTO student VALUES ('00104', 'Lee', ' Brian', '2845 First Lane', 'Hope', 'NY', '11373', 'WN00', TO_DATE ('11/28/1975', 'mm/dd/yyyy'), 345, 600, '2125555555'); INSERT INTO student VALUES ('00105', 'Khan', ' Amir', '213 Broadway', 'Clifton', 'NJ', '07222', 'WN00', TO_DATE ('07/07/1981', 'mm/dd/yyyy'), 222, 200, '2015556666'); INSERT INTO crssection VALUES (1101, 'CIS265', '01', 'WN01', 111, 'MW', '09:00', '10:30', 13, 30, 21); INSERT INTO crssection VALUES (1102, 'CIS253', '01', 'WN01', 123, 'TR', '09:00', '10:30', 18, 40, 39); INSERT INTO crssection VALUES (1103, 'MA150', '02', 'WN01', 444, 'F', '09:00', '12:00', 15, 25, 25); INSERT INTO crssection VALUES (1104, 'AC101', '10', 'WN01', 345, 'MW', '10:30', '12:00', 16, 35, 35); INSERT INTO crssection VALUES (1205, 'CIS265', '01', 'SP01', NULL, 'MW', '09:00', '10:30', 14, 35, 12); INSERT INTO crssection VALUES (1206, 'CIS265', '02', 'SP01', 111, 'TR', '09:00', '10:30', 18, 30, 27); INSERT INTO crssection VALUES (1207, 'LA123', '05', 'SP01', NULL, 'MW', '09:00', '10:30', 15, 30, 29); INSERT INTO crssection VALUES (1208, 'CIS253', '21', 'SP01', 123, 'TR', '09:00', '10:30', 14, 40, 40); INSERT INTO crssection VALUES (1209, 'CIS253', '11', 'SP01', 111, 'MW', '09:00', '10:30', 18, 40, 5); INSERT INTO crssection VALUES (1210, 'CIS253', '31', 'SP01', 123, 'F', 'TBA', 'TBA', 11, 1, 1);

INSERT INTO registration VALUES ('00100', 1101, 'C', 'F'); INSERT INTO registration VALUES ('00100', 1102, 'B', 'B'); INSERT INTO registration VALUES ('00100', 1104, 'B', 'A'); INSERT INTO registration VALUES ('00101', 1102, 'F', 'D'); INSERT INTO registration VALUES ('00101', 1103, 'A', 'A'); INSERT INTO registration VALUES ('00103', 1101, 'F', 'W'); INSERT INTO registration VALUES ('00103', 1104, 'D', 'D'); INSERT INTO registration VALUES ('00100', 1207, '', ''); INSERT INTO registration VALUES ('00103', 1206, '', ''); INSERT INTO registration VALUES ('00104', 1206, '', ''); INSERT INTO registration VALUES ('00104', 1207, '', ''); INSERT INTO registration VALUES ('00104', 1210, '', ''); INSERT INTO registration VALUES ('00105', 1208, '', ''); INSERT INTO registration VALUES ('00105', 1209, '', ''); INSERT INTO registration VALUES ('00101', 1205, '', ''); INSERT INTO registration VALUES ('00102', 1210, '', ''); INSERT INTO registration VALUES ('00102', 1207, '', ''); INSERT INTO registration VALUES ('00102', 1206, '', '');