Concept explainers
Are based on the class scheduling 3NF relations along with some sample data shown in Figure 6-11. Not shown in this figure are data for an ASSIGNMENT relation, which represents a many-to-many relationship between faculty and sections.
Note that values of the SectionNo column do not repeat across semesters.
Figure 6-11 Class scheduling relations (missing ASSIGNMENT)
Write SQL commands for the following.
a. Create two different forms of the INSERT command to add a student with a student ID of 65798 and last name Lopez to the Student table.
b. Now write a command that will remove Lopez from the Student table.
c. Create an SQL command that will modify the name of course ISM 4212 from
Want to see the full answer?
Check out a sample textbook solutionChapter 6 Solutions
Modern Database Management (12th Edition)
- Toys Galore currently has a credit limit of 7,500. Because Toys Galore has an excellent credit rating, TAL Distributors is increasing the companys credit limit to 10,000. If yourun the SQL query in Exercise 1 after the credit limit has been increased, would ToysGalore still be included in the view? Why or why not?arrow_forwardThe CUSTOMER table contains a foreign key, REP_NUM, that must match the primary key of the REP table. What type of update(s) to the CUSTOMER table would violate the foreign key constraint?arrow_forwardCreate a relational schema model and relations in SQL with all required constraints. Also attach screenshot of each query executed in Oracle (add your roll no. with each table name to avoid plagiarism).arrow_forward
- Consider the following relational schema:Course (cid, cname, dept, credit)Student (sid, sname, dept, gpa)Enroll (cid, sid, grade, semester) The meaning of these relations is straightforward and the keys are underlined. Write thefollowing queries in SQL. d) Find the name s of students who took courses offered by CS department and noother department. e) Find the names of all classes that have 10 or more students enrolled.arrow_forward(( I Need Assignment 2 and 3 only )) Customer Order Assignment #1 Create tables based on the below given relational model. Define your own data type to the attributes and apply your own constraints to the attributes Identify the primary, foreign keys apply it to the attributes. Populate the data in all the tables using SQL commands/queries. Customer Order tables: Customer (customerNO, customerName, address, city, category, custBalance) Product (productNO, productTitle, price, QStock ) customerOrder ( orderNO, orderDate, customerNO) orderedProduct (orderNO, productNO, orderQuantity) ------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------- Assignment #2 Function: Create a function which accepts customer no and display the total number of orders placed. Sample output is: The Total customer orders are 4 Procedure Write a Procedure that accepts…arrow_forwardConsider the following relational schema:Course (cid, cname, dept, credit)Student (sid, sname, dept, gpa)Enroll (cid, sid, grade, semester) The meaning of these relations is straightforward and the keys are underlined. Write thefollowing queries in SQL. a) List all the students who never got a grade above ‘C’.b) Find the number of students not enrolled in any class.c) Find name of students in EE department who took all the courses offered by CSdepartment.arrow_forward
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage Learning
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage Learning