geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viol...@apache.org
Subject svn commit: r1156572 - in /geronimo/daytrader/trunk: bin/ bin/dbscripts/ bin/dbscripts/db2/ bin/dbscripts/derby/ bin/dbscripts/oracle/ bin/dbscripts/sqlserver/ javaee6/assemblies/daytrader-ear/
Date Thu, 11 Aug 2011 11:07:38 GMT
Author: violalu
Date: Thu Aug 11 11:07:37 2011
New Revision: 1156572

URL: http://svn.apache.org/viewvc?rev=1156572&view=rev
Log:
add dbscripts folder

Added:
    geronimo/daytrader/trunk/bin/
    geronimo/daytrader/trunk/bin/dbscripts/
    geronimo/daytrader/trunk/bin/dbscripts/db2/
    geronimo/daytrader/trunk/bin/dbscripts/db2/Table.ddl
    geronimo/daytrader/trunk/bin/dbscripts/derby/
    geronimo/daytrader/trunk/bin/dbscripts/derby/Table.ddl
    geronimo/daytrader/trunk/bin/dbscripts/derby/createDerbyDB.bat
    geronimo/daytrader/trunk/bin/dbscripts/derby/createDerbyDB.sh
    geronimo/daytrader/trunk/bin/dbscripts/oracle/
    geronimo/daytrader/trunk/bin/dbscripts/oracle/Table.ddl
    geronimo/daytrader/trunk/bin/dbscripts/sqlserver/
    geronimo/daytrader/trunk/bin/dbscripts/sqlserver/Table.sql
Modified:
    geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/pom.xml

