Create a view named v_worker showing the student number

Assignment Help Database Management System
Reference no: EM131704436

Assignment

Download the sample database ITCO630_A from the link below. The sample database represents an educational institution with students and different schools. Each student goes to just one school. The students have various roles in different assignments and may work on more than one assignment at a time.

The following are the tables and data in the ITCO630_A database:

school_no

school_name

city

S1

West University

San Francisco

S2

Central University

Chicago

S3

East University

San Francisco.

 

 

 

Student Table

Student_no

student_fname

student_Iname

school_no

25348

John

Doe

S3

10102

Jane

Smith

S3

18316

Robert

Habner

S1

29346

James

Elkehart

S3

90316

Elise

Herbert

S2

25813

Lisa

Branson

S2

28559

Sarah

Masters

S1

Assignment Table

assignment_no

assignment_name

points

Al

Group Project

120

A2

Mid-term Exam

100

A3

Final Exam

200

Summary Table

student_no

assignment_no

role

start_date

10102

Al

Observer

10/1/2005

10102

A3

Leader

1/1/2006

25348

A2

Worker

2/15/2005

18316

A2

NULL

6/1/2005

29346

A2

NULL

11/15/2004

25813

A3

Observer

10/15/200.5

90316

Al

Leader

4/15/2005

28559

Al

NULL

8/112005

28559

A2

Worker

2/1/2006

90316

M

Worker

11/15/2004

29346

Al

Worker

1/4/2005

Using the sample database, write the scripts in a file called ITCO630_P3.SQL to create the following views. Remember to include a USES clause at the top of the script file to use the ITCO630_A database. Also include code that checks if the view already exists. If it does, it should be dropped and recreated.

1. Create a view named v_worker showing the student number, assignment number, and start date where the role is "worker."

2. Create a view called v_no_points with all the columns of the assignment table except the points column.

3. Create a view called v_count that shows the number of students working on each assignment. The view should have columns for the assignment number and the count.

Attachment:- Sample-Database.zip

Reference no: EM131704436

Questions Cloud

Discuss case of a not-for-profit hospital : The chief administrative officer of a not-for-profit hospital, Vera Thomas, is attempting to find resources to add a new wing to the hospital.
Absolute advantage in the production : Suppose the United States has an absolute advantage in the production of 2 goods compared to another country.
Discuss the key characteristics of public goods : What is it about pure public goods that means that the market will not adequately provide those goods?
Determining the new employees qualifications : How will you use the task-oriented job analysis or the competencies that are required for this position? Provide a rationale to support your response.
Create a view named v_worker showing the student number : Create a view named v_worker showing the student number, assignment number, and start date where the role is worker.
Discuss how do i influence someone with power : How does one acquire power, and what is the best kind of power to have. How do I influence someone with power
How is bernanke-gertler analysis pro-cyclical : How does the Financial Accelerator influence both aggregate demand and supply? How is Bernanke & Gertler's analysis pro-cyclical?
How would you handle the given dilemma : Dr. Rebecca Friend, the chief administrative officer of a hospital, is having an argument with the hospital's comptroller.
What is the trouble with macro according to paul romer : What is the trouble with Macro according to Paul Romer? Be thorough and explain troublesome models and key terms such as: identification, and phlogiston.

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd