Database Systems: Design, Implementation, & Management
13th Edition
ISBN: 9781337627900
Author: Carlos Coronel, Steven Morris
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 8, Problem 60P
Program Plan Intro
Sequence:
- A sequence is user defined schema that generates the numeric values.
- The generation of unique numeric values by a special type of object either in ascending or descending order is called sequence.
- It is frequently used in
databases as many applications require unique value in a row. - Its functionality is same as the Autonumber data type in MS access.
- For example, both the sequence and Autonumber data type generate ascending or descending values.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
individual characters using their 0-based index. Hint: You will need to do this for checking all the rules. However, when you access a character .
part A Attempt to violate the primary key constraint and observe the result.
part B Attempt to violate the foreign key constraint and observe the result
Course Title: Data Structure and Algorithms
Question
A table stores the data for all the members of an exotic resort. Members are identified by these numbers 1,5,30,70,80,20,15,100,40,25,7,3,8,33,22.
All members are to be invited in a meeting to review the membership policies. What will be the fastest way to call all the members? Write algorithm to justify your answer.
Chapter 8 Solutions
Database Systems: Design, Implementation, & Management
Ch. 8 - Prob. 1RQCh. 8 - Explain why it might be more appropriate to...Ch. 8 - What is the difference between a column constraint...Ch. 8 - What are referential constraint actions?Ch. 8 - What is the purpose of a CHECK constraint?Ch. 8 - Explain when an ALTER TABLE command might be...Ch. 8 - What is the difference between an INSERT command...Ch. 8 - What is the difference between using a subquery...Ch. 8 - What is the difference between a view and a...Ch. 8 - Prob. 10RQ
Ch. 8 - Prob. 11RQCh. 8 - Prob. 12RQCh. 8 - Write the SQL code that will create only the table...Ch. 8 - Having created the table structure in Problem 1,...Ch. 8 - Prob. 3PCh. 8 - Write the SQL code that will save the changes made...Ch. 8 - Write the SQL code to change the job code to 501...Ch. 8 - Write the SQL code to delete the row for William...Ch. 8 - Write the SQL code to create a copy of EMP_1,...Ch. 8 - Using the EMP_2 table, write the SQL code that...Ch. 8 - Using the EMP_2 table, write the SQL code to...Ch. 8 - Prob. 10PCh. 8 - Prob. 11PCh. 8 - Prob. 12PCh. 8 - Prob. 13PCh. 8 - Prob. 14PCh. 8 - Prob. 15PCh. 8 - Create the CUSTOMER table structure illustrated in...Ch. 8 - Create the INVOICE table structure illustrated in...Ch. 8 - Prob. 18PCh. 8 - Prob. 19PCh. 8 - Create an Oracle sequence named CUST_NUM_SEQ to...Ch. 8 - Create an Oracle sequence named INV_NUM_SEQ to...Ch. 8 - Prob. 22PCh. 8 - Modify the CUSTOMER table to include the customers...Ch. 8 - Prob. 24PCh. 8 - Prob. 25PCh. 8 - Create a trigger named trg_updatecustbalance to...Ch. 8 - Prob. 27PCh. 8 - Prob. 28PCh. 8 - Write a trigger to update the customer balance...Ch. 8 - Prob. 30PCh. 8 - Create a trigger named trg_line_total to write the...Ch. 8 - Create a trigger named trg_line_prod that...Ch. 8 - Create a stored procedure named prc_inv_amounts to...Ch. 8 - Create a procedure named prc_cus_balance_update...Ch. 8 - Modify the MODEL table to add the attribute and...Ch. 8 - Prob. 36PCh. 8 - Modify the CHARTER table to add the attributes...Ch. 8 - Write the sequence of commands required to update...Ch. 8 - Write the sequence of commands required to update...Ch. 8 - Write the command required to update the...Ch. 8 - Write the command required to update the...Ch. 8 - Write the command required to update the...Ch. 8 - Prob. 43PCh. 8 - Create a trigger named trg_char_hours that...Ch. 8 - Create a trigger named trg_pic_hours that...Ch. 8 - Create a trigger named trg_cust_balance that...Ch. 8 - Write the SQL code to create the table structures...Ch. 8 - The following tables provide a very small portion...Ch. 8 - For Questions 49-63, use the tables that were...Ch. 8 - Prob. 50PCh. 8 - Write a single SQL command to increase all price...Ch. 8 - Alter the DETAILRENTAL table to include a derived...Ch. 8 - Update the DETAILRENTAL table to set the values in...Ch. 8 - Alter the VIDEO table to include an attribute...Ch. 8 - Update the VID_STATUS attribute of the VIDEO table...Ch. 8 - Alter the PRICE table to include an attribute...Ch. 8 - Prob. 57PCh. 8 - Prob. 60P
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
- Delete the index named ITEM_INDEX3.arrow_forwardPlease elp with the follwoing If you omitted the WHERE clause of an UPDATE or DELETE statements, the query returns an error because the where clause is required. True or Flasearrow_forwardDatabase Q1: Which one of the following INSERT statements will successfully insert a single row? The following table has been created: CREATE TABLE student_table ( stud_id NUMBER (6), last_name VARCHAR2 (20), first_name VARCHAR2 (20), lunch_num NUMBER (4) ; a) INSERT VALUES INTO student_table (143354, ‘Roberts’, ‘Cameron’, 6543); b) INSERT INTO student_table COLMUNS (stud_id, last_name, lunch_num) VALUES (143352, ‘Roberts’, 5543, ‘Cameron’); c) INSERT TO student_table (stud_id, lunch_num, first_name, last_name) VALUES (143352, 6543, ‘Cameron’, ‘Roberts’); d) INSERT INTO student_table VALUES (143354, ‘Roberts’, ‘Cameron’, 6543); Q2: What does the following SQL statement display: SELECT EMP_ID, LAST_NAME, SALARY FROM EMPLOYEES WHERE SALARY > (SELECT MIN (E. SALARY) FROM EMPLOYEES E) ORDER BY SALARY DESC; a) Employees information who earn less money than the maximum salary b) Employees information who earn more money than the highest employee salary c) Employees information who earn…arrow_forward
- Create table statements (file name must be: 1_create_table.txt). Make sure you specify primary keys and foreign keys. Specifying “not null” constraint is optional. Specifying “on delete action” and “on update action” are optional.arrow_forwardPL/SQL NOT SQL I NEED PL/SQL ASNWER Display the full name (first and last) and salary of all employees in descending order according to their salary. Only display 5 rows. Hint: use row count Handle the exceptions like No Data Found and Invalid Cursorarrow_forwardPROBLEM: Create a table named BOOK_STORES to include the columns listed in the following chart. Column Name Store_ID Name Contact Rep_ID Datatype NUMBER (8) VARCHAR2(30) VARCHAR2(30) VARCHAR2(5) Constraint Comments PRIMARY KEY column Should be UNIQUE and NOT NULL : INSTRUCTIONS: Submit the complete code on doc file, run and also submit the snapshot of the result. You can paste the screen shots(2) on a MS. Word doc.arrow_forward
- HELP IN DATABASE THIS DID NOT WORK CREATE OR REPLACE PROCEDURE PRC_INV_DELETE (W_IN IN NUMBER) ASBEGINIF W_IN IS NOT NULL THENDELETE FROM INVOICE WHERE INV_NUM = W_IN;END IF;END;arrow_forwardProblem 27 Write a procedure named prc_cust_add to add a new customer to the CUST_MYSQL table. Use the following values in the new record: CUIST_NUM CUST_LNAME CUST_FNAME CUST_BALANCE 2003 Rauthor Peter 0.00 (You should execute the procedure and verify that the new customer was added to ensure your code is correct.) Problem 29 Write a trigger to update the CUST_BALANCE when an invoice is deleted. Name the trigger trg_updatecustbalance2. (You should delete INV_NUM 9006 from INV_MYSQL to ensure your code is correct.) Problem 30 Write a procedure to delete an invoice, giving the invoice number as a parameter. Name the procedure prc_inv_delete. Test the procedure by deleting invoices 9000 and 9001arrow_forwardPart 2: PL/SQL By using PL/SQL create the following: 1- A procedure Proc_Insert(arg2,arg3..argn): When the procedure is executed, the value of the passed arguments will be inserted into a table of your database.Note(you have to use one of the created Sequences to generate a value to be inserted into a field of your table). 2- A Procedure Update_value(arg1,arg2): The procedure searches about arg1 value in a specific column of your table and changes the value of the searched item to be equals arg2. 3- A procedure called del_Record_from_Table(arg1) that deletes a specific row from one of the tables you created. 4- A Function getAllData(arg): When Your call your function it should search about an item in your table and returns all data about it. 5- A row type trigger that's fires to accept the deleted rows from a table on your database and store them into another table. -You must create a new table to accept the deleted rows. - The new table must contain two additional columns, the first…arrow_forward
- fill in missing valuesarrow_forwardQ5) The following table has been created: CREATE TABLE student_table ( Stud_id NUMBER (6), last_name VARCHAR2 (20), first_name VARCHAR2 (20), lunch_num NUMBER (4) ) ; which one of the following INSERT statements will work successfully? a) INSERT INTO student_table (stud_id, last_name, first_name, lunch_name) VALUES (143354, Roberts', 'Cameron',654378); b) INSERT INTO student_table (stud_id, lunch_num, first_name, last_name) VALUES (143352678,6543,'Cameron', 'Roberts'); c) INSERT INTO student_table VALUES (143354, 'Roberts', 'Cameron', 6543, 1); d) INSERT INTO student_table VALUES (143354, 'Roberts', 'Cameron', 6543) atabase_MG_2010.pur 10 Tom 31 Jack 11 Sam 12 Sally 14 Sarah 26 Silvia Q6) Based on the Employees table how many rows will result from the following SQL query: ID Name Grade Age Select grade, min(age) from employee where age > 22 group by grade having 1 2 3 1 8 3 a) 6 rows b) 3 rows E c) 2 rows d) 5 rows e) 4 rows 0001010 11101101 010101011111 1010101010101 111010101010…arrow_forwardYou will be using the Colonial Adventure Tours database. List the trip IDs and trip names for each pair of trips that have the same start location.(You will need to assign an alias). The first trip id should be the major sort key, and the second trip id should be the minor sort key.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 PtrNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage