create table [Bicycle]
(
[ID] int IDENTITY(1,1) not null,
[Brand] varchar(20) not null,
[RentPrice] int not null, -- цена аренды
primary key(ID)
)
create table [Client]
(
[ID] int IDENTITY(1,1) not null,
[Name] varchar(10) not null,
[Passport] varchar(50) not null,
[Country] varchar(50) not null,
primary key(ID)
)
create table [RentBook] -- аренда велосипеда клиентом
(
[ID] int IDENTITY(1,1) not null,
[Date] date not null, -- дата аренды
[Time] int not null, -- время на сколько взята аренда в часах
[Paid] bit not null, -- 1 оплатил; 0 не оплатил
[BicycleID] int not null,
[ClientID] int not null,
FOREIGN KEY ([BicycleID]) REFERENCES [Bicycle] ([ID]),
FOREIGN KEY ([ClientID]) REFERENCES [Client] ([ID])
)