Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

create tables for the following relation schema. student(name, student, major Help!!!! Assignment 2 SOL assignment I 1. Create tables for the following relation schemas. STUDENT(Name,

create tables for the following relation schema. student(name, student, major

image text in transcribed

image text in transcribed

Help!!!!

Assignment 2 SOL assignment I 1. Create tables for the following relation schemas. STUDENT(Name, studentNo, major) GRADEREPORT(StudentNo, sectionID, Grade) The required data type of each attribute is described as below: STUDENT. name is a variable length character string with no more than 40 characters (varchar2 (40) STUDENT.studentNo is al0-digitnumber, so is GRADEREPORT. StudentNo. (number (10)) STUDENT.major is a fixed-length string of 4 characters (char (4)) GRADEREPORT.sectionID is a 6-digit number (number (6)). GRADEREPORT. Grade is a single letter (char(1)). Your SQL program should specify each attribute type accordingly and appropriate constraints including primary keys and foreign keys, if any Tip: Run the drop table command first before the create table command. Here is an example: drop table GradeReport cascade constraints; create table GradeReport 2. Insert 3 rows to each table. 3. (a) Run the following codes to create EMPLOYEE and DEPARTMENT tables: drop table DEPT cascade constraints; create table DEPT DNUMBER number (2), Dname varchar2 (30), primary key (DNUMBER)): drop table EMP cascade constraints; create table EMP ( EID number (4) primary key, DNO number( 2 ) , AGE integer check(age >-18), foreign key (DNO) references DEPT

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 Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

More Books

Students also viewed these Databases questions