Question

Student(Student number, student name, semester) Course(Course number, course name, credits, transfer credits) PART A: Using above...

Student(Student number, student name, semester)

Course(Course number, course name, credits, transfer credits)

PART A:

  1. Using above BS in MIS degree requirements, perform the following
    (25 points)
  • Develop tables (provide create statements)
  • Normalize them (make sure they are in 3rd NF)
  1. Draw a single ERD – clearly identify Primary and Foreign keys (state any assumptions made)
    (10 points)
  2. Create following views:
    (5 points)
  • Create a view that would list all MIS required courses
  • Create a view that will give a total count of courses with course ID above 300 or more (ex: INSS300, INSS421, MGMT315 etc. should be included in the count)

BONUS (5 points)

  • Develop the above tables in ORACLE
  • Insert data in tables
  • Create the view (part 3 above)
  • give the query and output of part 3 from oracle
0 0
Add a comment Improve this question Transcribed image text
Answer #1

SQL

create table Student(SNumber numeric primary key, SName varchar(20), CNumber varchar(6), Semester numeric, foreign key(CNumber) references Course(CNumber));

You have made changes to the database.

insert into Student values(1, 'Gopal', 'CSC123', 1);

You have made changes to the database. Rows affected: 1

insert into Student values(2, 'Elangovan', 'CSC133', 2);

You have made changes to the database. Rows affected: 1

insert into Student values(3, 'Dhana', 'INSS300', 3);

You have made changes to the database. Rows affected: 1

insert into Student values(4, 'Vadivel', 'MGMT315', 1);

You have made changes to the database. Rows affected: 1

insert into Student values(5, 'Varnika', 'CSC155', 3);

You have made changes to the database. Rows affected: 1

select * from Student;

Number of Records: 5

SNumber SName CNumber Semester
1 Gopal CSC123 1
2 Elangovan CSC133 2
3 Dhana INSS300 3
4 Vadivel MGMT315 1
5 Varnika CSC155 3

create table Course(CNumber varchar(6) primary key, CName varchar(25), Credits numeric, Transfer_Credits numeric);

You have made changes to the database.

insert into Course values('CSC123', 'Computer Science', 10, 5);

You have made changes to the database. Rows affected: 1

insert into Course values('CSC133', 'Language', 6, 2);

You have made changes to the database. Rows affected: 1

insert into Course values('CSC155', 'COBOL Programming', 3, 7);

You have made changes to the database. Rows affected: 1

insert into Course values('INSS300', 'Information Security', 5, 5);

You have made changes to the database. Rows affected: 1

insert into Course values(' MGMT315', 'Management Information System', 9, 8);

You have made changes to the database. Rows affected: 1

select * from Course;

Number of Records: 5

CNumber CName Credits Transfer_Credits
CSC123 Computer Science 10 5
CSC133 Language 6 2
CSC155 COBOL Programming 3 7
INSS300 Information Security 5 5
MGMT315 Management Information System 9 8
  • Create a view that would list all MIS required courses

create view RequiredCourses as
select CName as 'Required Courses' from Course;

You have made changes to the database.

select * from RequiredCourses;

Number of Records: 5

Required Courses
Computer Science
Language
COBOL Programming
Information Security
Management Information System
  • Create a view that will give a total count of courses with course ID above 300 or more (ex: INSS300, INSS421, MGMT315 etc. should be included in the count)

create view Count_Courses as
SELECT count(CNumber) as Count_Course FROM [Course] where CNumber like '__%__%3%__';

You have made changes to the database.

select * from Count_Courses;

Number of Records: 1

Count_Course
2

Oracle

  • Create a view that would list all MIS required courses

create view RequiredCourses as
select CName
from Course;

select * from RequiredCourses;

 
CNAME
Computer Science
Language
COBOL Programming
Information Security
Management Information System
  • Create a view that will give a total count of courses with course ID above 300 or more (ex: INSS300, INSS421, MGMT315 etc. should be included in the count)

create view Count_Courses as
SELECT count(CNumber) as Count_Course
FROM Course where CNumber like '__%__%3%__';

View created.

select * from Count_Courses;

