Dbms Assignment 2 Sarbajeet Biswal
Dbms Assignment 2 Sarbajeet Biswal
TABLES
APPLICANT:-
CREATE TABLE APPLICANT(
APPLICANT_ID VARCHAR(4),
EMAIL_ID VARCHAR(30),
ADDRESS VARCHAR(50),
CITY VARCHAR(15),
BRANCH:-
CREATE TABLE BRANCH(
COURSE:-
CREATE TABLE COURSE(
COURSE_ID VARCHAR(4),
SEMESTER NUMBER(1),
BRANCH_ID VARCHAR(2),
ELECTIVE CHAR(1),
PROJECT_MARKS NUMBER(3),
ASSIGNMENT_MARKS NUMBER(3),
INTERNAL_MARKS NUMBER(3),
SEMESTER_EXAM_MARKS NUMBER(3),
STUDENT:-
CREATE TABLE STUDENT(
STUDENT_ID VARCHAR(4),
APPLICANT_ID VARCHAR(4),
CURRENT_SEMESTER NUMBER(1),
USER_ID VARCHAR(15),
REGISTRATION:-
CREATE TABLE REGISTRATION(
STUDENT_ID VARCHAR(4),
COURSE_ID VARCHAR(4),
DATE_OF_EXAM DATE,
PROJECT_MARKS NUMBER(3),
ASSIGNMENT_MARKS NUMBER(3),
INTERNAL_MARKS NUMBER(3),
SEMESTER_MARKS NUMBER(3),
GRADE CHAR(1),
CONSTRAINT FK_REG1 FOREIGN KEY(STUDENT_ID) REFERENCES STUDENT(STUDENT_ID),
DEPARTMENT:-
CREATE TABLE DEPARTMENT(
DEPARTMENT_ID NUMBER(2),
HEAD_OF_DEPARTMENT VARCHAR(4),
INSTRUCTOR:-
CREATE TABLE INSTRUCTOR(
INSTRUCTOR_ID VARCHAR(4),
DATE_OF_JOINING DATE,
DEPARTMENT_ID NUMBER(2),
DEPARTMENT:-
ALTER TABLE DEPARTMENT ADD CONSTRAINT FK_DEPART1 FOREIGN
KEY(HEAD_OF_DEPARTMENT) REFERENCES INSTRUCTOR(INSTRUCTOR_ID);
COURSE_ALLOCATION:-
CREATE TABLE COURSE_ALLOCATION(
ALLOCATION_ID VARCHAR(4),
COURSE_ID VARCHAR(4),
INSTRUCTOR_ID VARCHAR(4),
START_DATE DATE,
END_DATE DATE,
HOSTEL:-
CREATE TABLE HOSTEL(
HOSTEL_ID VARCHAR(10),
ROOM_NO NUMBER(3),
STUDENT_ID VARCHAR(4),
HOSTEL_FEE NUMBER(6),
ATTENDANCE:-
CREATE TABLE ATTENDANCE(
STUDENT_ID VARCHAR(4),
COURSE_ID VARCHAR(4),
TOTAL_LECTURE_DAYS NUMBER(3),
NO_OF_DAYS_PRESENT NUMBER(3),
6. List Id of courses whose ending date is before the current system date.
10. List the name of courses which are elective and project marks is equal to 20.
11. List the name of the course in which project marks is greater than the semester marks.
12. List the details of all the applicant who belong to Bangalore, Mysore or Hydrabad
13. List the details of courses which are taught in semester 1, 2 or 3.
14. List the studentId who have secured marks between 80 to 100.
15. List the student details in ascending order of their applicantid.
16. List the details of instructor on ascending order of their date of joining.
17. List the details of instructor on descending order of department no and ascending order
of Joining date.
18. List the name of instructors starting with R and ending with n
19. List the details of instructors whose date of joining is in the month of March.
22. List the course Id which has project Marks in its course detail information.