create table user ( user_id bigint not null auto_increment primary key, user_name varchar(255) ); create table client ( client_id bigint not null auto_increment primary key, client_name varchar(255), client_hourly_rate float ); create table project ( project_id bigint not null auto_increment primary key, project_name varchar(255), project_client_id bigint references client.client_id, project_hourly_rate float ); create table invoice ( invoice_id bigint not null auto_increment primary key, invoice_foreign_id varchar(32), invoice_time datetime ); create table iv ( iv_id bigint not null auto_increment primary key, iv_user_id bigint references user.user_id, iv_project_id bigint references project.project_id, iv_starttime datetime, iv_duration int, iv_workdone varchar(255), iv_hourly_rate float, iv_billable tinyint not null default 1, iv_invoice_id bigint references invoice.invoice_id );