Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Evidence nemovistosti
- CREATE DATABASE EvidenceNemovistosti;
- use EvidenceNemovitosti;
- */
- create table Majitel(
- MajitelID int identity(1,1) not null primary key,
- Jmeno varchar(20),
- Prijmeni varchar(30),
- Adresa varchar(40),
- Telefni_Cislo int,
- Mesto varchar(30),
- PSC int
- )
- create table Nemovitost(
- NemovitostID int identity(1,1) not null primary key,
- Typ varchar(10),
- Adresa varchar(30),
- PSC int,
- Pocet_pater int,
- MajitelID int references Majitel(MajitelID)
- )
- create table Byt(
- BytID int identity(1,1) not null primary key,
- Patro int,
- Rozloha int,
- Cena_mesicne int
- )
- create table Najemnik
- (NajemnikID int identity(1,1) not null primary key,
- Jmeno varchar(20),
- Prijmeni varchar(30),
- Rocne_cislo int,
- TelCislo int,
- BytID int references Byt(BytID)
- )
- create table Opravy(
- OpravyID int identity(1,1) not null primary key,
- BytID int references Byt(BytID),
- Druh_opravy varchar(50),
- Cena_opravy int
- )
- create table Naklady(
- /* Tady mi beztak něco chybí */
- NajemnikID int references Najemnik(NajemnikID),
- Elektrina int,
- Plyn int,
- Internet int,
- Splatnost int,
- Datum_urazeni int,
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement