Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write 10 SQL statements against the STUDENT schema you created for practice lab 1. Your statements should run error-free and should be valid. Submit two

Write 10 SQL statements against the STUDENT schema you created for practice lab 1. Your statements should run error-free and should be valid. Submit two separate files: one plain text file (.txt or .sql file) with your statements only; and the other document (doc/docx/pdf) include both your statements and your query results (copy and paste text or screen shots). The instructor and TA should be able to run your plain text source file as script and generate the same output as shown in your result document. Display all information about all courses Add a new course "Relational Database Systems" with course number 651. Use your user name as created_by/modified_by and current date as created_date/modified_date List the course number for "Database System Principles" Set "Database System Principles" as the prerequisite for "Relational Database Systems" List all courses that have "Database System Principles" as prerequisite List total number of courses that have no prerequisite Delete course "Relational Database Systems" Display total number of courses Lower cost of all courses by 100 List all course cost (show course description and cost only) by the order of cost from highest to lowest How can i attach the schema info?

A P P E N D I X D STUDENT DATABASE SCHEMA ENR_SECT_FK ENR_STU_FK GR_ENR_FK GR_GRTW_FK GRTW_GRTYP_FK GRTW_SECT_FK INST_ZIP_FK SECT_CRSE_FK SECT_INST_FK STU_ZIP_FK CRSE_CRSE_FK ENROLLMENT STUDENT_ID (PK)(FK) NUMBER(8,0) NOT NULL SECTION_ID (PK)(FK) NUMBER(8,0) NOT NULL ENROLL_DATE DATE NOT NULL FINAL_GRADE NUMBER(3,0) NULL CREATED_BY VARCHAR2(30) NOT NULL CREATED_DATE DATE NOT NULL MODIFIED_BY VARCHAR2(30) NOT NULL MODIFIED_DATE DATE NOT NULL GRADE GRADE_CODE_OCCURRENCE (PK) NUMBER(38,0) NOT NULL STUDENT_ID (PK)(FK) NUMBER(8,0) NOT NULL SECTION_ID (PK)(FK) NUMBER(8,0) NOT NULL GRADE_TYPE_CODE (PK)(FK) CHAR(2) NOT NULL NUMERIC_GRADE NUMBER(3,0) NOT NULL COMMENTS VARCHAR2(2000) NULL CREATED_BY VARCHAR2(30) NOT NULL CREATED_DATE DATE NOT NULL MODIFIED_BY VARCHAR2(30) NOT NULL MODIFIED_DATE DATE NOT NULL GRADE_CONVERSION LETTER_GRADE (PK) VARCHAR2(2) NOT NULL GRADE_POINT NUMBER(3,2) NOT NULL MAX_GRADE NUMBER(3,0) NOT NULL MIN_GRADE NUMBER(3,0) NOT NULL CREATED_BY VARCHAR2(30) NOT NULL CREATED_DATE DATE NOT NULL MODIFIED_BY VARCHAR2(30) NOT NULL MODIFIED_DATE DATE NOT NULL GRADE_TYPE GRADE_TYPE_CODE (PK) CHAR(2) NOT NULL DESCRIPTION VARCHAR2(50) NOT NULL CREATED_BY VARCHAR2(30) NOT NULL CREATED_DATE DATE NOT NULL MODIFIED_BY VARCHAR2(30) NOT NULL MODIFIED_DATE DATE NOT NULL GRADE_TYPE_WEIGHT SECTION_ID (PK)(FK) NUMBER(8,0) NOT NULL GRADE_TYPE_CODE (PK)(FK) CHAR(2) NOT NULL NUMBER_PER_SECTION NUMBER(3,0) NOT NULL PERCENT_OF_FINAL_GRADE NUMBER(3,0) NOT NULL DROP_LOWEST CHAR(1) NOT NULL CREATED_BY VARCHAR2(30) NOT NULL CREATED_DATE DATE NOT NULL MODIFIED_BY VARCHAR2(30) NOT NULL MODIFIED_DATE DATE NOT NULL INSTRUCTOR INSTRUCTOR_ID (PK) NUMBER(8,0) NOT NULL SALUTATION VARCHAR2(5) NULL FIRST_NAME VARCHAR2(25) NULL LAST_NAME VARCHAR2(25) NULL STREET_ADDRESS VARCHAR2(50) NULL PHONE VARCHAR2(15) NULL CREATED_BY VARCHAR2(30) NOT NULL CREATED_DATE DATE NOT NULL MODIFIED_BY VARCHAR2(30) NOT NULL MODIFIED_DATE DATE NOT NULL ZIP (FK) VARCHAR2(5) NULL SECTION SECTION_ID (PK) NUMBER(8,0) NOT NULL SECTION_NO NUMBER(3,0) NOT NULL START_DATE_TIME DATE NULL LOCATION VARCHAR2(50) NULL CAPACITY NUMBER(3,0) NULL CREATED_BY VARCHAR2(30) NOT NULL CREATED_DATE DATE NOT NULL MODIFIED_BY VARCHAR2(30) NOT NULL MODIFIED_DATE DATE NOT NULL COURSE_NO (FK) NUMBER(8,0) NOT NULL INSTRUCTOR_ID (FK) NUMBER(8,0) NOT NULL STUDENT STUDENT_ID (PK) NUMBER(8,0) NOT NULL SALUTATION VARCHAR2(5) NULL FIRST_NAME VARCHAR2(25) NULL LAST_NAME VARCHAR2(25) NOT NULL STREET_ADDRESS VARCHAR2(50) NULL PHONE VARCHAR2(15) NULL EMPLOYER VARCHAR2(50) NULL REGISTRATION_DATE DATE NOT NULL CREATED_BY VARCHAR2(30) NOT NULL CREATED_DATE DATE NOT NULL MODIFIED_BY VARCHAR2(30) NOT NULL MODIFIED_DATE DATE NOT NULL ZIP (FK) VARCHAR2(5) NOT NULL ZIPCODE ZIP (PK) VARCHAR2(5) NOT NULL CITY VARCHAR2(25) NULL STATE VARCHAR2(2) NULL CREATED_BY VARCHAR2(30) NOT NULL CREATED_DATE DATE NOT NULL MODIFIED_BY VARCHAR2(30) NOT NULL MODIFIED_DATE DATE NOT NULL COURSE COURSE_NO (PK) NUMBER(8,0) NOT NULL DESCRIPTION VARCHAR2(50) NOT NULL COST NUMBER(9,2) NULL CREATED_BY VARCHAR2(30) NOT NULL CREATED_DATE DATE NOT NULL MODIFIED_BY VARCHAR2(30) NOT NULL MODIFIED_DATE DATE NOT NULL PREREQUISITE (FK) NUMBER(8,0) NULL

I added the student database schema

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

Students also viewed these Databases questions