-- create tables create table ch24_cars ( id number generated by default on null as identity constraint ch24_cars_id_pk primary key, make varchar2(12 char) not null, carmodel varchar2(8 char) not null, fuel_type varchar2(10 char), doors integer not null, color varchar2(6 char), rent_price number default '100', carphoto varchar2(512 char) ) ; create table ch24_customers ( id number generated by default on null as identity constraint ch24_customers_id_pk primary key, fname varchar2(10 char) not null, lname varchar2(50 char) not null, address varchar2(100 char) not null, zipcode varchar2(10 char), city varchar2(10 char) default 'SERRES', cardid varchar2(20 char), telephone_work varchar2(10 char), mobile varchar2(10 char), email varchar2(50 char), comments varchar2(512 char) ) ; create table ch24_rentcar ( id number generated by default on null as identity constraint ch24_rentcar_id_pk primary key, carid_id number constraint ch24_rentcar_carid_id_fk references ch24_cars on delete cascade, custid_id number constraint ch24_rentcar_custid_id_fk references ch24_customers on delete cascade, rent_date date not null, return_date date not null, damage varchar2(50 char), damage_cost number, totalcost number ) ; -- table index create index ch24_rentcar_i1 on ch24_rentcar (carid_id); create index ch24_rentcar_i62 on ch24_rentcar (custid_id);