Question

II. Fill in the blanks: (30 The relational database schema of Course Management System are defined as follows: Department (ID

0 0
Add a comment Improve this question Transcribed image text
Answer #1

[1]  FOREIGN KEY ( StudentID )REFERENCES Student(ID) //as student ID will be a primary key in student table it ii a foreign key here

[2] FOREIGN KEY(CourseID) REFERENCES Course(ID) //as Course ID will be a primary key in Course table

[3] //Not clearly specified in question and the above two statements serve the same perpose

[4] CREATE INDEX teacher_name_idx ON Teacher(Name);

[5] INSERT INTO Student(ID, Name, Gender, Birthday, DeptID)

VALUES('43', 'SAM', 'MALE, '12/09/1998', '001')

Add a comment
Know the answer?
Add Answer to:
II. Fill in the blanks: (30 The relational database schema of Course Management System are defined...
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
  • Consider the following relations for course-enrollment database in a university: STUDENT(S-ID,S-Name, Department, Birth-date) COURSE(C-ID, C-Name, Department)...

    Consider the following relations for course-enrollment database in a university: STUDENT(S-ID,S-Name, Department, Birth-date) COURSE(C-ID, C-Name, Department) ENROLL(S-ID, C-ID, Grade) TEXTBOOK(B-ISBN, B-Title, Publisher, Author) BOOK-ADOPTION(C-ID, B-ISBN) (a) Draw the database relational schema and show the primary keys and referential integrity constraints on the schema. (b) How many superkeys does the relation TEXTBOOK have? List ALL of them. (c) Now assume each COURSE has distinct C-Name. (i) If C-ID is a primary key, what are the candidate keys and the unique keys...

  • 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...

  • Consider following relational database schema and translate the queries ‘a’ and ‘b’ into relational algebra expressions...

    Consider following relational database schema and translate the queries ‘a’ and ‘b’ into relational algebra expressions Teacher(ID, Name, Designation, Phone, Address) Course(CourseCode, CourseName, CreditHour) Taught(TeacherID, CourseCode, Semester) a. SELECT Name, Address FROM Teacher, Taught WHERE Teacher.ID=Taught.TeacherID and CourseCode=’IT344’ b. SELECT CourseName FROM Course, Taught WHERE Course.CourseCode=Taught.CourseCode and TeacherID=200

  • Given the following relational database schema: Student = (SSN, Name, Major) Course = ( CourseNumber ,...

    Given the following relational database schema: Student = (SSN, Name, Major) Course = ( CourseNumber , CourseTitle, NumberOfUnits, RoomNumber, DayTime), where DayTime is of the form MW 1:0-2:00. Enrollment = (SSN , CourseNumber, Grade) Express the following queries using AQL statements with minimum number of tables and operations. List the name of every student whose name starts with the letter S and ends with the letter M, and has earned the grade B in at least one course.

  • SQL Homework Create a single script to do all of the following. Be sure to create...

    SQL Homework Create a single script to do all of the following. Be sure to create in such a way that it can be re-run multiple times. Create a database named homework. In this database, create three tables: Student, Course, StudentCourse - Create the Student table with the following fields in this order: studentID as an integer; do not allow empty values firstName as a variable number of characters, max 30, with a null default value lastName as a variable...

  • 2. The following figure shows an ER schema for a university database. a) Map this schema...

    2. The following figure shows an ER schema for a university database. a) Map this schema into a relational schema b)Show the SQL statements needed to create the relations, using proper constraints. If your translation cannot capture any constraints in the ER diagram, explain why. COffice CName CPhone COLLEGE 0. 1 D Rank Office IName IPhone INSTRUCTOR D EAN (0.NO CStartDate (0.1) <ADMINS . CHIAR (1,1) EMPLOYS (MName FName LName (SName DOB DName Sid IO.NO Name Poate DEPT on H...

  • Help In Database: Next comes the data entry: Make up data for your database, or find...

    Help In Database: Next comes the data entry: Make up data for your database, or find real data. You can enter the data with INSERT statements, but it is much easier to use PhpAdmin. It has a form where you can type the data directly. Alternatively, you can use PhpAdmin to import CSV data (comma-separated values), which you can export from Excel. Include at least 3 rows in each of the entity relations, and as many rows as you need...

  • Consider the Schema diagram for a university database a. Find the IDs of all students who...

    Consider the Schema diagram for a university database a. Find the IDs of all students who have taken all of the CMPSC courses. Use the division operation. b. Do the same operation as in problem a, using only fundamental operations. student takes ID course id sec id semester 1er 4112 dept_name tot cred grade advisor section course_id sec id semester year building TOOM_10 time_slof_id course course id title dept name credits department dept name building budget time slot time slot...

  • Consider the database schema of college database. Students have a major department and take classes where...

    Consider the database schema of college database. Students have a major department and take classes where faculty can be met. Student (cwid int, name, text, age int, majorDept text) Department (name text, chair text) Faculty (name text, deptName text) Enrollment (facName text, studID int) Note that the underlined attributes are primary keys. studID, chair, deptName of Faculty, facName and majorDept of Student are foreign keys to cwid, name of Faculty, name of Department, name of Faculty and also name of...

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