Notes
![]() ![]() Notes - notes.io |
Use Go Odev2
create table VeliTable
(
VeliID int identity,
VeliTC varchar(11),
veliad varchar(50),
VeliSoyadi varchar(50),
Constraint PK_veli_VeliID primary key(VeliID),
Constraint CK_veli_VeliTC Check (VeliTC LIKE '[1-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'),
Constraint AN_veli_VeliTC unique (VeliTC),
)
Go
Create table PuanTable
(
PuanID Int Identity,
Puan Int,
Constraint PK_puan_PuanID primary key (PuanID),
Constraint CK_puan_puan check (Puan LIKE '0-100')
)
go
Create table SinifOgretmeni
(
SinifOgretmeniID Int Identity,
SinifOgretmeniadi varchar(50),
PuanID Int,
constraint PK_SinifOgretmeni_SinifOgretmeniID primary key (SinifOgretmeniID),
constraint FK_SinifOgretmeni_PuanID foreign key (PuanID) references PuanTable(PuanID),
)
go
Create table Veliogretmenpuanlama
(
VOPid Int Identity,
VeliID Int,
PuanID Int,
SinifOgretmeniID Int,
Puantarihi Date,
Constraint PK_Veliogretmenpuanlama_VOPid primary key (VOPid),
Constraint FK_Veliogretmenpuanlama_VeliID foreign key (VeliID) references VeliTable(VeliID),
Constraint FK_Veliogretmenpuanlama_PuanID foreign key (PuanID) references PuanTable(PuanID),
Constraint FK_Veliogretmenpuanlama_SinifOgretmeniID foreign key (SinifOgretmeniID) references SinifOgretmeni(SinifOgretmeniID),
)
go
Create table Okul
(
Okulid Int Identity,
Okuladi varchar(50),
Okultürü varchar(50),
constraint PK_Okul_Okulid primary key (Okulid)
)
go
Create table Sınıf
(
SinifID Int Identity,
SinifAd varchar(10),
SinifOgretmeniID Int,
Okulid Int,
constraint PK_Sınıf_SinifID primary key (SinifID),
constraint FK_Sınıf_SinifOgretmeniID foreign key (SinifOgretmeniID) references SinifOgretmeni (SinifOgretmeniID),
constraint FK_Sınıf_Okulid foreign key (Okulid) references Okul (Okulid)
)
Go
Create table Dersler
(
DersID Int Identity,
DersAdi varchar(25),
DersSaat varchar(5),
Okulid Int,
constraint PK_Dersler_DersID primary key (DersID),
constraint FK_Dersler_Okulid foreign key (Okulid) references Okul(Okulid)
)
go
Create table Ogrenci
(
OgrenciID Int Identity,
OgrenciTC varchar(11),
OkulNo varchar(25),
OgrenciAd varchar(50),
OgrenciSoyad varchar(50),
SinifID Int,
DersID Int,
VeliID Int,
SinifOgretmeniID Int,
constraint PK_Ogrenci_OgrenciID primary key (OgrenciID),
Constraint FK_Ogrenci_SinifID foreign key(SinifID) References Sınıf(SinifID),
Constraint FK_Ogrenci_DersID foreign key(DersID) References Dersler(DersID),
Constraint FK_Ogrenci_VeliID foreign key (VeliID)References VeliTable(VeliID),
Constraint FK_Ogrenci_SinifOgretmeniID foreign key (SinifOgretmeniID)References SinifOgretmeni(SinifOgretmeniID),
Constraint CK_Ogrenci_Ogrencitc Check (Ogrencitc LIKE '[1-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'),
Constraint AN_Ogrenci_OkulNo unique (OkulNo),
Constraint AN_Ogrenci_Ogrencitc unique (Ogrencitc),
)
Go
Create table Brans
(
BransID Int Identity,
BransAd varchar(50),
constraint PK_Brans_BransID primary key (BransID)
)
go
Create table Yetki
(
YetkiID Int Identity,
YetkiAd varchar(50),
Constraint PK_Yetki_YetkiID primary key (YetkiID)
)
go
Create table Unvan
(
UnvanID Int Identity,
UnvanAd varchar(50),
YetkiID Int,
Constraint PK_Unvan_UnvanID primary key (UnvanID),
Constraint FK_Unvan_YetkiID foreign key (YetkiID) References Yetki(YetkiID)
)
go
Create table Ogretmen
(
OgretmenID Int Identity,
OgretmenTC varchar(11),
OgretmenAd varchar(50),
OgretmenSoyad varchar(50),
Dogumtarihi date,
GorevBT date,
BransID Int,
DersID Int,
SinifID Int,
Okulid Int,
UnvanID Int,
constraint PK_Ogretmen_OgretmenID primary key (OgretmenID),
Constraint AN_Ogretmen_OgretmenTC unique (OgretmenTC),
Constraint CK_Ogretmen_OgretmenTC Check (OgretmenTC LIKE '[1-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'),
Constraint FK_Ogretmen_BransID foreign key(BransID) References Brans(BransID),
Constraint FK_Ogretmen_DersID foreign key(DersID) References Dersler(DersID),
Constraint FK_Ogretmen_SinifID foreign key(SinifID) References Sınıf(SinifID),
Constraint FK_Ogretmen_Okulid foreign key(Okulid) References Okul(Okulid),
Constraint FK_Ogretmen_UnvanID foreign key(UnvanID) References Unvan(UnvanID),
)
Go
Create table OgrenciOgretmenPuanlama
(
OOPid Int Identity,
OgrenciID Int,
PuanID Int,
OgretmenID Int,
PuanTarihi Date,
Constraint PK_OgrenciOgretmenPuanlama_OOPid primary key (OOPid),
Constraint FK_OgrenciOgretmenPuankama_OgrenciID foreign key (OgrenciID) References Ogrenci(OgrenciID),
Constraint FK_OgrenciOgretmenPuankama_PuanID foreign key (PuanID) References PuanTable(PuanID),
Constraint FK_OgrenciOgretmenPuankama_OgretmenID foreign key (OgretmenID) References Ogretmen(OgretmenID),
)
go
Create table Yonetici
(
YoneticiID Int Identity,
YoneticiAdi Int,
UnvanID Int,
Constraint PK_Yonetici_YoneticiID primary key (YoneticiID),
Constraint FK_Yonetici_UnvanID foreign key (UnvanID) references Unvan (UnvanID)
)
go
Create table YoneticiOgretmenPuanlama
(
YOPid Int Identity,
YoneticiID Int,
PuanID Int,
OgretmenID Int,
Puantarihi date,
Constraint PK_YoneticiOgretmenPuanlama_YOPid primary key (YOPid),
Constraint FK_YoneticiOgretmenPuanlama_YoneticiID foreign key (YoneticiID) references Yonetici (YoneticiID),
Constraint FK_YoneticiOgretmenPuanlama_PuanID foreign key (PuanID) references PuanTable (PuanID),
Constraint FK_YoneticiOgretmenPuanlama_OgretmenID foreign key (OgretmenID) references Ogretmen (OgretmenID)
)
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team