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)
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
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.
Question 1.Write a SQL statement for each of the following questions based on the above tables...
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: ( 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 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 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 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...
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 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 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 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 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:...