Database Systems: Design, Implementation, & Management
11th Edition
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
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 8, Problem 51C
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
Please 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
Flase
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 .
PL/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 Cursor
Chapter 8 Solutions
Database Systems: Design, Implementation, & Management
Ch. 8 - What is a cross join? Give an example of its...Ch. 8 - What three join types are included in the outer...Ch. 8 - Using tables named T1 and T2, write a query...Ch. 8 - Prob. 4RQCh. 8 - Prob. 5RQCh. 8 - Prob. 6RQCh. 8 - Prob. 7RQCh. 8 - What does it mean to say that SQL operators are...Ch. 8 - Prob. 9RQCh. 8 - Prob. 10RQ
Ch. 8 - Prob. 11RQCh. 8 - Prob. 12RQCh. 8 - Prob. 13RQCh. 8 - Given the employee information in Question 11,...Ch. 8 - Prob. 15RQCh. 8 - Prob. 16RQCh. 8 - Prob. 17RQCh. 8 - Prob. 18RQCh. 8 - What string function should you use to list the...Ch. 8 - Prob. 20RQCh. 8 - Prob. 21RQCh. 8 - Prob. 22RQCh. 8 - Prob. 23RQCh. 8 - Prob. 24RQCh. 8 - Prob. 1PCh. 8 - Insert the data into the tables you created in...Ch. 8 - Prob. 3PCh. 8 - Prob. 4PCh. 8 - Prob. 5PCh. 8 - Prob. 6PCh. 8 - Prob. 7PCh. 8 - Prob. 8PCh. 8 - Prob. 9PCh. 8 - Modify the CUSTOMER table to include two new...Ch. 8 - Prob. 11PCh. 8 - Prob. 12PCh. 8 - Prob. 13PCh. 8 - Prob. 14PCh. 8 - Prob. 15PCh. 8 - Prob. 16PCh. 8 - Write a trigger to update the customer balance...Ch. 8 - Write a procedure to delete an invoice, giving the...Ch. 8 - Prob. 19PCh. 8 - Prob. 20PCh. 8 - Prob. 21PCh. 8 - Prob. 22PCh. 8 - Prob. 23PCh. 8 - Prob. 24PCh. 8 - Prob. 25PCh. 8 - Prob. 26PCh. 8 - Prob. 27PCh. 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. 33PCh. 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. 40PCh. 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 - Alter the DETAILRENTAL table to include a derived...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. 48CCh. 8 - Prob. 51C
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_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_forwardCourse 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.arrow_forward
- 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 resultarrow_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_forwardCreate 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_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_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_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_forward
- Q5) 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_forwardfill in missing valuesarrow_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