Question

The following tables contain the data for courses, enrollment, and students. COURSE ENROLLMENT ourse Number Title AC202 FL101 tudent ID 77349993 77349993 77349993 77349993 77349993 77349993 77349993 00005555 Instructor Credits ourse No rade uffsaton C202 S303 105 MA I 30 M204 H150 Y123 IS326 IS326 IS326 IS326 IS326 IS326 IS326 IS326 IS326 IS326 IS326 M204 ccountin sic atabase IS326 FL105 FL503 rank omposition Mauffler A102 Basic Math tatistics ournalism Hernandon asic circuit Shockl nnis esisitorT ounter M204 34556677 110000 119800 348282 110001 55119800 339837 33448887 2551288 22551288 izzer PY123 sc STUDENT Student ID First Name Last Name Major Status Gender Date of Birth Café Balance 0348282 Tirilee 234556677 777349993 John 800005555 Patrick S23 $0 12/01/1974 03/03/1976 02/03/1974 07/08/1974 er oons usiness usiness usiness nd. irkland 01/05/197 9800 9110000 6110001 555119800 08/28/1947 06/19/1978 1 09/06/1978 04/05/1955 112/25/1974 08/07/1974 05/05/1948 $323 ac $434 re ohnson usiness 339837 acob hwartz 33448887 222551288 Nanc rt

Question 1.Write a SQL statement for each of the following questions based on the above tables (50 Points).

1) Create “Enrollment” table.

2) Change the credits of “Database” course from 2 to 3.

3) List the course titles (not Course_No) and grades John Doe had taken.

4) Calculate average of Café Balance, and name new field as Average Balance.

5) Create a roster for “Database” course (list student ID, last name, first name, major, and status for each student enrolled the course).

6) Find number of students for each major, and name new field as No of Student.

7) Insert a new student data. You choose the data.

8) Delete the student date you inserted in Question g).

9) List student ID, first name, last name, major, course no, course title, who got the grade A.

10) List student ID, first name, and last name whose café balance is $54, $434, OR $23. Use IN operator.

Submission:

 Your answer document MUST show SQL statement for each question (No query results required).

 Put the SQL statements in Microsoft Word or PDF file and submit the Word or PDF file o Put question #, too.

Note:

 For joining tables, use “old-style” join or “Join … On” syntax (covered in 7-4c) ONLY. Other join commands will NOT be accepted. You may read page 323 if you don’t know what is “oldstyle” join.

 You don’t have to use database software to answer. But if you want, you can use any database software (MySQL, Oracle, SQL Server, etc.), by creating tables and inserting data. SQL script will not be provided.

Question 2. The Part_Supplier table contains sample data for parts and for vendors who supply those parts. Answer the questions below (50 points)

Part No Description Vendor Code VendorName Cit P100 P200 P300 P400 P500 Unit Cost USB Drive V5555 Logic Chi Keyboand Memory Chip V6500 Mouse Morehead Co. Morehead 20.00 Lexington Chip Lexington 30.00 Chicago Inc Morehead Co. Morehead 60.00 Atlanta Co V5560 V6000 Chicago 00.00 V7000 Atlanta 50.00

1) In what normal form is this table?

2) Draw its dependency diagram and identify all dependencies.  Yours should look like the diagram in Figure 6.3. But you don’t have to include relational schema, that is, 1NF (PROJ_NUM, EMP_NUM, PROJ_NAME…….).

3) Normalize the table so that there are no more partial and/or transitive dependencies, and draw the new dependency diagrams for the normal form.  Yours should look like the diagram in Figure 6.5.

