0% found this document useful (0 votes)
13 views1 page

College

The document creates tables for students, semesters and sections, subjects, and a joining table to map students to their semester and section along with subject codes and details.

Uploaded by

MANOJ N R NESWI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1 page

College

The document creates tables for students, semesters and sections, subjects, and a joining table to map students to their semester and section along with subject codes and details.

Uploaded by

MANOJ N R NESWI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

CREATE TABLE STUDENTS

(
USN VARCHAR(20) PRIMARY KEY,
SNAME VARCHAR(20),
ADDRESS VARCHAR(100),
PHONE INT,
GENDER VARCHAR(2)
);

CREATE TABLE SEMSEC


(
SS_ID VARCHAR(20) PRIMARY KEY,
SEM VARCHAR(2),
SEC VARCHAR(2)
);

CREATE TABLE CLASS


(
USN VARCHAR(20),
SS_ID VARCHAR(20),
PRIMARY KEY (USN,SS_ID),
FOREIGN KEY (USN) REFERENCES STUDENTS (USN),
FOREIGN KEY (SS_ID) REFERENCES SEMSEC (SS_ID)
);

CREATE TABLE SUBJECT


(
SUBCODE VARCHAR(20) PRIMARY KEY,
TITLE VARCHAR(20),
SUM VARCHAR(4),
CREDIT INT
);

You might also like