-- ================================================================================
--   db2 SQL DDL Script File
-- ================================================================================


-- ===============================================================================
-- 
--   Generated by:      tedia2sql -- v1.2.12
--                      See http://tedia2sql.tigris.org/AUTHORS.html for tedia2sql author information
-- 
--   Target Database:   db2
--   Generated at:      Thu Dec  6 01:55:55 2007
--   Input Files:       employee.dia
-- 
-- ================================================================================



-- Generated SQL Constraints Drop statements
-- --------------------------------------------------------------------
--     Target Database:   db2
--     SQL Generator:     tedia2sql -- v1.2.12
--     Generated at:      Thu Dec  6 01:55:55 2007
--     Input Files:       employee.dia



-- Generated Permissions Drops
-- --------------------------------------------------------------------
--     Target Database:   db2
--     SQL Generator:     tedia2sql -- v1.2.12
--     Generated at:      Thu Dec  6 01:55:55 2007
--     Input Files:       employee.dia




-- Generated SQL View Drop Statements
-- --------------------------------------------------------------------
--     Target Database:   db2
--     SQL Generator:     tedia2sql -- v1.2.12
--     Generated at:      Thu Dec  6 01:55:55 2007
--     Input Files:       employee.dia



-- Generated SQL Schema Drop statements
-- --------------------------------------------------------------------
--     Target Database:   db2
--     SQL Generator:     tedia2sql -- v1.2.12
--     Generated at:      Thu Dec  6 01:55:55 2007
--     Input Files:       employee.dia

drop table employee ;
drop table department ;


-- Generated SQL Schema
-- --------------------------------------------------------------------
--     Target Database:   db2
--     SQL Generator:     tedia2sql -- v1.2.12
--     Generated at:      Thu Dec  6 01:55:55 2007
--     Input Files:       employee.dia


-- employee
create table employee (
  employee_id                int generated by default as identity  not null,
  department_id             int not null,
  first_name                varchar(255) not null,
  last_name                 varchar(255),
  start_date                date,
  constraint pk_Employee primary key (employee_id)
) ;

-- department
create table department (
  department_id              int generated by default as identity  not null,
  name                      varchar(255) not null,
  constraint pk_Department primary key (department_id)
) ;




-- Generated SQL Views
-- --------------------------------------------------------------------
--     Target Database:   db2
--     SQL Generator:     tedia2sql -- v1.2.12
--     Generated at:      Thu Dec  6 01:55:55 2007
--     Input Files:       employee.dia




-- Generated Permissions
-- --------------------------------------------------------------------
--     Target Database:   db2
--     SQL Generator:     tedia2sql -- v1.2.12
--     Generated at:      Thu Dec  6 01:55:55 2007
--     Input Files:       employee.dia



-- Generated SQL Insert statements
-- --------------------------------------------------------------------
--     Target Database:   db2
--     SQL Generator:     tedia2sql -- v1.2.12
--     Generated at:      Thu Dec  6 01:55:55 2007
--     Input Files:       employee.dia


-- inserts for department (department_id,name)
insert into department (department_id,name) values ( 1,'Marketing' ) ;
insert into department (department_id,name) values ( 2,'Production' ) ;
insert into department (department_id,name) values ( 3,'Design' ) ;


-- Generated SQL Constraints
-- --------------------------------------------------------------------
--     Target Database:   db2
--     SQL Generator:     tedia2sql -- v1.2.12
--     Generated at:      Thu Dec  6 01:55:55 2007
--     Input Files:       employee.dia