Added: geronimo/daytrader/trunk/bin/dbscripts/db2/Table.ddl
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/bin/dbscripts/db2/Table.ddl?rev=1156572&view=auto
==============================================================================
--- geronimo/daytrader/trunk/bin/dbscripts/db2/Table.ddl (added)
+++ geronimo/daytrader/trunk/bin/dbscripts/db2/Table.ddl Thu Aug 11 11:07:37 2011
@@ -0,0 +1,107 @@
+--    Licensed to the Apache Software Foundation (ASF) under one or more
+--    contributor license agreements.  See the NOTICE file distributed with
+--    this work for additional information regarding copyright ownership.
+--    The ASF licenses this file to You under the Apache License, Version 2.0
+--    (the "License"); you may not use this file except in compliance with
+--    the License.  You may obtain a copy of the License at
+--
+--       http://www.apache.org/licenses/LICENSE-2.0
+--
+--    Unless required by applicable law or agreed to in writing, software
+--    distributed under the License is distributed on an "AS IS" BASIS,
+--    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+--    See the License for the specific language governing permissions and
+--    limitations under the License.
+
+
+DROP TABLE HOLDINGEJB;
+DROP TABLE ACCOUNTPROFILEEJB;
+DROP TABLE QUOTEEJB;
+DROP TABLE KEYGENEJB;
+DROP TABLE ACCOUNTEJB;
+DROP TABLE ORDEREJB;
+
+CREATE TABLE HOLDINGEJB
+  (PURCHASEPRICE DECIMAL(14, 2),
+   HOLDINGID INTEGER NOT NULL,
+   QUANTITY DOUBLE NOT NULL,
+   PURCHASEDATE TIMESTAMP,
+   ACCOUNT_ACCOUNTID INTEGER,
+   QUOTE_SYMBOL VARCHAR(250));
+
+ALTER TABLE HOLDINGEJB
+  ADD CONSTRAINT PK_HOLDINGEJB PRIMARY KEY (HOLDINGID);
+
+CREATE TABLE ACCOUNTPROFILEEJB
+  (ADDRESS VARCHAR(250),
+   PASSWD VARCHAR(250),
+   USERID VARCHAR(250) NOT NULL,
+   EMAIL VARCHAR(250),
+   CREDITCARD VARCHAR(250),
+   FULLNAME VARCHAR(250));
+
+ALTER TABLE ACCOUNTPROFILEEJB
+  ADD CONSTRAINT PK_ACCOUNTPROFILE2 PRIMARY KEY (USERID);
+
+CREATE TABLE QUOTEEJB
+  (LOW DECIMAL(14, 2),
+   OPEN1 DECIMAL(14, 2),
+   VOLUME DOUBLE NOT NULL,
+   PRICE DECIMAL(14, 2),
+   HIGH DECIMAL(14, 2),
+   COMPANYNAME VARCHAR(250),
+   SYMBOL VARCHAR(250) NOT NULL,
+   CHANGE1 DOUBLE NOT NULL);
+
+ALTER TABLE QUOTEEJB
+  ADD CONSTRAINT PK_QUOTEEJB PRIMARY KEY (SYMBOL);
+
+CREATE TABLE KEYGENEJB
+  (KEYVAL INTEGER NOT NULL,
+   KEYNAME VARCHAR(250) NOT NULL);
+
+ALTER TABLE KEYGENEJB
+  ADD CONSTRAINT PK_KEYGENEJB PRIMARY KEY (KEYNAME);
+
+CREATE TABLE ACCOUNTEJB
+  (CREATIONDATE TIMESTAMP,
+   OPENBALANCE DECIMAL(14, 2),
+   LOGOUTCOUNT INTEGER NOT NULL,
+   BALANCE DECIMAL(14, 2),
+   ACCOUNTID INTEGER NOT NULL,
+   LASTLOGIN TIMESTAMP,
+   LOGINCOUNT INTEGER NOT NULL,
+   PROFILE_USERID VARCHAR(250));
+
+ALTER TABLE ACCOUNTEJB
+  ADD CONSTRAINT PK_ACCOUNTEJB PRIMARY KEY (ACCOUNTID);
+
+CREATE TABLE ORDEREJB
+  (ORDERFEE DECIMAL(14, 2),
+   COMPLETIONDATE TIMESTAMP,
+   ORDERTYPE VARCHAR(250),
+   ORDERSTATUS VARCHAR(250),
+   PRICE DECIMAL(14, 2),
+   QUANTITY DOUBLE NOT NULL,
+   OPENDATE TIMESTAMP,
+   ORDERID INTEGER NOT NULL,
+   ACCOUNT_ACCOUNTID INTEGER,
+   QUOTE_SYMBOL VARCHAR(250),
+   HOLDING_HOLDINGID INTEGER);
+
+ALTER TABLE ORDEREJB
+  ADD CONSTRAINT PK_ORDEREJB PRIMARY KEY (ORDERID);
+
+ALTER TABLE HOLDINGEJB VOLATILE;
+ALTER TABLE ACCOUNTPROFILEEJB VOLATILE;
+ALTER TABLE QUOTEEJB VOLATILE;
+ALTER TABLE KEYGENEJB VOLATILE;
+ALTER TABLE ACCOUNTEJB VOLATILE;
+ALTER TABLE ORDEREJB VOLATILE;
+
+CREATE INDEX ACCOUNT_USERID ON ACCOUNTEJB(PROFILE_USERID);
+CREATE INDEX HOLDING_ACCOUNTID ON HOLDINGEJB(ACCOUNT_ACCOUNTID);
+CREATE INDEX ORDER_ACCOUNTID ON ORDEREJB(ACCOUNT_ACCOUNTID);
+CREATE INDEX ORDER_HOLDINGID ON ORDEREJB(HOLDING_HOLDINGID);
+CREATE INDEX CLOSED_ORDERS ON ORDEREJB(ACCOUNT_ACCOUNTID,ORDERSTATUS);
+  
\ No newline at end of file

