The 3T database

The following SQL statements define the MySQL tables used in 3T. It is possible to use any database, and MySQL-specific code is highlighted to identify differences with ANSI SQL.

The company table

A company has projects for which we need to keep track of the time spent on different tasks. The company is, hence, the first table that needs to be defined. It is a very simple structure:

create table ttt_company(
  id_company  int unsigned not null auto_increment,
  company_name varchar(200) not null,
  primary key(id_company)
);

The auto_increment keyword is used by MySQL to identify a number column that should automatically be incremental (the default rate of increment is by one number) based on the current highest value in the column. This ...

Get Enterprise Application Development with Ext JS and Spring now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.