--Faculty nomli table yaratish: CREATE TABLE faculty ( FacultyID int NOT NULL, FacultyName varchar(255) NOT NULL, PRIMARY KEY (FacultyID));
--Loads table yaratish kodi:
CREATE TABLE loads( YuklamaId int NOT NULL, GuruhRaqam varchar(25) DEFAULT NULL, YuklanganSana date DEFAULT NULL, MavzuId int DEFAULT NULL, PRIMARY KEY (YuklamaId),
--Subject nomli table yaratish jarayoni kod qismi:
create table subjects( s_id int not null, MavzuNomi varchar(50), MavzuSoati int(3) , FanId int(5) not null, primary key(s_id)); Table ni ko’rish uchun kod qismi:
desc subjects;
--Sciences nomli table yaratish :
create table sciences(FanId int(5) not null primary key, FanNomi varchar(50));
teachers table yaratish kodi:
CREATE TABLE teachers( ID int NOT NULL AUTO_INCREMENT, OqtuvchiId int NOT NULL, FIO varchar(50) DEFAULT NULL, Lavozimi varchar(25) DEFAULT NULL, Tajribasi int DEFAULT NULL, yukID int DEFAULT NULL, facultyID int DEFAULT NULL, PRIMARY KEY (ID));
--Subject jadvaliga sciences jadvalini ulash: alter table subjects -> add foreign key(FanId) references sciences(FanId); Bizdagi umumiy jadvallar ro’yhati quydagicha: