EBK CONCEPTS OF DATABASE MANAGEMENT
8th Edition
ISBN: 8220100706004
Author: Last
Publisher: Cengage Learning US
expand_more
expand_more
format_list_bulleted
Question
Chapter 4, Problem 2RQ
(a)
To determine
To write view definition for TopLevelClient using SQL
(b)
To determine
To retrieve the number and name of all clients and difference between their credit Limit and balance in the view using SQL.
(c)
To determine
To convert the query into that query the DBMS will actually execute.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Using data from the BITS database, define a view named TopLevelClient. It consists of the number, name,address, balance, and credit limit of all clients with credit limits that are greater than or equal to $10,000.a. Using SQL, write the view definition for TopLevelClient.b. Write an SQL query to retrieve the number and name of all clients as well as the difference between theircredit limit and balance in the TopLevelClient view.c. Convert the query you wrote in Question 2b to the query that the DBMS will actually execute.
Using data from the Premiere Products database, define a view named TopLevelCust. Itconsists of the number, name, address, balance, and credit limit of all customers withcredit limits that are greater than or equal to$10,000.a.Using SQL, write the view definition for TopLevelCust.b.Write an SQL query to retrieve the number and name of all customers in theTopLevelCust view with balancesthatexceed their credit limits.c.Convert the query you wrote in Question 2b to the query that the DBMS willactually execute.
write the full sql code(create table, insert...)
Chapter 4 Solutions
EBK CONCEPTS OF DATABASE MANAGEMENT
Ch. 4 - Prob. 1RQCh. 4 - Prob. 2RQCh. 4 - Prob. 3RQCh. 4 - Prob. 4RQCh. 4 - Prob. 5RQCh. 4 - Prob. 6RQCh. 4 - Prob. 7RQCh. 4 - Prob. 8RQCh. 4 - Prob. 9RQCh. 4 - Prob. 10RQ
Ch. 4 - Prob. 11RQCh. 4 - Prob. 12RQCh. 4 - Prob. 13RQCh. 4 - Prob. 14RQCh. 4 - Prob. 15RQCh. 4 - Prob. 16RQCh. 4 - Prob. 17RQCh. 4 - Prob. 18RQCh. 4 - Prob. 1TDECh. 4 - Prob. 2TDECh. 4 - Prob. 3TDECh. 4 - Prob. 4TDECh. 4 - Prob. 5TDECh. 4 - Prob. 6TDECh. 4 - Prob. 7TDECh. 4 - Prob. 8TDECh. 4 - Prob. 9TDECh. 4 - Prob. 10TDECh. 4 - Prob. 11TDECh. 4 - Prob. 12TDECh. 4 - Prob. 13TDECh. 4 - Prob. 1CATCCh. 4 - Prob. 2CATCCh. 4 - Prob. 3CATCCh. 4 - Prob. 4CATCCh. 4 - Prob. 5CATCCh. 4 - Prob. 6CATCCh. 4 - Prob. 7CATCCh. 4 - Prob. 8CATCCh. 4 - Prob. 9CATCCh. 4 - Prob. 10CATCCh. 4 - Prob. 11CATCCh. 4 - Prob. 12CATCCh. 4 - Prob. 13CATCCh. 4 - Prob. 14CATCCh. 4 - Prob. 1SCGCCh. 4 - Prob. 2SCGCCh. 4 - Prob. 3SCGCCh. 4 - Prob. 4SCGCCh. 4 - Prob. 5SCGCCh. 4 - Prob. 6SCGCCh. 4 - Prob. 7SCGCCh. 4 - Prob. 8SCGCCh. 4 - Prob. 9SCGCCh. 4 - Prob. 10SCGCCh. 4 - Prob. 11SCGCCh. 4 - Prob. 12SCGC
Knowledge Booster
Similar questions
- Write the SQL code to delete the row for William Smithfield, who was hired on June 22, 2004, and whose job code is 500. (Hint: Use logical operators to include all of the information given in this problem.)arrow_forwardProblem 1 and 2 are based on the following query: SELECT EMP_LNAME, EMP_FNAME, EMP_AREACODE, EMP_SEX FROM EMPLOYEE WHERE EMP_SEX = 'F' AND EMP_AREACODE = '615' ORDER BY EMP_LNAME, EMP_FNAME; What indexes should you create? Write the required SQL commands.arrow_forwardWrite the SQL code that will restore the data to its original status: that is, the table should contain the data that existed before you made the changes in Problems 5 and 6.arrow_forward
- Write the SQL code that will change the PROJ_NUM to 14 for employees who were hired before January 1, 1994, and whose job code is at least 501. (You may assume that the table will be restored to its condition preceding this question.)arrow_forwardQuestion 10 Distinguish between SQL views and SQL entitiesarrow_forwarduse the information above to: With the aid of Microsoft SSMS (SQL Server Management Studio), create both database schema and insert 10 records into each relation for each database. Specify primary keys Specify foreign keys All sample SQL statements must be submitted.arrow_forward
- You are given the schema of a table with its columns inside the bracket as follows: STUDENT(Name, Student_id, Major, Marks, Email) (The Primary Key is underlined) Write an SQL query for the following tasks: (Hint: the queries are nested) 1. Write an SQL query to retrieve the name, student id and the maximum marks of students of each major where that maximum marks is greater than all students with CS major. 2. Write an SQL query to retrieve the name, student id and the maximum marks of students with ECE major where that maximum marks is greater than all students with CS major.arrow_forward3. Modify p2ql.sql to display the name and salary for all employees whose salary is not in the range of $1500 and $2850. Resave your SQL statement to a file named p2q3.sql. Rerun your query. ENAME SAL SMITH 800 WARD 1250 JONES 2975 MARTIN 1250 SCOTT 3000 KING 5000 ADAMS 1100 JAMES 950 FORD 3000 MILLER 1300 10 rows selected. 4. Display the employee name, job and start date of employees hired between February 20. 1981, and May 1. 1981. Order the query in ascending order by start date. ENAME JOB HIREDATE ALLEN SALESMAN 20/02/1981 WARD SALESMAN 22/02/1981 JONES MANAGER 02/04/1981 BLAKE MANAGER 01/05/1981arrow_forwardbased in the threee tables and the attributes below , write the sql commands for each question to retrive the data form the database .arrow_forward
- Write SQL statements to (1) create the BREED table, (2) insert the data in Figure 3-21 into the BREED table, (3) alter the PET_3 table so that PetBreed is a foreign key referencing BreedName in BREED, and (4) with the BREED table added to the pet database, write an SQL statement to display the last name, first name, and email of any owner of a pet that has an AverageLifeExpectancy value greater than15. Use a subqueryarrow_forwardWhat is the minimum number of database requests you need to write for an inventory update for both PRODUCT and PART? Using proper SQL syntax for an Oracle database, write each request below.arrow_forwardCan you answer this two question as MYSQL statement using database that I uploaded Thank you Answer the following questions based on the above database: Create a view named “Atlanta_Charter_Crew_V” that includes the following “For each charter of aircraft to Atlanta (ATL), print the charter date, charter distance, and the corresponding crew (employee) number, last name, first name, and crew job”. Your answer should include both the SQL statement for view creation along with the contents of the view (you get the contents of the view by running the command select * from Atlanta_Charter_Crew_V;). Modify the MODEL table to add the following attribute and insert the values shown in the following table. (Note: use ALTER TABLE and UPDATE commands.) Attribute name Attribute Description Attribute type Attribute Values MOD_TOTAL_ WEIGHT Weight of each model Numeric 12,500 for C-90A 7,300 for PA23-250 19,770 for PA31-350arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- 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
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning