A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 7, Problem 8TD
Write the commands to obtain the following information from the system catalog. Do not execute these commands unless your instructor asks you to do so.
- a. List every table that you own.
- b. List every column in the ITEM table and its associated data type.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Task 1:The StayWell Property Management team wants a list of all property addresses combined with the name of the owners. You will need to return three columns: the first name as FIRST_NAME, the last name as LAST_NAME, and the property address as ADDRESS of the owners.
Task 4:The StayWell maintenance team wants to minimize the number of planned visits to properties. The team wants to learn all the properties that have different planned service dates. You need to return all available data in the SERVICE_REQUEST table, where requests are made for the same property with a different NEXT_SERVICE_DATE.
Task 5:The marketing team wants to celebrate the success of StayWell with a party. The team wants a table with the names of all residents and owners combined into single column named PARTICIPANT. You need to combine this information from the tables and send it back to the team.
You do not need to create a new table in the database schema.
Task 6:The StayWell marketing team wants to send mail…
Write, but do not execute, the commands for Task 10 through Task 12.
Task 10: List all the tables contained within the system catalog.
The following tables provide a very small portion of the data that will be kept in the database. The data needs to be inserted into the database for testing purposes. Write the INSERT commands necessary to place the following data in the tables that were created in item #1. Make sure there are no errors when the script is executed. If it does, you will automatically get a zero for this item.
Chapter 7 Solutions
A Guide to SQL
Ch. 7 - What is a view?Ch. 7 - Which command creates a view?Ch. 7 - Prob. 3RQCh. 7 - What happens when a user retrieves data from a...Ch. 7 - What are three advantages of using views?Ch. 7 - Which command deletes a view?Ch. 7 - Prob. 8RQCh. 7 - Which command terminates previously granted...Ch. 7 - Prob. 10RQCh. 7 - How do you create an index? How do you create a...
Ch. 7 - Prob. 12RQCh. 7 - Does the DBMS or the user make the choice of which...Ch. 7 - Describe the information the DBMS maintains in the...Ch. 7 - The CUSTOMER table contains a foreign key,...Ch. 7 - Prob. 16RQCh. 7 - Prob. 17RQCh. 7 - Prob. 18RQCh. 7 - Prob. 19RQCh. 7 - When would you usually specify primary key...Ch. 7 - Prob. 21RQCh. 7 - Prob. 22RQCh. 7 - Prob. 23RQCh. 7 - Use SQL to make the following changes to the TAL...Ch. 7 - Create a view named ITEM_ORDER. It consists of the...Ch. 7 - Create a view named ORDER_TOTAL. It consists of...Ch. 7 - Write, but do not execute, the commands to grant...Ch. 7 - Prob. 5TDCh. 7 - Perform the following tasks: a. Create an index...Ch. 7 - Delete the index named ITEM_INDEX3.Ch. 7 - Write the commands to obtain the following...Ch. 7 - Prob. 9TDCh. 7 - Prob. 10TDCh. 7 - Toys Galore currently has a credit limit of 7,500....Ch. 7 - Use SQL to make the following changes to the...Ch. 7 - Create a view named RESERVATION_CUSTOMER. It...Ch. 7 - Create a view named TRIP_INVENTORY. It consists of...Ch. 7 - Write, but do not execute, the commands to grant...Ch. 7 - Prob. 5CATCh. 7 - Create the following indexes: a. Create an index...Ch. 7 - Prob. 7CATCh. 7 - Write the commands to obtain the following...Ch. 7 - Prob. 9CATCh. 7 - Ensure that the only legal values for the TYPE...Ch. 7 - Prob. 11CATCh. 7 - Use SQL to make the following changes to the...Ch. 7 - Create a view named CONDO_OWNERS. It consists of...Ch. 7 - Create a view named CONDO_FEES. It consists of two...Ch. 7 - Write, but do not execute, the commands to grant...Ch. 7 - Prob. 5SCGCh. 7 - Prob. 6SCGCh. 7 - Delete the OWNER_INDEX 3 index from the OWNER...Ch. 7 - Write the commands to obtain the following...Ch. 7 - Prob. 9SCGCh. 7 - Ensure that the only legal values for the BDRMS...Ch. 7 - Prob. 11SCG
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Compile and run the sample code that uses show_bytes (file show-bytes. c) on different machines to which you ha...
Computer Systems: A Programmer's Perspective (3rd Edition)
Categorize each of the following items as either hardware or software: CPU C++ compiler ALU C++ preprocessor in...
C How to Program (8th Edition)
In Exercises 1 through 22, determine the output displayed in the text box or list box by the lines of code.
Introduction to Programming Using Visual Basic (10th Edition)
(Display three messages) Write a program that displays Welcome to Java, Welcome to Computer Science, and Progra...
Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
In the following field declaration from the TicketMachine class private int price; does it matter which order t...
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
The following C++ program will not compile because the lines have been mixed up. cout Success\n; cout Success...
Starting Out with C++ from Control Structures to Objects (8th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Write the commands to obtain the following information from the system catalog. Do not execute these commands unless your instructor asks you to do 30. a. List every column in the GUIDE table and its associated data type. b. List every table that contains a column named TRIP_ID. c. List the table name, column name, and data type for the columns named TRIP_ID,TRIP_NAME, and TYPE. Order the results by table name within column name. (Thatis, column name is the major sort key and table name is the minor sort key.)arrow_forwardTask 1: StayWell manages the owner information about every property under their management. Since the owners are essential to the operations, their addresses (with city, state, and zip code) are collected. Create the OWNER table, it should have the following data: OWNER_NUM as fixed-length 5 characters LAST_NAME as maximum 20 characters FIRST_NAME as maximum 20 characters ADDRESS as maximum 100 characters CITY as maximum 20 characters STATE as fixed-length 2 characters ZIP_CODE as fixed-length 5 characters All fields are mandatory and cannot be empty StayWell stores and manages the detailed information about the properties within their operations. Each property is assigned to an office for its management activities. In addition, property-specific information such as the house size, number of bedrooms and floors, and monthly rent are also kept. Each property has an owner reference. Considering the future expansion of StayWell, all properties should be managed within the database.…arrow_forwardTask 13: Write the command to display only tables within the system catalog that are of the type BASE TABLE. Display only the following columns: TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE.arrow_forward
- WEEK 9 ASSIGNMENT#3 Part I: Complete the following exercise: Create the following table with the correct columns. Call your new table: student_course (see below). Populate this table with four rows. Make sure the student id column contains values that are also in the student id column of your student table. student id course id semester year Join the student and student_course table where the student id values are the same. Join the student and student_course table where the student id values are the same and year is equal to 2020. Create a select statement that will return the length of the last name column by joining the student and student_course table where the student id values are the same and enroll month is June. Once you have completed your assignment, copy and paste the script into a Word document. Part II: Complete the following exercise: Using a subquery, select student first name where the student is in the student course table. Using a subquery, select the…arrow_forwardTask 2: For each invoice placed on November 15, 2021, list the invoice number along with the ID, first name, and last name of the customer for which the invoice was created.arrow_forwardTask 6: The Car Maintenance team considered that the available maintenance tasks should also have the price information in the database. Alter the MAINTENANCE_TYPES table to include a new column named MAINTENANCE_PRICE of type FLOAT. Alter the MAINTENANCE_TYPES table to include pricing information.arrow_forward
- 4. Write a SELECT statement that selects all of the columns for the catalog view that returns information about foreign keys. How many foreign keys are defined in the AP database?arrow_forwardTask 6: Find the ID, first name, and last name of each customer for which an invoice was not created on November 15, 2021. Task 7: For each invoice, list the invoice number, invoice date, item ID, description, and category for each item that makes up the invoice.arrow_forwardTask 10 Task 10: List all the tables contained within the system catalog, but only display the first 10 records with a TABLE_TYPE of SYSTEM VIEW. Results SELECT * FROM (SELECT TABLE_NAME FROM ALL_TABLES ORDER BY TABLE_NAME) WHERE ROWNUM < = 10; ERROR 1248 (42000) at line 1: Every derived table must have its own alias Task 11 Results Task 11: List all the columns contained within the system catalog, but only display the first 11 records that are in the KimTay TABLE_SCHEMA.arrow_forward
- Task 6: Find the ID, first name, and last name of each customer for which an invoice was not created on November 15, 2021. Task 13: List the invoice number and invoice date for each invoice created for the customer James Gonzalez. Task 15: List the invoice number and invoice date for each invoice that either was created for James Gonzalez or that contains an invoice line for Wild Bird Food (25lb). TEMPLATE -- Task # 6SELECT CUSTOMER.CUST_ID, FIRST_NAME, LAST_NAMEFROM _____________, _________________WHERE CUSTOMER.________________ = ______________.CUST_IDAND INVOICES.____________________ <> '2021-11-15'; -- Task # 13SELECT INVOICE_NUM, INVOICE_DATEFROM ______________WHERE ____________ IN (SELECT CUST_ID FROM CUSTOMER WHERE _____________ = _______________AND ____________ = ______________); -- Task # 15SELECT DISTINCT INVOICES.INVOICE_NUM, INVOICES.INVOICE_DATEFROM INVOICES, INVOICE_LINE, ITEM, CUSTOMERWHERE INVOICES.INVOICE_NUM = INVOICE_LINE.INVOICE_NUMAND INVOICE_LINE.ITEM_ID =…arrow_forwardCreate a set of lookup tables.arrow_forwardWhat is the format of the SET clause that changes the value in a column to null in an UPDATE command?arrow_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 PtrCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
How to Design DB Tables for any Application? (The Basics); Author: Studytonight;https://www.youtube.com/watch?v=XUdNVaSikqY;License: Standard YouTube License, CC-BY
Create a Table (Introduction to Oracle SQL); Author: Database Star;https://www.youtube.com/watch?v=BiV1IrzB1sY;License: Standard Youtube License