COUNT_COURSE
2
Add a comment
Know the answer?
Add Answer to:
Student(Student number, student name, semester) Course(Course number, course name, credits, transfer credits) PART A: Using above...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Problem Specification: Write a C++ program to calculate student’s GPA for the semester in your class. For each student, the program should accept a student’s name, ID number and the number of courses...

    Problem Specification:Write a C++ program to calculate student’s GPA for the semester in your class. For each student,the program should accept a student’s name, ID number and the number of courses he/she istaking, then for each course the following data is needed the course number a string e.g. BU 101 course credits “an integer” grade received for the course “a character”.The program should display each student’s information and their courses information. It shouldalso display the GPA for the semester. The...

  • The relational schema shown below is part of a student database. The primary and foreign keys are highlighted in bold.

    The relational schema shown below is part of a student database. The primary and foreign keys are highlighted in bold.Student (studNo, studName, address, mobileNo)Course (courseNo, courseName, creditHour, level) Registration (studNo, courseNo, regDate, semester, session)Project (projNo, projName, courseNo)Assignment (projNo, studNo, startDate, dueDate, hoursSpent)Write SQL queries based on the student database given above: 1. Create tables & constraints for the student database.2. Insert some data into the tables to check that the tables created are correct. No limit on how many rows you want...

  • Someone please answer all of these. I need these badly. The submission date is knocking at...

    Someone please answer all of these. I need these badly. The submission date is knocking at the door. Experiment 1: SQL data definition and data insertion 46 hours) 1. CREATE TABLE. The database schema consists of the three relations, whose schemas are: S (Spa, Sname. Sgender, Sage, Sdert? // students(SID, name, gender, age, department) SC (Spa, Cne. Grade) //Course(SID, CID, grade) C (One Cname Crno. Ceredit) l/courses (CID, course name, prerequisite courses, credit) 2. DROP TABLE, ALTER TABLE, CREATE INDEX,...

  • Name Use complete sentences if possible The following StudentGrade relation (table) stores the Student, Major, and Course information Each student has unique StudentID. Assume that a student has...

    Name Use complete sentences if possible The following StudentGrade relation (table) stores the Student, Major, and Course information Each student has unique StudentID. Assume that a student has only one major. One student can take multiple courses in one SemesterYear. One course can be taken by many students in each SemesterYear. Given values for StudentID, Course Number, and SemesterYear, one can determine all the rest of values for a record. However only Grade is functionally dependent on StudentlD, CourseNumber and...

  • use c++ Weighted GPA Calculator2 Many schools factor in the number of credits each course is...

    use c++ Weighted GPA Calculator2 Many schools factor in the number of credits each course is worth, meaning a 4-credit class has more value than a 2-credit class when calculating students GPA Suppose the following were the grades for a student CreditsGrade lass Pre-Calculus History Chemistry Physical Education 1 Letter grades are assigned as follows Letter grades are worth these points 0-60 F 61 -70 D 71 80 C 81 -90 B 91 -100 A Class Pre-Calculus History Chemistr)y Physical...

  • (7) Student grade point statistics [Problem description] There is a need to make statistics of the grade points o...

    (7) Student grade point statistics [Problem description] There is a need to make statistics of the grade points of the students in the first semester of 2018. It is assumed that there are n (can be set as 6) classes in this grade, and there are 20 students in each class, the total number of courses with exam is m (can be set as 10), and the percentage system is adopted for each course. The gpa is 4, 3, 2,1,...

  • Question 1.Write a SQL statement for each of the following questions based on the above tables...

    Question 1.Write a SQL statement for each of the following questions based on the above tables (50 Points). 1) Create “Enrollment” table. 2) Change the credits of “Database” course from 2 to 3. 3) List the course titles (not Course_No) and grades John Doe had taken. 4) Calculate average of Café Balance, and name new field as Average Balance. 5) Create a roster for “Database” course (list student ID, last name, first name, major, and status for each student enrolled...

  • Project Description You will build part of a college's course registration system (similar to WebReg, though...

    Project Description You will build part of a college's course registration system (similar to WebReg, though considerably less complex). The system will keep track of a catalog of courses that students can take. It will allow the user (a student) to view and search the course catalog, and to add (register for) and drop (withdraw from) courses. The following restrictions apply: All courses meet only once per week, for one class period. Days will be denoted by the following letters:...

  • The lab for this week addresses taking a logical database design (data model) and transforming it...

    The lab for this week addresses taking a logical database design (data model) and transforming it into a physical model (tables, constraints, and relationships). As part of the lab, you will need to download the zip file titled CIS336Lab3Files from Doc Sharing. This zip file contains the ERD, Data Dictionary, and test data for the tables you create as you complete this exercise. Your job will be to use the ERD Diagram found below as a guide to define the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT