Monday, July 22, 2013

36-Introduction-to-Spring-Data-and-Setting-Up

Download database “Apache Derby” from http://db.apache.org/derby/

Set environment variables
Environment variable -> systemVariable(DERBY_HOME=”folder path of Derby”) -> PATH=DERY_HOME\bin

Go to command prompt
C:\.......\bin>
Run startNetworkServer.bat

Open another command prompt and below file.
C:\.......\bin>ij.bat

To crete DB and connect Derby run below command
Ij> connect ‘jdbc:derby://localhost:1527/dbname; create=true’
If database not present then it creates

Run below query to create table
Create “circle” table
CREATE TABLE circle (id integer, name char(50));
SELECT * from circle;
INSERT INTO circle VALUES(1, ‘First Circle’);

SELECT * from circle;

No comments:

Post a Comment