The document creates several database tables to store user, student, business, and visa application information with identity, primary and foreign keys. Relationships are defined between the tables.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
17 views
Create Table Users
The document creates several database tables to store user, student, business, and visa application information with identity, primary and foreign keys. Relationships are defined between the tables.
TouristInfoID int identity(1,1) primary key, UserID int unique, SecurityClearanceID varchar(25), foreign key (UserID) references Users(userID) on delete cascade on update set null );
create table BusinessmanInfo(
BusinessmanInfoID int identity(1,1) primary key, UserID int unique, foreign key (UserID) references Users(userID) on delete cascade on update set null );
create table BusinessUser(
BusinessUserID int identity(1,1) primary key, BusinessmanInfoID int unique, BusinessName varchar(255), BusinessType varchar(255), BusinessRegID int,
SSCInfoID int identity(1,1) primary key, RollNo varchar (100), InstituteName varchar(255), Percentage float, StudentInfoID int unique, foreign key (StudentInfoID) references StudentInfo(StudentInfoID) on update set null on delete cascade )
create table HSSCInfo(
HSSCInfoID int identity(1,1) primary key, RollNo varchar (100), InstituteName varchar(255), Percentage float, StudentInfoID int unique, foreign key (StudentInfoID) references StudentInfo(StudentInfoID) on update set null on delete cascade )
create table UniversityInfo(
UniversityInfoID int identity(1,1) primary key, RegNo varchar (100), InstituteName varchar(255), DegreeName varchar(100), StartingDate date, GraduationDate date, CurrentCGPA float, StudentInfoID int, foreign key (StudentInfoID) references StudentInfo(StudentInfoID) on update set null on delete cascade )
create table Business(
BusinessID int identity(1,1) primary key, BusinessName varchar(255), BusinessType varchar(255), );
create table EmployeeBusiness(
EmployeeBusinessID int identity(1,1) primary key, UserID int unique, Position varchar(100), HireDate date, BusinessID int unique, foreign key (UserID) references Users(userID) on delete cascade on update set null,
CountryID int identity(1,1) primary key, Name varchar(100) )
create table Staff(
StaffID int identity(1,1) primary key, Name varchar(200), HireDate Date, Salary float, Position varchar(100), Status varchar(100))
create Table VisaApplication (
VisaApplicationID int identity (1,1) primary key, Status varchar(100), PaymentID int unique, CountryID int unique, StaffID int, TimeOfApply time, TimeOfAction time, UserID int foreign key (UserID) references Users(userID) on delete cascade on update set null,