Question: Write SQL statement to create table student with the following columns Column Data type constraint Studentid number Primary key Stu_Name Varchar2(50) Not null departmentid number
Write SQL statement to create table student with the following columns
| Column | Data type | constraint |
| Studentid | number | Primary key |
| Stu_Name | Varchar2(50) | Not null |
| departmentid | number | foreign key reference table is Department
|
QUESTION 12
-
Consider the following relational schema, where the primary keys are underlined and foreign keys are marked with #:
Class(classNum, cname, room, #facultyID)
Write the relational algebra expression for the following query:
retrieve classNum , cname for all classes.
Note: you can use the following symbols ( ).
Consider the following relational schema, where the primary keys are underlined and foreign keys are marked with #:
Class(classNum, cname, room, #facultyID)
Write the relational algebra expression for the following query:
retrieve classNum , cname for all classes which is used by facultyID = 34.
Note: you can use the following symbols ( ).
Consider the following relational schema, where the primary keys are underlined and foreign keys are marked with #:
Student(studentID, sname, major, level, #deptid)
Class(classNum, cname, Time, room, #teacherID)
Enrolled(#studentID, #classNum)
Teacher(teacherID, fname, #deptid)
Write the relational algebra expression for the following query:
retrieve classNum, cname for classes which student with studentID 20343 enrolled.
Note: you can use the following symbols ( )
Consider the following relational schema, where the primary keys are underlined and foreign keys are marked with #:
Class(classNum, cname, room, #facultyID)
Write the SQL Statement for the following query:
retrieve classNum , cname for all classes which is used by facultyID = 34.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