Note:

 In drawing the diagrams, use the textbook notation

 In drawing the diagram, you can use any (diagraming) software, such as Draw.io, Microsoft Visio, LucidChart, or even Microsoft Word.

 Copy and paste the diagram to Microsoft Word or convert them PDF and Submit the Word file or PDF file o Include diagram ONLY, not entire software screen o Your submission should be readable

 Put your name on your document

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Question 1.Write a SQL statement for each of the following questions based on the above tables...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Consider the following database and answer the questions below. a) Write the SQL statement the displays...

    Consider the following database and answer the questions below. a) Write the SQL statement the displays the names of the students who have enrolled in the Database Systems course b) Write the SQL statement that displays a list of the students whose names start with 'S' c) Write the SQL statement that displays the Student ID, Student Name, Course ID, and Grade for students that passed at least one course with a grade better than B+ (i.e. A-, A, and...

  • Subject : computer science -web development Qus: using the database tables below write the SQL queries:...

    Subject : computer science -web development Qus: using the database tables below write the SQL queries: ( SELECT; FORM; WHERE; ORDER BY; DISTINCT; GROUP BY; COUNT(); SUM(); AVG(); MAX(); MIN(); JOIN; ON) Student (StudentId, Major, GPA) Transcript( Studentid, CourseNo, Gread); Course( CourseNo, Title, Credits) Display the title of the course(s) that are 3 credits? Display the average GPA of the students Majoring in ‘CSC’ List non duplicated major(s) of students who have received a grades of ‘A’ in CSC350 List...

  • Use MS Access software to build tables, as well as write, and execute queries. Submit the...

    Use MS Access software to build tables, as well as write, and execute queries. Submit the database and screenshots of all tables and queries. Step by step snapshots included. Don't want queries. Just process of creating this data step by step in Access. Create your own data. Ensure the data will test all criteria and prove all sorts worked as required. Be sure that all tables and queries have descriptive names. “Query 1” and “Step 1” are examples of poor...

  • SQL Homework Create a single script to do all of the following. Be sure to create...

    SQL Homework Create a single script to do all of the following. Be sure to create in such a way that it can be re-run multiple times. Create a database named homework. In this database, create three tables: Student, Course, StudentCourse - Create the Student table with the following fields in this order: studentID as an integer; do not allow empty values firstName as a variable number of characters, max 30, with a null default value lastName as a variable...

  • Please write ONE SQL statement for each of the following tasks using the below tables. Note...

    Please write ONE SQL statement for each of the following tasks using the below tables. Note that you can only use conditions specified in the task description and cannot manually look up data and add conditions. Task 1: return title of textbooks with price over $100. Task 2: return number of courses sections scheduled for each year and semester. Please return year, semester, and number of courses. Task 3: Return names of all courses in Information Systems undergraduate program. Task...

  • Consider the following relations for a database that keeps track of student enrollment in courses and the books adopted for each course.

    Question: Consider the following relations for a database that keeps track of student enrollment in courses and the books adopted for each course. 1- Draw an ER diagram of ONLINE COURSE REGISRATION database, that captures all the given below requirements. Specify key attribute(s) of each entity set. For each relationship set, specify structural constraints and participation constraints. a. For each USER, the portal maintains user ID, Name, E-mail. Each user has a unique ID. Name is a Composite attributes with Frame, Midname,...

  • Use the SQL statements provided to create your tables. Write one SQL statement for each of...

    Use the SQL statements provided to create your tables. Write one SQL statement for each of the following problems. You can only use the conditions listed in the tasks. E.g., in task 1, you cannot manually look up pid of Information Systems undergraduate program. Here is the given code: drop table textbook_schedule cascade constraints; drop table textbook_author cascade constraints; drop table schedule cascade constraints; drop table course cascade constraints; drop table textbook cascade constraints; drop table author cascade constraints; drop...

  • Write the following SQL statements in Microsoft Access by using the Books database from Week 2...

    Write the following SQL statements in Microsoft Access by using the Books database from Week 2 Assignment 2. Once complete, copy and paste the SQL statements in a Microsoft Word document: Write SQL statements: To update the publisher name from READ WITH US to READ FOR US To verify the updated name field for the publisher with ID 6 To make the following updates to the Publisher table (be careful with WHERE): Make Contact="John Travolta" for publisher with ID number...

  • Q1. Based on the two tables and the attributes below, write SQL commands for each question...

    Q1. Based on the two tables and the attributes below, write SQL commands for each question to retrieve the data from the database. tbiSales tbiCustomer Customeriumber InvoiceDate Customeriumbere SalesorderNumber CustomerCity CustomerDipCode CustomerTelephone CustomerCreditLima Write the SQL for the following quiries a. List customers who live in New York State. b. List customers with credit limits greater than $50,000. Q2. Draw the relationship with indication of multiplicity between sales class and cash receipt class satisfying the following rules (draw two boxes...

  • Chapter 6 Homework Answer the questions below Note In drawing the diagrams, use the textbook nota...

    Chapter 6 Homework Answer the questions below Note In drawing the diagrams, use the textbook notation . In drawing the diagram, you can use any (diagraming) software, such as Draw.io, Microsoft Visio, LucidChart, or even Microsoft Word. Copy and paste the diagram to Microsoft Word or convert them PDF and Submit the Word file or PDF file o o Include diagram ONLY, not entire software screen Your submission should be readable . Put your name on your document Due date:...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT