Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 4, Problem 9RQ
What is the difference between disabling a constraint and dropping a constraint?
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
( Please answer this question immediately I do not have time )
Use the following table to answer the questions below:
Table name: Books
Column Name
Role
Data Type
Length
Constraint
bookID
Stores the ID of a book
Number
5
Primary key
bookTitle
Stores the title of a book
Varchar2
50
-
bookISBN
Stores the ISBN of a book
Number
13
Cannot be null and duplicated
publicationDate
Store the publication date of a book
Date
-
Cannot be null
bookPrice
Stores the price of a book
Number
2,2
Cannot be null
a. Write in SQL a command that creates the table Books according to the above description
b. Write in SQL a statement that adds a new column named publisherID of type Char(10). This column should be defined as a foreign key that relates the table Books to the table Publisher
c. Write in SQL a command that deletes the books that are published before 20-Aug-2010
d. Write a SQL query that displays the number of books that are published in the year 2018
e. Write in SQL a…
Domain Constraints means violations in size only
Select one:
O True
O False
Key constraint means violation when the primary key value is repeated
Select one:
O True
O False
The expression =IF(A1 > 12, 3*A1, 6*A1) is used in a spreadsheet.Find the result if A1 is 2 Find the result if A1 is 13.
Chapter 4 Solutions
Oracle 12c: SQL
Ch. 4 - What is the difference between a PRIMARY KEY...Ch. 4 - How can you verify the constraints that exist for...Ch. 4 - A table can have a maximum of how many PRIMARY KEY...Ch. 4 - Which type of constraint can be used to make...Ch. 4 - Which type of constraint should you use to ensure...Ch. 4 - How is adding a NOT NULL constraint to an existing...Ch. 4 - When must you define constraints at the table...Ch. 4 - Prob. 8RQCh. 4 - What is the difference between disabling a...Ch. 4 - Prob. 10RQ
Ch. 4 - Prob. 1MCCh. 4 - Which of the following is not a valid constraint...Ch. 4 - Which of the following SQL statements is invalid...Ch. 4 - What is the maximum number of PRIMARY KEY...Ch. 4 - Prob. 5MCCh. 4 - How many NOT NULL constraints can be created at...Ch. 4 - The FOREIGN KEY constraint should be added to...Ch. 4 - What is the maximum number of columns you can...Ch. 4 - Which of the following commands can you use to...Ch. 4 - Prob. 10MCCh. 4 - In the initial creation of a table, if a UNIQUE...Ch. 4 - Which type of constraint should you use on a...Ch. 4 - Which of the following commands can be used to...Ch. 4 - Which of the following keywords allows the user to...Ch. 4 - Which of the following data dictionary objects...Ch. 4 - Which of the following types of constraints cant...Ch. 4 - Suppose you created a PRIMARY KEY constraint at...Ch. 4 - You’re creating a new table consisting of three...Ch. 4 - Which of the following types of restrictions can...Ch. 4 - Which of the following is the valid syntax for...Ch. 4 - Prob. 1HOACh. 4 - Prob. 2HOACh. 4 - Prob. 3HOACh. 4 - Add a column named Base_salary with a datatype of...Ch. 4 - Create a table named BOOK_STORES to include the...Ch. 4 - Add a constraint to make sure the Rep_ID value...Ch. 4 - Change the constraint created in Assignment #6 so...Ch. 4 - Create a table named REP_CONTRACTS containing the...Ch. 4 - Produce a list of information about all existing...Ch. 4 - Issue the commands to disable and then enable the...
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
- What happens when a constraint is followed? Unique I Primary Key (ii), Default (iii), and Check (iv) Unique I Primary Key (ii), Default (iii), and Check (iv)arrow_forwardWhat is a NULL value?arrow_forwardWhich of the following commands can you use to rename a constraint? RENAME ALTER CONSTRAINT MOVE NEW NAME None of the above commands can be used.arrow_forward
- SQLarrow_forwardThe main parts that form the space in constraint layout are Select one: O a. Component width or height + margin + constraint size O b. Component Name + margin + constraint size O c. Component width or height + constraint type + constraint sizearrow_forwardPATHS is a table that contains information about paths on a number line. The structure of PATHS is as follows, where x1 and x2 represent that there is a path from Coordinate x1 to Coordinate x2 (You can't move from Coordinate x2 to Coordinate x1 ). NAME ΤΥΡE NULLABLE X1 INT FALSE X2 INT FALSE Problem Please write an SQL statement that returns the beginning and end point of each path in PATHS . Sort them by the value of the beginning point in ascending order. Constraints • In the case where a direct path from Coordinate a to Coordinate b is available, no path from Coordinate b to Coordinate a will be given. |x1-x2| = 1 • No path will overlap with one another. Example Suppose that PATHS is as follows: x1 x2 1 2 2 3 4 7 7 6 This table can be visualized as follows: START END END START 7 8. 9 Therefore, your SQL statement must return the following: start end 1 4 8 6arrow_forward
- Disjoint restrictions overlap?arrow_forwardcalculate_new_balance Given a starting balance (a number), and a list of transaction tuples, calculate the final balance for an account. Transaction tuples are of the shape ("description", amount, "withdrawal") , or ("description", amount, "deposit"). The last entry in the tuple will be either "withdrawal" or "deposit". Every withdrawal decreases the balance of the account by the specified amount, and every deposit increases the balance. The return value is the new account balance, as a number. (which could be negative) Sample calls should look like: >>> calculate_new_balance(100, [("payday", 20, "deposit"), ("new shoes", 50, "withdrawal"), ("illicit winnings", 200, "deposit")])270>>> calculate_new_balance(100, [])100arrow_forward125. Optimization basically related to the Rewrite module is termed as_______ a. Semantic query optimization b. Global query optimization c. All of the Mentioned d. None of the Mentionedarrow_forward
- If order by command is not used, what is the default value?arrow_forwardSOQL Assignment: Salesforce You are given a task for checking and query the data so your manager told you to write a Salesforce object query language query in which you have to write a inline query to retrieve the data from the account and contact at same time. You can use any fields you want.arrow_forwardDue to class time restrictions, the lecturer is unable to respond to all the students' queries.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
dml in sql with examples; Author: Education 4u;https://www.youtube.com/watch?v=WvOseanUdk4;License: Standard YouTube License, CC-BY