Oracle 12c: SQL
Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
bartleby

Videos

Textbook Question
Book Icon
Chapter 4, Problem 18MC

You’re creating a new table consisting of three columns: Col1, Col2, and Col3. Col1 should be the primary key and can’t have any NULL values, and each entry should be unique. Col3 must not contain any NULL values either. How many total constraints do you have to create?

  1. a. 1
  2. b. 2
  3. c. 3
  4. d. 4
Blurred answer
Students have asked these similar questions
Task 2: The Car Maintenance team also wants to store the actual maintenance operations in the database. The team wants to start with a table to store CAR_ID (CHAR(5)), MAINTENANCE_TYPE_ID (CHAR(5)) and MAINTENANCE_DUE (DATE) date for the operation. Create a new table named MAINTENANCES. The PRIMARY_KEY should be the combination of the three fields. The CAR_ID and MAINTENACNE_TYPE_ID should be foreign keys to their original tables. Cascade update and cascade delete the foreign keys.   Answer in MYSQL please
Write CREATE TABLE statements to implement the following design. Include foreign key constraints. Define the individualID, and GroupID as identity columns. Decide which columns should allow null values, if any. Define Dues column with a default of zero and check constraints to allow only positive values.
Task 2: The Car Maintenance team also wants to store the actual maintenance operations in the database. The team wants to start with a table to store CAR_ID (CHAR(5)), MAINTENANCE_TYPE_ID (CHAR(5)) and MAINTENANCE_DUE (DATE) date for the operation. Create a new table named MAINTENANCES. The PRIMARY_KEY should be the combination of the three fields. The CAR_ID and MAINTENANCE_TYPE_ID should be foreign keys to their original tables. Cascade update and cascade delete the foreign keys.   SQL DataBase Test: Create a new table to store maintenance operations Test Query: DESCRIBE MAINTENANCES   Expected Results Field Type Null Key Default Extra CAR_ID char(5) NO PRI NULL   MAINTENANCE_TYPE_ID char(5) NO PRI NULL   MAINTENANCE_DUE date NO PRI NULL

Chapter 4 Solutions

Oracle 12c: SQL

Knowledge Booster
Background pattern image
Computer Science
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
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Oracle 12c: SQL
    Computer Science
    ISBN:9781305251038
    Author:Joan Casteel
    Publisher:Cengage Learning
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
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