Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DROP TABLE crop; DROP TABLE animal; CREATE TABLE crop ( crop _ id NUMBER ( 6 ) PRIMARY KEY, crop _ name VARCHAR 2 (

DROP TABLE crop;
DROP TABLE animal;
CREATE TABLE crop
(crop_id NUMBER (6) PRIMARY KEY,
crop_name VARCHAR2(20) UNIQUE,
seed_cost NUMBER (4,2),
yield_per_acre NUMBER (5,2),
num_acres NUMBER (4),
avg_cost NUMBER (5),
date_ideally_plnt DATE,
harvest_time INTERVAL DAY (2) TO SECOND (3),
yield_cost calculated_field NUMBER(10,2) GENERATED ALWAYS AS (yield_per_acre * avg_cost) STORED);
CREATE TABLE animal
(animal_id NUMBER (6) PRIMARY KEY,
animal_name VARCHAR2(20) NOT NULL,
type CHAR (2),
num_head NUMBER (5),
maturity_time INTERVAL YEAR (2) TO MONTH,
offspring VARCHAR2(3),
crop NUMBER (6) NOT NULL REFERENCES crop (crop_id));

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

What are Electrophoresis?

Answered: 1 week ago