Database Systems: Design, Implementation, & Management
13th Edition
ISBN: 9781337627900
Author: Carlos Coronel, Steven Morris
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 8, Problem 10RQ
Explanation of Solution
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.
There are some slight difference which occurs between sequence and the Autonumber data type. Some of the differences are listed below:
- In MS Access, Autonumber is just a data type, whereas in oracle, sequence is completely an independent object...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
I cannot figure out this problem/question. Can someone help me solve this?
I must use use postgreSQL to answer the question.
For this problem create a table called instructor_course_nums. Write a procedure that accepts an instructor ID as input. The procedure calculates the total number of course sections taught by that instructor, and adds a tuple to the instructor_course_nums table consisting of the instructors ID number, name, and total courses taught - call these attributes: ID, name, and tot_courses. If the instructor already has an entry in the table, then the procedure makes sure the total number of courses taught in the instructor_course_nums table is up-to-date. You must name your procedure:<LastName>_<DOB_DayOfMonth>_insCourseNumsProcWhere <LastName> is your last name and <DOB_DayOfMonth> is the day of the monthyou were born. Below is an example of how I named my procedure:Morabito_05__insCourseNumsProc
Execute the following statements using MYSQL:
1.Create a Trigger "trigger regno" for the salesman table (Before
INSERT) set the value as O for the experience > 7 and evaluate it.
Also write the syntax to drop the Trigger "trigger regno*
2. Insert a value for Customer table (#Last 3 digit of your register no,
#Your name, Vellore, 55, 010). Insert a value for salesman table
("10", #Your name, 5, 4000).
3. List out the number of customers in each city by arranging them
from low to high. (
4. Select all the salesman who's work experience is between 4 and 8.
What is a key-value pair in a dictionary, and why is it important?
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
Similar questions
- How is an ADT put together, exactly? Indicate your answer where indicated.arrow_forwardComposite main keys have prospective keys.arrow_forwardWrite a program that queries the world database to determine in which country the residents have the greatest life expectancy. Research how to accomplish a JOIN on two tables. Then write a program that queries the world database to list the population of the capitol city for any country in Asia.arrow_forward
- Perform first normalization based on the table information given.arrow_forwardWhat happens if you try to decrease the scale or precision of a NUMBER column to a value less than the data already stored in the field?arrow_forwardThe Driver Relationship team realized that maintaining driver IDs is difficult and requested an automatic way of incrementing the value when a new driver is added. You need to make the changes on the table to automatically increment the DRIVER_ID. After the change, you need to insert the following driver: First Name: Nursin Last Name: Yilmaz Driving License ID: 4141447 Start Date: 2021-12-28 Driving License Checked: True Rating: 4.0arrow_forward
- Consider tables S (A, B, C) and T (B, C, D) and SQL query select A, B, C, D from S, T where S.B = T.B and S.C = T.C Design a MapReduce program to compute the join efficiently. Please provide the pseudocode.arrow_forwardQuestion 6 In the table is joined to itself using alias to differentiate the table from itself. Right outer join a. b. Inner join Left outer join C. Recursive join d.arrow_forwardCreate a data dictionary for the table below. You should use appropriate data types and lengths. ( Student ID 1011 1012 1013 1015 Course MIS ACT MKT FIN Student Name Yearly Fees Salem Ali 5000 KD Ayman Ahmad Rana Omar Dina Khaled 6000 KD 9000 KD 8000 KD Year of Birth 1990 1992 1996 1989arrow_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: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