Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

Assignment: Advanced Relational Database

PROJECT- Advance SQL

Overview:

Using the knowledge garnered thus far, please solve all of the below problems. Please run the attached SQL script file at the SQL*PLUS prompt. This script will create all the tables and other objects needed to solve the questions in Part I, and populate the tables with sample data.

Deliverables:

Combine all your queries into a single SQL script file called XXX_PROJ1.SQL where XXX are your initials, making sure that the script run without errors before submitting it through WebTycho by the due date. Also, provide the results of running your script with the SQL*Plus spool command. Please adhere to the naming convention for naming your file. Include comments or remarks at the start of each question to show the problem #.

Using the attached Student Database Schema, create a view call BUSY_STUDENT that stores the concatenated name (first name and last name), student id and count of classes enrolled in, for all students enrolled in more than 2 classes. Name the columns, FULL_NAME, STUDENT_ID and ENROLL_NUM respectively. (20 points)

Create a table called TEMP_STUDENT with the following columns and constraints: a column STUD_ID for the student ID and is the primary key, a column FIRST_NAME for student first name, a column LAST_NAME for student last name, a column ZIP that is a foreign key to the ZIP column in the ZIPCODE table of the Student Database Schema, and a column REGISTRATION_DATE that is NOT NULL and has a CHECK constraint to restrict the registration date to dates after August 26, 2005. ALL CONSTRAINTS MUST BE NAMED. Both the first_name and last_name columns are required.

B) For the TEMP_STUDENT table created above, write insert statements that violate each of the constraints. Write 3 insert statements that succeed when executed.

Show all the different companies for which students work. Display only companies where more than four students are employed. (10 points)

Determine the highest grade achieved for the midterm for each section.

Display all the sections where classes start at 10:30 A.M.

Write the query to accomplish the following result. The output shows you all the days of the week where sections 83, 86, 107 starts. Note the order of the days.

DAY SECTION_ID
------- ------------------
Mon 107
Tue 86
Wed 83

Select the distinct course costs of all the courses. If the course cost is unknown, substitute a zero. Format the output with a leading $ sign and separate the thousands with a comma. Display two digits after the decimal point. The cost should be in ascending order. The output should look like the following:

COST
-------------
$0.00
$1,000.00

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M92076426
  • Price:- $35

Priced at Now at $35, Verified Solution

Have any Question?


Related Questions in DBMS

Question 1 a- consider that you are asked to design an

Question: 1. (a)- Consider that you are asked to design an entity relationship diagram based on the below scenario: A university consists of a number of departments (id, d_name) and each department offers some courses. A ...

Query 1 the bookstore has decided to keep track of the

Query 1: The bookstore has decided to keep track of the vendors' information. In order to do this, one new table will be added to the database. The schema for this table, as related to the existing tables, is the followi ...

You are in a real estate business renting apartments to

You are in a real estate business renting apartments to customers. Your job is to define an appropriate schema using SQL DDL in MySQL. The relations are Property(Id, Address, NumberOfUnits), Unit(ApartmentNumber, Propert ...

Question lab 1 creating a database designthis assignment

Question: Lab 1: Creating a Database Design This assignment contains two (2) Sections: Database Design Diagram and Design Summary. You must submit both sections as separate files in order to complete this assignment. Not ...

Answer the following question explain the difference

Answer the following Question : Explain the difference between a database management system (DBMS) and a database. Are Microsoft Access, SQL Server, and Oracle examples of databases or database management systems (DBMS)?

Question create an erd for the following scenarioa small

Question: Create an ERD for the following scenario. A small company ABC wants a database to keep track of internal company information. Â Given the following information create an ERD. The ABC Company has several departm ...

Databases assignment - monash library services monlib case

Databases Assignment - Monash Library Services (MonLib) Case Study TASK 1: Data Definition For this task you are required to complete the following: 1.1 - Add to your solutions script, the CREATE TABLE and CONSTRAINT def ...

Objectivethe objective of this lab is to be familiar with a

OBJECTIVE: The objective of this lab is to be familiar with a process in big data modeling. You're required to produce three big data models using the MS PowerPoint software. This tool is available on UMUC Virtual Deskto ...

Relational database exerciseyou have been assigned to a new

Relational Database Exercise: You have been assigned to a new development team. A client is requesting a relational database system to manage their present store with the anticipation of adding more stores in the future. ...

This assignment is a continuation of this solution the case

This assignment is a continuation of this solution The case study company has received the first report from its enterprise content management (ECM) consultant and now has a documented list of major content requirements ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As