Derby DB basic information

Few Details about the Derby Database

Standalone Derby Database


Click Here to download Derby DB(10.1.3.1). No installation is required


Starting derby DB

from Lib(C:\db-derby\lib)
java -jar derbynet.jar start

from framework/bin(C:\db-derby\frameworks\NetworkServer\bin)
startNetworkServer.bat

Few commonly used  SQL statements

CREATE SCHEMA sivavakablog
CREATE TABLE sivavakablog.reader
       (READER_ID int NOT NULL,
        REGISTERED_DATE DATE NOT NULL,
        READER_NAME CHAR(30),
        PRIMARY KEY (READER_ID));

insert into sivavakablog.reader(reader_id,registered_date,reader_name) values (1111,'2010-11-11','reader1');

update sivavakablog.reader set reader_name='reader2' where reader_id=1111

drop table sivavakablog.reader

select * from sivavakablog.reader;

drop index release.IX3000A

CREATE INDEX JCR.IX2110B ON JCR.PROT_RES (OWNER_UID ASC, RES_TYPE ASC);


Ref Complete SQL References:
http://db.apache.org/derby/manuals/reference/sqlj27.html#HDRSII-SQLJ-31580 (Create Commands)
http://db.apache.org/derby/papers/JDBCImplementation.html (JDBC related)
http://db.apache.org/derby/manuals/reference/sqlj28.html  (Drop commands)


Embed Derby Server (Websphere Portal)

  1. Open command prompt and go to \IBM\WebSphere\AppServer\derby\bin\embedded\
  2. enter systeminfo.bat to see what are the environment variables
  3. If Linux , check the current classpath using below and append as follow,
    1. echo $classpath
  4. If windows, check the current class using below
    1. echo %classpath%
    2. set classpath=%classpath%;
  5. if the JDBC client is not in classpath , set that as below
  6. open the ij.bat
Also consider that the version of Derby provided with WebSphere Portal has stress and failover limitations that are expected to be resolved in a later release of Derby performance improvements.

connect 'jdbc:derby://localhost:1527/wpsdb;user=wpsadmin;password=password'

D:/IBM/WebSphere/AppServer/derby/lib/derby.jar;D:/IBM/WebSphere/AppServer/derby/lib/derbyclient.jar;D:/IBM/WebSphere/AppServer/derby/lib/derbynet.jar;D:/IBM/WebSphere/AppServer/derby/lib/derbytools.jar;

No comments:

Post a Comment