Added: geronimo/daytrader/trunk/bin/dbscripts/derby/Table.ddl
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/bin/dbscripts/derby/Table.ddl?rev=1156572&view=auto
==============================================================================
--- geronimo/daytrader/trunk/bin/dbscripts/derby/Table.ddl (added)
+++ geronimo/daytrader/trunk/bin/dbscripts/derby/Table.ddl Thu Aug 11 11:07:37 2011
@@ -0,0 +1,102 @@
+--    Licensed to the Apache Software Foundation (ASF) under one or more
+--    contributor license agreements.  See the NOTICE file distributed with
+--    this work for additional information regarding copyright ownership.
+--    The ASF licenses this file to You under the Apache License, Version 2.0
+--    (the "License"); you may not use this file except in compliance with
+--    the License.  You may obtain a copy of the License at
+--
+--       http://www.apache.org/licenses/LICENSE-2.0
+--
+--    Unless required by applicable law or agreed to in writing, software
+--    distributed under the License is distributed on an "AS IS" BASIS,
+--    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+--    See the License for the specific language governing permissions and
+--    limitations under the License.
+
+CONNECT 'jdbc:derby://localhost:1527/DaytraderDatabase;create=true';
+
+DROP TABLE HOLDINGEJB;
+DROP TABLE ACCOUNTPROFILEEJB;
+DROP TABLE QUOTEEJB;
+DROP TABLE KEYGENEJB;
+DROP TABLE ACCOUNTEJB;
+DROP TABLE ORDEREJB;
+
+CREATE TABLE HOLDINGEJB
+  (PURCHASEPRICE DECIMAL(14, 2),
+   HOLDINGID INTEGER NOT NULL,
+   QUANTITY DOUBLE NOT NULL,
+   PURCHASEDATE TIMESTAMP,
+   ACCOUNT_ACCOUNTID INTEGER,
+   QUOTE_SYMBOL VARCHAR(250));
+
+ALTER TABLE HOLDINGEJB
+  ADD CONSTRAINT PK_HOLDINGEJB PRIMARY KEY (HOLDINGID);
+
+CREATE TABLE ACCOUNTPROFILEEJB
+  (ADDRESS VARCHAR(250),
+   PASSWD VARCHAR(250),
+   USERID VARCHAR(250) NOT NULL,
+   EMAIL VARCHAR(250),
+   CREDITCARD VARCHAR(250),
+   FULLNAME VARCHAR(250));
+
+ALTER TABLE ACCOUNTPROFILEEJB
+  ADD CONSTRAINT PK_ACCOUNTPROFILE2 PRIMARY KEY (USERID);
+
+CREATE TABLE QUOTEEJB
+  (LOW DECIMAL(14, 2),
+   OPEN1 DECIMAL(14, 2),
+   VOLUME DOUBLE NOT NULL,
+   PRICE DECIMAL(14, 2),
+   HIGH DECIMAL(14, 2),
+   COMPANYNAME VARCHAR(250),
+   SYMBOL VARCHAR(250) NOT NULL,
+   CHANGE1 DOUBLE NOT NULL);
+
+ALTER TABLE QUOTEEJB
+  ADD CONSTRAINT PK_QUOTEEJB PRIMARY KEY (SYMBOL);
+
+CREATE TABLE KEYGENEJB
+  (KEYVAL INTEGER NOT NULL,
+   KEYNAME VARCHAR(250) NOT NULL);
+
+ALTER TABLE KEYGENEJB
+  ADD CONSTRAINT PK_KEYGENEJB PRIMARY KEY (KEYNAME);
+
+CREATE TABLE ACCOUNTEJB
+  (CREATIONDATE TIMESTAMP,
+   OPENBALANCE DECIMAL(14, 2),
+   LOGOUTCOUNT INTEGER NOT NULL,
+   BALANCE DECIMAL(14, 2),
+   ACCOUNTID INTEGER NOT NULL,
+   LASTLOGIN TIMESTAMP,
+   LOGINCOUNT INTEGER NOT NULL,
+   PROFILE_USERID VARCHAR(250));
+
+ALTER TABLE ACCOUNTEJB
+  ADD CONSTRAINT PK_ACCOUNTEJB PRIMARY KEY (ACCOUNTID);
+
+CREATE TABLE ORDEREJB
+  (ORDERFEE DECIMAL(14, 2),
+   COMPLETIONDATE TIMESTAMP,
+   ORDERTYPE VARCHAR(250),
+   ORDERSTATUS VARCHAR(250),
+   PRICE DECIMAL(14, 2),
+   QUANTITY DOUBLE NOT NULL,
+   OPENDATE TIMESTAMP,
+   ORDERID INTEGER NOT NULL,
+   ACCOUNT_ACCOUNTID INTEGER,
+   QUOTE_SYMBOL VARCHAR(250),
+   HOLDING_HOLDINGID INTEGER);
+
+ALTER TABLE ORDEREJB
+  ADD CONSTRAINT PK_ORDEREJB PRIMARY KEY (ORDERID);
+
+CREATE INDEX ACCOUNT_USERID ON ACCOUNTEJB(PROFILE_USERID);
+CREATE INDEX HOLDING_ACCOUNTID ON HOLDINGEJB(ACCOUNT_ACCOUNTID);
+CREATE INDEX ORDER_ACCOUNTID ON ORDEREJB(ACCOUNT_ACCOUNTID);
+CREATE INDEX ORDER_HOLDINGID ON ORDEREJB(HOLDING_HOLDINGID);
+CREATE INDEX CLOSED_ORDERS ON ORDEREJB(ACCOUNT_ACCOUNTID,ORDERSTATUS);
+
+COMMIT;

Added: geronimo/daytrader/trunk/bin/dbscripts/derby/createDerbyDB.bat
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/bin/dbscripts/derby/createDerbyDB.bat?rev=1156572&view=auto
==============================================================================
--- geronimo/daytrader/trunk/bin/dbscripts/derby/createDerbyDB.bat (added)
+++ geronimo/daytrader/trunk/bin/dbscripts/derby/createDerbyDB.bat Thu Aug 11 11:07:37 2011
@@ -0,0 +1,44 @@
+@REM   Licensed to the Apache Software Foundation (ASF) under one or more
+@REM   contributor license agreements.  See the NOTICE file distributed with
+@REM   this work for additional information regarding copyright ownership.
+@REM   The ASF licenses this file to You under the Apache License, Version 2.0
+@REM   (the "License"); you may not use this file except in compliance with
+@REM   the License.  You may obtain a copy of the License at
+@REM
+@REM      http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM   Unless required by applicable law or agreed to in writing, software
+@REM   distributed under the License is distributed on an "AS IS" BASIS,
+@REM   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM   See the License for the specific language governing permissions and
+@REM   limitations under the License.
+
+@echo off
+
+if not "%JAVA_HOME%" == "" goto JAVA_OK
+@echo Please define the JAVA_HOME environment variable.
+@goto END
+:JAVA_OK
+
+if not "%GERONIMO_HOME%" == "" goto GERONIMO_OK
+@echo Please define the GERONIMO_HOME environment variable.
+@goto END
+:GERONIMO_OK
+
+set DERBY_PATH=%GERONIMO_HOME%\repository\org\apache\derby
+set DERBY_VER=10.4.2.0
+set CLASSPATH=%DERBY_PATH%\derby\%DERBY_VER%\derby-%DERBY_VER%.jar
+set CLASSPATH=%CLASSPATH%;%DERBY_PATH%\derbynet\%DERBY_VER%\derbynet-%DERBY_VER%.jar
+set CLASSPATH=%CLASSPATH%;%DERBY_PATH%\derbytools\%DERBY_VER%\derbytools-%DERBY_VER%.jar
+set CLASSPATH=%CLASSPATH%;%DERBY_PATH%\derbyclient\%DERBY_VER%\derbyclient-%DERBY_VER%.jar
+
+@echo "Invoking IJ command line tool to create the database and tables...please wait"
+
+"%JAVA_HOME%\bin\java" -Dij.driver=org.apache.derby.jdbc.ClientDriver -Dij.protocol=jdbc:derby://localhost:1527/
org.apache.derby.tools.ij < Table.ddl
+
+@REM The following command launches the interactive ij command line utility
+@REM java -Dij.driver=org.apache.derby.jdbc.ClientDriver -Dij.protocol=jdbc:derby://localhost:1527/
org.apache.derby.tools.ij 
+
+@echo Table creation complete
+ 
+:END

Added: geronimo/daytrader/trunk/bin/dbscripts/derby/createDerbyDB.sh
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/bin/dbscripts/derby/createDerbyDB.sh?rev=1156572&view=auto
==============================================================================
--- geronimo/daytrader/trunk/bin/dbscripts/derby/createDerbyDB.sh (added)
+++ geronimo/daytrader/trunk/bin/dbscripts/derby/createDerbyDB.sh Thu Aug 11 11:07:37 2011
@@ -0,0 +1,44 @@
+#!/bin/bash
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+if [ "${JAVA_HOME}" = "" ]
+then
+  echo "Please define the JAVA_HOME environment variable."
+  exit
+fi
+
+if [ "${GERONIMO_HOME}" = "" ]
+then
+  echo "Please define the GERONIMO_HOME environment variable."
+  exit
+fi
+
+export DERBY_PATH=${GERONIMO_HOME}/repository/org/apache/derby
+export DERBY_VER=10.4.2.0
+export CLASSPATH=${DERBY_PATH}/derby/${DERBY_VER}/derby-${DERBY_VER}.jar
+export CLASSPATH=${CLASSPATH}:${DERBY_PATH}/derbynet/${DERBY_VER}/derbynet-${DERBY_VER}.jar
+export CLASSPATH=${CLASSPATH}:${DERBY_PATH}/derbytools/${DERBY_VER}/derbytools-${DERBY_VER}.jar
+export CLASSPATH=${CLASSPATH}:${DERBY_PATH}/derbyclient/${DERBY_VER}/derbyclient-${DERBY_VER}.jar
+
+echo "Invoking IJ command line tool to create the database and tables...please wait"
+
+${JAVA_HOME}/bin/java -Dij.driver=org.apache.derby.jdbc.ClientDriver -Dij.protocol=jdbc:derby://localhost:1527/
org.apache.derby.tools.ij < Table.ddl
+
+# The following command launches the interactive ij command line utility
+#${JAVA_HOME}/bin/java -Dij.driver=org.apache.derby.jdbc.ClientDriver -Dij.protocol=jdbc:derby://localhost:1527/
org.apache.derby.tools.ij 
+
+echo "Table creation complete"

