0% found this document useful (0 votes)
47 views3 pages

Musno Integer, Tckimlikno Integer, Adi - Soyadi Char (20), Telefon Integer, Adres Char (50)

The document describes the creation of 6 database tables - Musteri, Model, Marka, Kategori, Arac, and Kiralama. Each table is defined with its columns and primary/foreign keys. The tables establish a database to store customer, vehicle, rental, and reference data for a car rental company.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views3 pages

Musno Integer, Tckimlikno Integer, Adi - Soyadi Char (20), Telefon Integer, Adres Char (50)

The document describes the creation of 6 database tables - Musteri, Model, Marka, Kategori, Arac, and Kiralama. Each table is defined with its columns and primary/foreign keys. The tables establish a database to store customer, vehicle, rental, and reference data for a car rental company.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

2.

Musteri (MusNo, TCKimlikNo, Adi_Soyadi, Telefon, Adres)

Arac (AracNo, ModelKodu, MarkaKodu, KategoriNo, Plaka)

Kiralama (KiralamaNo, MusNo, AracNo, KiralamaTarihi, TeslimTarihi, Ucret)

Model (ModelKodu, ModelAdi)

Marka (MarkaKodu, MarkaAdi)

Kategori (KategoriNo, KategoriAdi)

3.

CREATE TABLE Musteri (

MusNo INTEGER,

TCKimlikNo INTEGER,

Adi_Soyadi CHAR (20),

Telefon INTEGER,

Adres CHAR (50),

PRIMARY KEY (MusNo),

UNIQUE (TCKimlikNo) )

CREATE TABLE Model (

ModelKodu CHAR(10),

ModelAdi CHAR (10),

PRIMARY KEY (ModelKodu) )

CREATE TABLE Marka (

MarkaKodu CHAR (10),

MarkaAdi CHAR (10),

PRIMARY KEY (MarkaKodu) )


CREATE TABLE Kategori (

KategoriNo INTEGER,

KategoriAdi CHAR (10),

PRIMARY KEY (KategoriNo) )

CREATE TABLE Arac (

AracNo INTEGER,

ModelKodu CHAR (10),

MarkaKodu CHAR (10),

KategoriNo INTEGER,

Plaka CHAR (10),

PRIMARY KEY (AracNo),

UNIQUE (Plaka),

FOREIGN KEY (ModelKodu) REFERENCES Model (ModelKodu)

ON DELETE SET NULL

ON UPDATE CASCADE,

FOREIGN KEY (MarkaKodu) REFERENCES Marka (MarkaKodu)

ON DELETE SET NULL

ON UPDATE CASCADE,

FOREIGN KEY (KategoriNo) REFERENCES Kategori (KategoriNo)

ON DELETE SET NULL

ON UPDATE CASCADE )
CREATE TABLE Kiralama (

KiralamaNo INTEGER,

MusNo INTEGER,

AracNo INTEGER,

KiralamaTarihi DATE,

TeslimTarihi DATE,

Ucret FLOAT,

PRIMARY KEY (KiralamaNo),

FOREIGN KEY (MusNo) REFERENCES Musteri (MusNo)

ON DELETE SET NULL

ON UPDATE CASCADE,

FOREIGN KEY (AracNo) REFERENCES Arac (AracNo)

ON DELETE SET NULL

ON UPDATE CASCADE )

You might also like