NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

/*
Öğretmen
OgretmenBransı
Universite
UniversiteBolumleri
UniversiteSiniflari
Ders
DersTuru
DersSinif
Donem
Sinav
DersSinav
Soru
*/

If Not Exists(Select * From sys.databases Where name='UniversiteDB')
Create Database UniversiteDB
Go
Use UniversiteDB
Go
Create Table OgretmenBrans
(
BransNo Int Identity,
BransAdi Varchar(30) Not Null,
Constraint PK_OgretmenBrans_BransNo Primary Key(BransNo)
)
Go
Create Table Ogretmen
(
OgretmenNo Int Identity,
OgretmenAdi Varchar(50) Not Null,
OgretmenSoyad Varchar(50) Not Null,
OgretmenTelefon Varchar(10) Not Null,
OgretmenDogumTarihi Date Not Null,
OgretmenEPosta Varchar(20) Not Null,
OgretmenSifre Varchar(30) Not Null,
OgretmenBrans Int Not Null,
Constraint PK_Ogretmen_OgretmenNo Primary Key(OgretmenNo),
Constraint CK_Ogretmen_OgretmenTelefon Check(OgretmenTelefon Like '([0-9][0-9][0-9])[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]'),
Constraint AN_Ogretmen_OgretmenEPosta Unique(OgretmenEPosta),
Constraint FK_Ogretmen_OgretmenBrans Foreign Key(OgretmenBrans) References OgretmenBrans(BransNo)
)
Go
Create Table UniversiteTuru
(
UniversiteTurNo Int Not Null,
UniversiteTurAdi Varchar(50) Not Null,
Constraint PK_UniversiteTuru_UniversiteTurNo Primary Key(UniversiteTurNo)
)
Go
Create Table Universite
(
UniversiteNo Int Not Null,
UniversiteAdi Varchar(50) Not Null,
UniveristeAdresi Varchar(50) Not Null,
UniversiteTelefonNo Varchar(11) Not Null,
UniversiteFaxNo Varchar (11) Not Null,
UniversiteWebSite Varchar(50) Not Null,
UniversiteTuru Int Not Null,
Constraint PK_Universite_UniversiteNo Primary Key(UniversiteNo),
Constraint CK_Universite_UniversiteTelefonNo Check(UniversiteTelefonNo Like '0([1-9][1-9][1-9])[1-9][1-9][1-9] [1-9][1-9] [1-9][1-9]'),
Constraint CK_Universite_UniversiteFaxNo Check(UniversiteFaxNo Like '0([1-9][1-9][1-9])[1-9][1-9][1-9]-[1-9][1-9]-[1-9][1-9]'),
Constraint FK_Universite_UniversiteTuru Foreign Key(UniversiteTuru) References UniversiteTuru(UniversiteTurNo)
)
Go
Create Table Fakulte
(
FakulteNo Int Not Null,
FakulteAdi Varchar(50) Not Null,
FakulteTelefonNo Varchar(11) Not Null,
FakulteFaxNo Varchar(11) Not Null,
FakulteWebSite Varchar(50) Not Null,
Constraint PK_Fakulte_FakulteNo Primary Key(FakulteNo),
Constraint CK_Fakulte_FakulteTelefonNo Check(FakulteTelefonNo Like '0([0-9][0-9][0-9])[0-9][0-9][0-9] [0-9][0-9] [0-9][0-9]'),
Constraint CK_Fakulte_FakulteFaxNo Check(FakulteFaxNo Like '0([0-9][0-9][0-9])[0-9][0-9][0-9]-[01-9][0-9]-[0-9][0-9]')
)
Go
Create Table Bolum
(
BolumNo Int Not Null,
BolumAdi Varchar(50) Not Null,
BolumTelefonNo Varchar(11) Not Null,
Constraint PK_Bolum_BolumNo Primary Key(BolumNo),
Constraint CK_Bolum_BolumTelefonNo Check(BolumTelefonNo Like '0([0-9][0-9][0-9])[0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]')
)
Go
Create Table FEYM
(
Universite Int Not Null,
Fakulte Int Not Null,
Bolum Int Not Null,
Constraint FK_FEYM_Universite Foreign Key(Universite) References Universite(UniversiteNo),
Constraint FK_FEYM_Fakulte Foreign Key(Fakulte) References Fakulte(FakulteNo),
Constraint FK_FEYM_Bolum Foreign Key(Bolum) References Bolum(BolumNo),
)
Go
Create Table Siniflar
(
SinifNo Int Identity,
SinifAdi Varchar(50) Not Null,
OgrenciSayisi Int Not Null,
KizOgrenciSayisi Int Not Null,
ErkekOgrenciSayisi Int Not Null,
Constraint PK_Siniflar_SinifNo Primary Key(SinifNo)
)
Go
Create Table DersTuru
(
TurNo Int Identity,
TurAdi Varchar(50) Not Null,
Constraint PK_DersTuru_TurNo Primary KEy(TurNo)
)
Go
Create Table Dersler
(
DersNo Int Identity,
DersAdi Varchar(30) Not Null,
DersKredisi Int Not Null,
HaftalikDersSaati Int Not Null,
DersTur Int,
Constraint PK_Dersler_DersNo Primary Key(DersNo),
Constraint FK_Dersler_DersTuru Foreign Key(DersTur) References DersTuru(TurNo)
)
Go
Create Table DersSinif
(
Sinif Int,
Ders Int,
Constraint FK_DersSinif_Sinif Foreign Key(Sinif) References Siniflar(SinifNo),
Constraint FK_DersSinif_Ders Foreign Key(Ders) References Dersler(DersNo),
)
Go
Create Table Donem
(
DonemNo Int Identity,
DonemTarih Date Default getDate(),
Constraint PK_Donem_DonemNo Primary Key(DonemNo)
)
Go
Create Table SinavTuru
(
TurNo Int Identity,
TurAdi Varchar(50) Not Null,
Constraint PK_SinavTuru_TurNo Primary KEy(TurNo)
)
Go
Create Table Sinav
(
SinavNo Int Identity,
SinavAdi Varchar(30) Not Null,
SinavTarihi Date Default getDate(),
SinavDonem Int,
SinavTur Int,
SinavOgretmen Int,
SinavUniversite Int,
SinavFakulte Int,
SinavBolum Int,
SinavSinif Int,
SinavDers Int,
Constraint PK_Sinav_SinavNo Primary Key(SinavNo),
Constraint FK_Sİnav_SinavDonem Foreign KEy(SinavDonem) References Donem(DonemNo),
Constraint FK_Sİnav_SinavTur Foreign KEy(SinavTur) References SinavTuru(TurNo),
Constraint FK_Sİnav_SinavOgretmen Foreign KEy(SinavOgretmen) References Ogretmen(OgretmenNo),
Constraint FK_Sİnav_SinavUniversite Foreign KEy(SinavUniversite) References Universite(UniversiteNo),
Constraint FK_Sİnav_SinavFakulte Foreign KEy(SinavFakulte) References Fakulte(FakulteNo),
Constraint FK_Sİnav_SinavBolum Foreign KEy(SinavBolum) References Bolum(BolumNo),
Constraint FK_Sİnav_SinavSinif Foreign KEy(SinavSinif) References Siniflar(SinifNo),
Constraint FK_Sİnav_SinavDers Foreign KEy(SinavDers) References Dersler(DersNo),
)
Go
     
 
what is notes.io
 

Notes.io is a web-based application for 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 12 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

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.