Added: geronimo/daytrader/trunk/bin/dbscripts/oracle/Table.ddl
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/bin/dbscripts/oracle/Table.ddl?rev=1156572&view=auto
==============================================================================
--- geronimo/daytrader/trunk/bin/dbscripts/oracle/Table.ddl (added)
+++ geronimo/daytrader/trunk/bin/dbscripts/oracle/Table.ddl Thu Aug 11 11:07:37 2011
@@ -0,0 +1,99 @@
+--    Licensed to the Apache Software Foundation (ASF) under one or more
+--    contributor license agreements.  See the NOTICE file distributed with
+--    this work for additional information regarding copyright ownership.
+--    The ASF licenses this file to You under the Apache License, Version 2.0
+--    (the "License"); you may not use this file except in compliance with
+--    the License.  You may obtain a copy of the License at
+--
+--       http://www.apache.org/licenses/LICENSE-2.0
+--
+--    Unless required by applicable law or agreed to in writing, software
+--    distributed under the License is distributed on an "AS IS" BASIS,
+--    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+--    See the License for the specific language governing permissions and
+--    limitations under the License.
+
+DROP TABLE HOLDINGEJB cascade constraints;
+DROP TABLE ACCOUNTPROFILEEJB cascade constraints;
+DROP TABLE QUOTEEJB cascade constraints;
+DROP TABLE KEYGENEJB cascade constraints;
+DROP TABLE ACCOUNTEJB cascade constraints;
+DROP TABLE ORDEREJB cascade constraints;
+
+CREATE TABLE HOLDINGEJB
+  (PURCHASEPRICE DECIMAL(14, 2) NULL,
+   HOLDINGID INTEGER NOT NULL,
+   QUANTITY NUMBER NOT NULL,
+   PURCHASEDATE DATE NULL,
+   ACCOUNT_ACCOUNTID INTEGER NULL,
+   QUOTE_SYMBOL VARCHAR2(250) NULL);
+
+ALTER TABLE HOLDINGEJB
+  ADD CONSTRAINT PK_HOLDINGEJB PRIMARY KEY (HOLDINGID);
+
+CREATE TABLE ACCOUNTPROFILEEJB
+  (ADDRESS VARCHAR2(250) NULL,
+   PASSWD VARCHAR2(250) NULL,
+   USERID VARCHAR2(250) NOT NULL,
+   EMAIL VARCHAR2(250) NULL,
+   CREDITCARD VARCHAR2(250) NULL,
+   FULLNAME VARCHAR2(250) NULL);
+
+ALTER TABLE ACCOUNTPROFILEEJB
+  ADD CONSTRAINT PK_ACCOUNTPROFILEEJB PRIMARY KEY (USERID);
+
+CREATE TABLE QUOTEEJB
+  (LOW DECIMAL(14, 2) NULL,
+   OPEN1 DECIMAL(14, 2) NULL,
+   VOLUME NUMBER NOT NULL,
+   PRICE DECIMAL(14, 2) NULL,
+   HIGH DECIMAL(14, 2) NULL,
+   COMPANYNAME VARCHAR2(250) NULL,
+   SYMBOL VARCHAR2(250) NOT NULL,
+   CHANGE1 NUMBER NOT NULL);
+
+ALTER TABLE QUOTEEJB
+  ADD CONSTRAINT PK_QUOTEEJB PRIMARY KEY (SYMBOL);
+
+CREATE TABLE KEYGENEJB
+  (KEYVAL INTEGER NOT NULL,
+   KEYNAME VARCHAR2(250) NOT NULL);
+
+ALTER TABLE KEYGENEJB
+  ADD CONSTRAINT PK_KEYGENEJB PRIMARY KEY (KEYNAME);
+
+CREATE TABLE ACCOUNTEJB
+  (CREATIONDATE DATE NULL,
+   OPENBALANCE DECIMAL(14, 2) NULL,
+   LOGOUTCOUNT INTEGER NOT NULL,
+   BALANCE DECIMAL(14, 2) NULL,
+   ACCOUNTID INTEGER NOT NULL,
+   LASTLOGIN DATE NULL,
+   LOGINCOUNT INTEGER NOT NULL,
+   PROFILE_USERID VARCHAR2(250) NULL);
+
+ALTER TABLE ACCOUNTEJB
+  ADD CONSTRAINT PK_ACCOUNTEJB PRIMARY KEY (ACCOUNTID);
+
+CREATE TABLE ORDEREJB
+  (ORDERFEE DECIMAL(14, 2) NULL,
+   COMPLETIONDATE DATE NULL,
+   ORDERTYPE VARCHAR2(250) NULL,
+   ORDERSTATUS VARCHAR2(250) NULL,
+   PRICE DECIMAL(14, 2) NULL,
+   QUANTITY NUMBER NOT NULL,
+   OPENDATE DATE NULL,
+   ORDERID INTEGER NOT NULL,
+   ACCOUNT_ACCOUNTID INTEGER NULL,
+   QUOTE_SYMBOL VARCHAR2(250) NULL,
+   HOLDING_HOLDINGID INTEGER NULL);
+
+ALTER TABLE ORDEREJB
+  ADD CONSTRAINT PK_ORDEREJB PRIMARY KEY (ORDERID);
+
+CREATE INDEX ACCOUNT_USERID ON ACCOUNTEJB(PROFILE_USERID);
+CREATE INDEX HOLDING_ACCOUNTID ON HOLDINGEJB(ACCOUNT_ACCOUNTID);
+CREATE INDEX ORDER_ACCOUNTID ON ORDEREJB(ACCOUNT_ACCOUNTID);
+CREATE INDEX ORDER_HOLDINGID ON ORDEREJB(HOLDING_HOLDINGID);
+CREATE INDEX CLOSED_ORDERS ON ORDEREJB(ACCOUNT_ACCOUNTID,ORDERSTATUS);
+  

