email VARCHAR(100)  NOT NULL default   ,
  company VARCHAR(50)  default NULL,
  street VARCHAR(40)  default NULL,
  zip VARCHAR(12)  default NULL,
  city VARCHAR(40)  default NULL,
  status INT  NOT NULL default 1,
  solutation VARCHAR(12)  default NULL,
  loginname VARCHAR(10)  default NULL,
  password VARCHAR(10)  default NULL,
  telephone VARCHAR(30)  default NULL,
  fax VARCHAR(40)  default NULL,
  customer_no VARCHAR(12)  default NULL,
  PRIMARY KEY  (id)
  );
  
   Table structure for table  shopping_cart 
  
CREATE TABLE shopping_cart ( 
  sc_id INT  NOT NULL GENERATED BY DEFAULT AS IDENTITY,
  user_id INT  default NULL,
  cnt INT  default NULL,
  cat_id INT  default NULL,
  status VARCHAR(10)  default NULL,
  PRIMARY KEY  (sc_id)
  );
These scripts are created considering that we will go for default schema mapping 
from MySQL to DB2 UDB as discussed in 5.1,  Data type mapping  on page 90. 
This is according to the MTK recommended mapping, but you may decide to 
define some different mapping. If your application requires any mapping 
changes, this is a time to do it. For example, in our case we want the DB2 table 
SHOPPING_CART to have different columns names instead of above defined, 
additional column for the address and change in status column size.
We can change them to the one as shown in Example 5 19.
Example 5 19   Change in the default scripts
CREATE TABLE shopping_cart ( 
  sc_id INT  NOT NULL GENERATED BY DEFAULT AS IDENTITY,
  user_id INT  default NULL,
  quantity INT  default NULL,
  catalog_id INT  default NULL,
  status VARCHAR(20)  default NULL,
  address VARCHAR(100) default NULL,
  primary key (sc_id)
 Chapter 5. Database porting 
123






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

san diego web hosting

 

Our partners: PHP: Hypertext Preprocessor Cheap Web Hosting JSP Web Hosting Ontario Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Java Hosting Cheapest Hosting

Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved