NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

--Create database VeterinerDB
go
If Not Exists (Select * from sys.tables where name='Klinik')
Begin
Create table Klinik
(
klinikID Int Identity,
klinikadi varchar(50),
klinikadresi varchar(250),
websitesi varchar(50),
kliniktel varchar(11),
klinikfax varchar(11),
constraint PK_Klinik_klinikID primary key (klinikID),
constraint AN_Klinik_kliniktel Unique(kliniktel),
constraint AN_Klinik_klinikfax Unique(klinikfax),
constraint AN_Klinik_websitesi Unique(websitesi )
--constraint CK_Klinik_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]')

)
End
Else
print 'Klinik İsimli Tablo Daha Önceden Oluşturuldu...'
go
If Not Exists (Select * from sys.tables where name='Veteriner')
Begin
Create table Veteriner
(
veterinerID Int Identity,
veterineradi varchar(50),
veterinergsm varchar(11),
klinikID Int,
constraint PK_Veteriner_veterinerID primary key(veterinerID),
constraint AN_Veteriner_veterinergsm Unique(veterinergsm),
constraint FK_Veteriner_klinikID foreign key (klinikID) references Klinik(klinikID)
)
End
Else
print 'Veteriner İsimli Tablo Daha Önceden Oluşturuldu...'
go
If Not Exists (Select * from sys.tables where name='Musteri')
Begin
Create table Musteri
(
musteriID Int Identity,
musteriadi varchar(50),
musterisoyadi varchar(50),
musteritel varchar(11),
musteriadres varchar(250),
constraint PK_Musteri_musteriID primary key (musteriID),
constraint AN_Musteri_musteritel Unique (musteritel)
)
End
Else
print 'Musteri İsimli Tablo Daha Önceden Oluşturuldu...'
go
If Not Exists (Select * from sys.tables where name='Cinsiyet')
Begin
Create table Cinsiyet
(
cinsiyetID Int Identity,
cinsiyetadi varchar(50),
constraint PK_Cinsiyet_cinsiyetID primary key(cinsiyetID)
)
End
Else
print 'Cinsiyet İsimli Tablo Daha Önceden Oluşturuldu...'
go
If Not Exists (Select * from sys.tables where name='Tur')
Begin
Create table Tur
(
turID Int Identity,
turadi varchar(50),
constraint PK_Tur_turID primary key(turID)
)
End
Else
print 'Tur İsimli Tablo Daha Önceden Oluşturuldu...'
go
If Not Exists (Select * from sys.tables where name='HastaHayvan')
Begin
Create table HastaHayvan
(
hastahayvanID Int Identity,
hastahayvanadi varchar(50),
dogumtarihi date,
cinsiyetID Int,
musteriID Int,
turID Int,
constraint PK_HastaHayvan_hastahayvanID primary key(hastahayvanID ),
constraint FK_HastaHayvan_cinsiyetID foreign key (cinsiyetID) references Cinsiyet(cinsiyetID),
constraint FK_HastaHayvan_musteriID foreign key (musteriID ) references Musteri(musteriID ),
constraint FK_HastaHayvan_turID foreign key (turID ) references Tur(turID )
)
End
Else
print 'HastaHayvan İsimli Tablo Daha Önceden Oluşturuldu...'
go
If Not Exists (Select * from sys.tables where name='HayvanAsi')
Begin
Create table HayvanAsi
(
asiID Int Identity,
asituru varchar(50),
asitarihi datetime,
hastahayvanID Int,
constraint PK_HayvanAsi_asiID primary key (asiID),
constraint FK_HayvanAsi_hastahayvanID foreign key (hastahayvanID) references HastaHayvan (hastahayvanID)

)
End
Else
print 'HayvanAsi İsimli Tablo Daha Önceden Oluşturuldu...'
go
If Not Exists (Select * from sys.tables where name='Mhsb')
Begin
Create table Mhsb
(
--mhsbID Int Identity,
teshisID Int,
hastahayvanID Int,
musteriID Int,
Ucret money,
tarih datetime,
--constraint PK_Mhsb_mhsbID primary key (mhsbID),
constraint FK_Mhsb_teshisID foreign key (teshisID) references HayvanTeshis(teshisID),
constraint FK_Mhsb_hastahayvanID foreign key (hastahayvanID) references HastaHayvan(hastahayvanID),
constraint FK_Mhsb_teshisID foreign key (musteriID) references Musteri(musteriID),

)
End
Else
print 'Mhsb İsimli Tablo Daha Önceden Oluşturuldu...'
go
If Not Exists (Select * from sys.tables where name='HayvanTeshis')
Begin
Create table HayvanTeshis
(
teshisID Int Identity,
veterinerID Int,
hastahayvanID Int,
acıklama varchar(250),
teshistarihi datetime,
constraint PK_HayvanTeshis_teshisID primary key(teshisID ),
constraint FK_HayvanTeshis_veterinerID foreign key(veterinerID) references Veteriner(veterinerID),
constraint FK_HayvanTeshis_hastahayvanID foreign key(hastahayvanID) references HastaHayvan(hastahayvanID)
)
End
Else
print 'HayvanTeshis İsimli Tablo Daha Önceden Oluşturuldu...'
     
 
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.