RSS

Database Scripts

20 Mar

Database Scripts (Using SQL developer)

Part 1 (10 scripts, keep separate from part 2)

Write 10 SQL statements against the STUDENT schema that is in zip file. 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). I should be able to run your plain text source file as script and generate the same output as shown in your result document.

  1. Display all information about all courses
  2. 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
  1. List the course number for “Database System Principles”
  2. Set “Database System Principles” as the prerequisite for “Relational Database Systems”
  3. List all courses that have “Database System Principles” as prerequisite
  4. List total number of courses that have no prerequisite
  5. Delete course “Relational Database Systems”
  6. Display total number of courses
  7. Lower cost of all courses by 100
  8. List all course cost (show course description and cost only) by the order of cost from highest to lowest

Part 2 (10 scripts, keep separate from part 1)

Write Ten SQL SELECT statements to query the STUDENT schema provided. Your Select Statements should run error-free and should be valid.

Submit two separate files: one plain text file (.txt or .sql file) with your SELECT statements only; and the other document (doc/docx/pdf) include both your SELECT statements and your query results (copy and paste text or screen shots). I should be able to run your plain text source file as script and generate the same output as shown in your result document.

  1. Show the number of students whose zip is 07070.
  2. List all students (display student_id, first name, last name, and employer) who live in Columbus, OH.
  3. Show the zip, state and city that have > 5 students as residents.
  4. List all students (display student_id, first name, last name, and registration date) who registered on or before 2/13/2007 but have not enrolled in any course.
  5. Show the number of students enrolled in the ‘Intro to Unix’ course.
  6. List all students (display student_id, first name, last name, and employer) who took courses taught by instructor ‘Anita Morris’.
  7. List all distinct courses (display instructor name, course_no and description) taught by ‘Anita Morris’.
  8. For all students who took ‘Intro to Unix’, calculate the highest, lowest, and average midterm exam grade.
  9. Show which courses have >  10 students enrolled. Display course_no, description and number of students enrolled.
  10. List any student who has enrolled in the same course multiple times. Display student name, course description, and enrollment count.

 

 
Leave a comment

Posted by on March 20, 2017 in academic writing, Academic Writing

 

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: