wandervalley - 2014-01-05

This program requires these two tables in "DEJDB" at MSSQL database.

CREATE TABLE [dbo].[set_eod_raw](
    [scode] [varchar](12) NOT NULL,
    [sdate] [varchar](8) NOT NULL,
    [sopen] [varchar](12) NOT NULL,
    [shigh] [varchar](12) NOT NULL,
    [slow] [varchar](12) NOT NULL,
    [sclose] [varchar](12) NOT NULL,
    [vol] [varchar](12) NOT NULL
) ON [PRIMARY] 

CREATE TABLE [dbo].[set_eod](
    [scode] [varchar](12) NOT NULL,
    [sdate] [varchar](8) NOT NULL,
    [sdatetype] [date] NULL,
    [sopen] [decimal](7, 2) NOT NULL,
    [shigh] [decimal](7, 2) NOT NULL,
    [slow] [decimal](7, 2) NOT NULL,
    [sclose] [decimal](7, 2) NOT NULL,
    [vol] [bigint] NOT NULL,
    [change] [decimal](7, 2) NULL,
PRIMARY KEY CLUSTERED 
(
    [scode] ASC,
    [sdate] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]


Since this program developed by Java, and the database persistence technology is JDBC, so the underlying database can be changed. In other words, you can use Oracle or MySQL instead of MSSQL. Just create above 2 tables using the vendor-specific datatype that mappable to required JDBC datatype.

Moreover, the SET_EOD_RAW is the staging table that be there to mitigate this compatible issue, if there any.

 

Last edit: wandervalley 2014-01-05