1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
koban [17]
2 years ago
7

Create the tables and appropriate constraints based on the following ER diagram. Use appropriate data types. Note that the size

column should only accept S, M, or L. In addition the price column should only have values greater than zero. All columns in both tables are required. ====================== CATEGORY table: Category Cid Description ====================== PRODUCT table: pid description cid (fk) Price Size (S/M/L)
Computers and Technology
1 answer:
SpyIntel [72]2 years ago
7 0

Answer:

See explaination

Explanation:

CREATE TABLE CATEGORY

(

cid int NOT NULL,

description varchar2(1000),

PRIMARY KEY (cid)

);

CREATE TABLE PRODUCT

(

pid int NOT NULL,

description varchar2(1000),

cid int,

price int,

p_size varchar2(1),

CONSTRAINT chk_price CHECK (price>0),

CONSTRAINT chk_size CHECK (p_size in ('S','M','L')),

CONSTRAINT fk_cid FOREIGN KEY (cid) REFERENCES CATEGORY(cid)

);

You might be interested in
Does anyone have a rbx account? If they do friend request Tribalchief777
Mila [183]

Answer:

ok, no because this site is for hw

Explanation:

8 0
2 years ago
Cmo se puede añadir amigo ??'
seropon [69]

Answer:ok

Explanation:

5 0
3 years ago
When computer networks are connected to each other, the system is called a(n) ____.
KiRa [710]
LAN - Local area network :P
5 0
3 years ago
Type the correct answer in the box. Use numerals instead of words. If necessary, use / for the fraction bar. What will be the ou
lord [1]

Answer:

2

Explanation:

The output of the Java program is 2. The public Vehicle class is defined with the class variable 'counter'. When a Vehicle class object is instantiated, the counter variable increments by one.

In the program, the two instances of the class are created, incrementing the counter variable to two, the print statement outputs 2 as the result of the program.

8 0
3 years ago
Write a program that convert a temperature in Fahrenheit to the equivalent temperature in Celsius. The initial temperature in Fa
baherus [9]

<u>Answer:</u>

//import the necessary class

import java.util.Scanner;

//Begin class definition

public class ConvertToCelsius{

   

       //Begin main method

    public static void main(String []args){

       //Create an object of the Scanner class

       Scanner input = new Scanner(System.in);

       

       //Display the aim of the program

       System.out.println("**Program to convert from Fahrenheit to Celsius**");

       

       //Prompt the user to enter the temperature in Fahrenheit

       System.out.println("Please enter temperature in Fahrenheit");

       

       //Receive the user's input

       //And store in the appropriate variable

       double tempF = input.nextDouble();

       

       //Convert the temperature to Celsius using

       //C = (9.0 / 5) * (F - 32)

       //C = temperature in Celsius, F = temperature in Fahrenheit

       double tempC = (9.0 / 5) * (tempF - 32);

       

       //Display the result

      System.out.println("The temperature in degree Celsius is: ");

       System.out.println(tempC);

       

       return;

       

    }    //End of main method

}    //End of class definition

<u>Sample Output</u>

**Program to convert from Fahrenheit to Celsius **

Please enter temperature in Fahrenheit

>> 32

The temperature in degree Celsius is:  

0.0

<u>Explanation</u>:

The above code has been written in Java and it contains comments explaining important lines of the code. Please go through the comment. Snapshots of the program and a sample output have been attached to this response.

5 0
3 years ago
Other questions:
  • Which of the following is the largest disadvantage of hydropower?
    8·2 answers
  • Write a program for playing tic tac toe. Two players take turns marking an available cell in a 3 X 3 grid with their respective
    15·1 answer
  • Hot five was the famous band of which musician?
    14·1 answer
  • As the performance of PCs steadily improves, computers that in the past were classified as midrange computers are now marketed a
    9·1 answer
  • A disadvantage of a bus network is that _____. a. failure in one workstation necessarily affects other workstations on the netwo
    7·1 answer
  • What keyword do we use when instantiating an object _________________
    15·1 answer
  • c++ You are given an array A representing heights of students. All the students are asked to stand in rows. The students arrive
    5·1 answer
  • Extending the web server functionality implies that the web server and the web-to-database middleware will properly communicate
    10·1 answer
  • In "When Is a Planet Not a Planet?" why does the author say that the outer planets are made of gas when the inner planets are ma
    5·1 answer
  • (Correct Answer Recieves Brainliest)
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!