java program format is
java stockReader [directory of csv files]
File format
[Market]_[date].csv
Inside [login to view URL] the first line is
AACC 9-Jan-09 5.41 5.41 4.97 4.97 55400
you will write into stockSymbols
Market = NASDAQ
Symbol = AACC
if NASDAQ + AACC exists you will not write it. there is a unique key (Market,Symbol)
get the StockId
then write the Date, Open, High, Low, Close, Volume to dailyStockPrices
Table format is
create table stockSymbols
(
StockId int auto_increment primary key,
Market text not null,
Symbol text not null
);
create table dailyStockPrices
(
StockId int not null,
StockDate date not null,
StockOpen decimal(20,2) not null,
StockHigh decimal(20,2) not null,
StockLow decimal(20,2) not null,
StockClose decimal(20,2) not null,
StockVolume int not null
);