Added: geronimo/daytrader/trunk/bin/dbscripts/sqlserver/Table.sql
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/bin/dbscripts/sqlserver/Table.sql?rev=1156572&view=auto
==============================================================================
--- geronimo/daytrader/trunk/bin/dbscripts/sqlserver/Table.sql (added)
+++ geronimo/daytrader/trunk/bin/dbscripts/sqlserver/Table.sql Thu Aug 11 11:07:37 2011
@@ -0,0 +1,101 @@
+--    Licensed to the Apache Software Foundation (ASF) under one or more
+--    contributor license agreements.  See the NOTICE file distributed with
+--    this work for additional information regarding copyright ownership.
+--    The ASF licenses this file to You under the Apache License, Version 2.0
+--    (the "License"); you may not use this file except in compliance with
+--    the License.  You may obtain a copy of the License at
+--
+--       http://www.apache.org/licenses/LICENSE-2.0
+--
+--    Unless required by applicable law or agreed to in writing, software
+--    distributed under the License is distributed on an "AS IS" BASIS,
+--    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+--    See the License for the specific language governing permissions and
+--    limitations under the License.
+
+use tradedb
+go
+DROP TABLE HOLDINGEJB
+DROP TABLE ACCOUNTPROFILEEJB
+DROP TABLE QUOTEEJB
+DROP TABLE KEYGENEJB
+DROP TABLE ACCOUNTEJB
+DROP TABLE ORDEREJB
+
+CREATE TABLE HOLDINGEJB  (
+  PURCHASEPRICE DECIMAL(14, 2), 
+  HOLDINGID int NOT NULL, 
+  QUANTITY float NOT NULL, 
+  PURCHASEDATE DATETIME,
+  ACCOUNT_ACCOUNTID int,
+  QUOTE_SYMBOL VARCHAR(250))
+
+ALTER TABLE HOLDINGEJB
+  ADD CONSTRAINT PK_HOLDINGEJB PRIMARY KEY (HOLDINGID)
+
+CREATE TABLE ACCOUNTPROFILEEJB
+  (ADDRESS VARCHAR(250),
+   PASSWD VARCHAR(250),
+   USERID VARCHAR(250) NOT NULL,
+   EMAIL VARCHAR(250),
+   CREDITCARD VARCHAR(250),
+   FULLNAME VARCHAR(250))
+
+ALTER TABLE ACCOUNTPROFILEEJB
+  ADD CONSTRAINT PK_ACCOUNTPROFILE2 PRIMARY KEY (USERID)
+
+CREATE TABLE QUOTEEJB
+  (LOW DECIMAL(14, 2),
+   OPEN1 DECIMAL(14, 2),
+   VOLUME float NOT NULL,
+   PRICE DECIMAL(14, 2),
+   HIGH DECIMAL(14, 2),
+   COMPANYNAME VARCHAR(250),
+   SYMBOL VARCHAR(250) NOT NULL,
+   CHANGE1 float NOT NULL)
+
+ALTER TABLE QUOTEEJB
+  ADD CONSTRAINT PK_QUOTEEJB PRIMARY KEY (SYMBOL)
+
+CREATE TABLE KEYGENEJB
+  (KEYVAL int NOT NULL,
+   KEYNAME VARCHAR(250) NOT NULL)
+
+ALTER TABLE KEYGENEJB
+  ADD CONSTRAINT PK_KEYGENEJB PRIMARY KEY (KEYNAME)
+
+CREATE TABLE ACCOUNTEJB
+  (CREATIONDATE DATETIME,
+   OPENBALANCE DECIMAL(14, 2),
+   LOGOUTCOUNT int NOT NULL,
+   BALANCE DECIMAL(14, 2),
+   ACCOUNTID int NOT NULL,
+   LASTLOGIN DATETIME,
+   LOGINCOUNT int NOT NULL,
+   PROFILE_USERID VARCHAR(250))
+
+ALTER TABLE ACCOUNTEJB
+  ADD CONSTRAINT PK_ACCOUNTEJB PRIMARY KEY (ACCOUNTID)
+
+CREATE TABLE ORDEREJB
+  (ORDERFEE DECIMAL(14, 2),
+   COMPLETIONDATE DATETIME,
+   ORDERTYPE VARCHAR(250),
+   ORDERSTATUS VARCHAR(250),
+   PRICE DECIMAL(14, 2),
+   QUANTITY float NOT NULL,
+   OPENDATE DATETIME,
+   ORDERID int NOT NULL,
+   ACCOUNT_ACCOUNTID int,
+   QUOTE_SYMBOL VARCHAR(250),
+   HOLDING_HOLDINGID int)
+  
+ALTER TABLE ORDEREJB
+  ADD CONSTRAINT PK_ORDEREJB PRIMARY KEY (ORDERID);
+
+CREATE INDEX ACCOUNT_USERID ON ACCOUNTEJB(PROFILE_USERID)
+CREATE INDEX HOLDING_ACCOUNTID ON HOLDINGEJB(ACCOUNT_ACCOUNTID)
+CREATE INDEX ORDER_ACCOUNTID ON ORDEREJB(ACCOUNT_ACCOUNTID)
+CREATE INDEX ORDER_HOLDINGID ON ORDEREJB(HOLDING_HOLDINGID)
+CREATE INDEX CLOSED_ORDERS ON ORDEREJB(ACCOUNT_ACCOUNTID,ORDERSTATUS)
+go  

Modified: geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/pom.xml?rev=1156572&r1=1156571&r2=1156572&view=diff
==============================================================================
--- geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/pom.xml (original)
+++ geronimo/daytrader/trunk/javaee6/assemblies/daytrader-ear/pom.xml Thu Aug 11 11:07:37
2011
@@ -20,6 +20,7 @@
             <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
             <artifactId>utils</artifactId>            
         </dependency>       
+       
         <dependency>
             <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
             <artifactId>entities</artifactId>
@@ -45,6 +46,7 @@
                             <artifactId>utils</artifactId>
                              <uri>lib/utils.jar</uri>
                         </javaModule>                       
+                        
                         <javaModule>
                             <groupId>org.apache.geronimo.daytrader.javaee6</groupId>
                             <artifactId>entities</artifactId>



Mime
View raw message