text: create table MEMBER(
  	MEMBER_ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  	MEMBER_NAME TEXT NOT NULL,
  	MEMBER_ACCOUNT TEXT NOT NULL,
  	MEMBER_STATUS_CODE TEXT NOT NULL REFERENCES MEMBER_STATUS(MEMBER_STATUS_CODE),
  	FORMALIZED_DATETIME DATETIME,
  	BIRTHDATE DATE,
  	MEMBER_REGISTER_DATETIME DATETIME NOT NULL,
  	MEMBER_REGISTER_USER TEXT NOT NULL,
  	MEMBER_REGISTER_PROCESS TEXT NOT NULL,
  	MEMBER_UPDATE_DATETIME DATETIME NOT NULL,
  	MEMBER_UPDATE_USER TEXT NOT NULL,
  	MEMBER_UPDATE_PROCESS TEXT NOT NULL,
  	VERSION_NO INTEGER NOT NULL
  );
  
  
  create table MEMBER_ADDRESS(
  	MEMBER_ADDRESS_ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  	MEMBER_ID INTEGER NOT NULL REFERENCES MEMBER(MEMBER_ID),
  	VALID_BEGIN_DATE DATE NOT NULL,
  	VALID_END_DATE DATE NOT NULL,
  	ADDRESS TEXT NOT NULL,
  	REGION_ID INTEGER NOT NULL REFERENCES REGION(REGION_ID),
  	REGISTER_DATETIME DATETIME NOT NULL,
  	REGISTER_PROCESS TEXT NOT NULL,
  	REGISTER_USER TEXT NOT NULL,
  	UPDATE_DATETIME DATETIME NOT NULL,
  	UPDATE_PROCESS TEXT NOT NULL,
  	UPDATE_USER TEXT NOT NULL,
  	VERSION_NO INTEGER NOT NULL
  );
  
  
  create table MEMBER_LOGIN(
  	MEMBER_LOGIN_ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  	MEMBER_ID INTEGER NOT NULL REFERENCES MEMBER(MEMBER_ID),
  	LOGIN_DATETIME DATETIME NOT NULL,
  	MOBILE_LOGIN_FLG INTEGER NOT NULL,
  	LOGIN_MEMBER_STATUS_CODE TEXT NOT NULL REFERENCES MEMBER_STATUS(MEMBER_STATUS_CODE)
  );
  
  
  create table MEMBER_SECURITY(
  	MEMBER_ID INTEGER NOT NULL PRIMARY KEY REFERENCES MEMBER(MEMBER_ID),
  	LOGIN_PASSWORD TEXT NOT NULL,
  	REMINDER_QUESTION TEXT NOT NULL,
  	REMINDER_ANSWER TEXT NOT NULL,
  	REMINDER_USE_COUNT INTEGER NOT NULL,
  	REGISTER_DATETIME DATETIME NOT NULL,
  	REGISTER_PROCESS TEXT NOT NULL,
  	REGISTER_USER TEXT NOT NULL,
  	UPDATE_DATETIME DATETIME NOT NULL,
  	UPDATE_PROCESS TEXT NOT NULL,
  	UPDATE_USER TEXT NOT NULL,
  	VERSION_NO INTEGER NOT NULL
  );
  
  
  create table MEMBER_SERVICE(
      MEMBER_SERVICE_ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
      MEMBER_ID INTEGER NOT NULL REFERENCES MEMBER(MEMBER_ID),
      SERVICE_POINT_COUNT INTEGER NOT NULL,
      SERVICE_RANK_CODE TEXT NOT NULL REFERENCES SERVICE_RANK(SERVICE_RANK_CODE),
      REGISTER_DATETIME DATETIME NOT NULL,
      REGISTER_USER TEXT NOT NULL,
      UPDATE_DATETIME DATETIME NOT NULL,
      UPDATE_USER TEXT NOT NULL,
      VERSION_NO INTEGER NOT NULL
  );
  
  
  create table MEMBER_WITHDRAWAL(
  	MEMBER_ID INTEGER NOT NULL PRIMARY KEY REFERENCES MEMBER(MEMBER_ID),
  	WITHDRAWAL_REASON_CODE TEXT REFERENCES WITHDRAWAL_REASON(WITHDRAWAL_REASON_CODE),
  	WITHDRAWAL_REASON_INPUT_TEXT TEXT,
  	WITHDRAWAL_DATETIME DATETIME NOT NULL,
  	REGISTER_DATETIME DATETIME NOT NULL,
  	REGISTER_PROCESS TEXT NOT NULL,
  	REGISTER_USER TEXT NOT NULL,
  	UPDATE_DATETIME DATETIME NOT NULL,
  	UPDATE_PROCESS TEXT NOT NULL,
  	UPDATE_USER TEXT NOT NULL,
  	VERSION_NO INTEGER NOT NULL
  );
  
  
  create table PURCHASE(
  	PURCHASE_ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  	MEMBER_ID INTEGER NOT NULL REFERENCES MEMBER(MEMBER_ID),
  	PRODUCT_ID INTEGER NOT NULL REFERENCES PRODUCT(PRODUCT_ID),
  	PURCHASE_DATETIME DATETIME NOT NULL,
  	PURCHASE_COUNT INTEGER NOT NULL,
  	PURCHASE_PRICE INTEGER NOT NULL,
  	PAYMENT_COMPLETE_FLG INTEGER NOT NULL,
  	PURCHASE_REGISTER_DATETIME DATETIME NOT NULL,
  	PURCHASE_REGISTER_USER TEXT NOT NULL,
  	PURCHASE_REGISTER_PROCESS TEXT NOT NULL,
  	PURCHASE_UPDATE_DATETIME DATETIME NOT NULL,
  	PURCHASE_UPDATE_USER TEXT NOT NULL,
  	PURCHASE_UPDATE_PROCESS TEXT NOT NULL,
  	VERSION_NO INTEGER NOT NULL
  );
  
  
  create table PURCHASE_PAYMENT(
      PURCHASE_PAYMENT_ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
      PURCHASE_ID INTEGER NOT NULL,
      PAYMENT_AMOUNT DECIMAL(10,2) NOT NULL,
      PAYMENT_DATETIME DATETIME NOT NULL,
      PAYMENT_METHOD_CODE CHAR(3) NOT NULL,
      REGISTER_DATETIME DATETIME NOT NULL,
      REGISTER_USER VARCHAR(200) NOT NULL,
      REGISTER_PROCESS TEXT NOT NULL,
      UPDATE_DATETIME DATETIME NOT NULL,
      UPDATE_USER VARCHAR(200) NOT NULL,
      VERSION_NO INTEGER NOT NULL
  );
  
  
  create table PRODUCT(
  	PRODUCT_ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  	PRODUCT_NAME TEXT NOT NULL,
  	PRODUCT_HANDLE_CODE TEXT NOT NULL,
  	PRODUCT_CATEGORY_CODE CHAR(3) NOT NULL,
  	PRODUCT_STATUS_CODE TEXT NOT NULL REFERENCES PRODUCT_STATUS(PRODUCT_STATUS_CODE),
  	REGULAR_PRICE INTEGER NOT NULL,
  	REGISTER_DATETIME DATETIME NOT NULL,
  	REGISTER_USER TEXT NOT NULL,
  	REGISTER_PROCESS TEXT NOT NULL,
  	UPDATE_DATETIME DATETIME NOT NULL,
  	UPDATE_USER TEXT NOT NULL,
  	UPDATE_PROCESS TEXT NOT NULL,
  	VERSION_NO INTEGER NOT NULL
  );
  
  
  create table PRODUCT_CATEGORY(
      PRODUCT_CATEGORY_CODE TEXT NOT NULL PRIMARY KEY,
      PRODUCT_CATEGORY_NAME TEXT NOT NULL,
      PARENT_CATEGORY_CODE TEXT
  );
  
  
  create table PRODUCT_STATUS(
  	PRODUCT_STATUS_CODE TEXT NOT NULL PRIMARY KEY,
  	PRODUCT_STATUS_NAME TEXT NOT NULL,
  	DISPLAY_ORDER INTEGER NOT NULL
  );
  
  
  create table REGION(
      REGION_ID INTEGER NOT NULL PRIMARY KEY,
      REGION_NAME TEXT NOT NULL
  );
  
  
  create table SERVICE_RANK(
      SERVICE_RANK_CODE TEXT NOT NULL PRIMARY KEY,
      SERVICE_RANK_NAME TEXT NOT NULL,
      SERVICE_POINT_INCIDENCE REAL NOT NULL,
      NEW_ACCEPTABLE_FLG INTEGER NOT NULL,
      DESCRIPTION TEXT NOT NULL,
      DISPLAY_ORDER INTEGER NOT NULL
  );
  
  create table MEMBER_STATUS(
  	MEMBER_STATUS_CODE TEXT NOT NULL PRIMARY KEY,
  	MEMBER_STATUS_NAME TEXT NOT NULL,
  	DESCRIPTION TEXT NOT NULL,
  	DISPLAY_ORDER INTEGER NOT NULL
  );
  
  
  create table WITHDRAWAL_REASON(
  	WITHDRAWAL_REASON_CODE TEXT NOT NULL PRIMARY KEY,
  	WITHDRAWAL_REASON_TEXT TEXT NOT NULL,
  	DISPLAY_ORDER INTEGER NOT NULL
  );
  
  
  CREATE UNIQUE INDEX UQ_MEMBER_MEMBER_ACCOUNT ON MEMBER(MEMBER_ACCOUNT) ;