-
Notifications
You must be signed in to change notification settings - Fork 2
/
MYsql_commands.txt
26 lines (16 loc) · 2.34 KB
/
MYsql_commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
create table Employer(CompanyName VARCHAR(20),Location VARCHAR(20),PRIMARY KEY(CompanyName,Location));
create table Clubs_organisations(Name VARCHAR(20),Position VARCHAR(30),PRIMARY KEY(Name,Position));
create table Contact_Details(EnrollmentNumber VARCHAR(20),Address VARCHAR(50),Facebook_profile VARCHAR(50),Github_profile VARCHAR(50),LinkedIn_profile VARCHAR(50),Contact_Number VARCHAR(11) ,Email VARCHAR(50), website_link VARCHAR(100), PRIMARY KEY(EnrollmentNumber) );
create table Higher_Studies(EnrollmentNumber VARCHAR(20),Major VARCHAR(25),Degree VARCHAR(20) ,Institute VARCHAR(20),Passing_Year int(5),PRIMARY KEY(EnrollmentNumber,Passing_Year),Foreign Key( EnrollmentNumber)
References Alumni(EnrollmentNumber));
create table Alumni(EnrollmentNumber VARCHAR(20),Name VARCHAR(25),PassoutYear int(5) ,Degree VARCHAR(20),Branch VARCHAR(10),CurrentState VARCHAR(25) ,Profile_image VARCHAR(40),Cover_image VARCHAR(40),PRIMARY KEY(EnrollmentNumber));
create table Opportunities_for_hiring(EnrollmentNumber VARCHAR(20),Field VARCHAR(50),Company VARCHAR(50),Position VARCHAR(50),PRIMARY KEY(Field,Company,Position),Foreign Key( EnrollmentNumber) References Alumni(EnrollmentNumber));
create table Semester_Exchange(EnrollmentNumber VARCHAR(20),Country VARCHAR(10),Year INT,College_name VARCHAR(20),PRIMARY KEY(EnrollmentNumber),Foreign Key( EnrollmentNumber )References Alumni(EnrollmentNumber));
create table Projects(Course_relation VARCHAR(25),ProjectID VARCHAR(10),Faculty_mentor VARCHAR(10),Field_of_project VARCHAR(10),EnrollmentNumber VARCHAR(20), PRIMARY KEY(ProjectID),Foreign Key( EnrollmentNumber) References Alumni(EnrollmentNumber));
create table Worked_In(EnrollmentNumber VARCHAR(20), CompanyName VARCHAR(20), Location VARCHAR(20), Position VARCHAR(50),JoiningDate VARCHAR(20),Field_of_work VARCHAR(50), LeavingDate VARCHAR(20),PRIMARY KEY(EnrollmentNumber, companyName, Location),
Foreign
Key(EnrollmentNumber) References Alumni(EnrollmentNumber) , Foreign Key(CompanyName, Location) References Employer(CompanyName, Location)
);
create table Contributed_To(EnrollmentNumber VARCHAR(20), Name VARCHAR(20), Position VARCHAR(30), JoiningDate VARCHAR(20), LeavingDate VARCHAR(20), Primary Key(EnrollmentNumber, Position, Name),
Foreign Key(EnrollmentNumber) References Alumni(EnrollmentNumber), Foreign Key(Name,Position) References
Clubs_organisations(Name,Position));