if username : srinath password:srinath schema:srinath
and server not running
dblook -d "jdbc:derby:D:\Documents and Settings\Srinath.DIGIFIRE1\.netbeans-derby\btapp;user=srinath;password=srinath" -z srinath -o mydump.sql
Generated dump
-- ============================
-- This file was created using Derby's dblook utility.
-- Timestamp: 2010-12-26 10:50:18.906
-- Source database is: D:\Documents and Settings\Srinath.DIGIFIRE1\.netbeans-derby\btapp
-- Connection URL is: jdbc:derby:D:\Documents and Settings\Srinath.DIGIFIRE1\.netbeans-derby\btapp;user=srinath;password=srinath
-- Specified schema is: srinath
-- appendLogs: false
-- ----------------------------------------------
-- DDL Statements for schemas
-- ----------------------------------------------
-- ----------------------------------------------
-- DDL Statements for tables
-- ----------------------------------------------
CREATE TABLE "SRINATH"."ITEM" ("ID" INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), "TITLE" VARCHAR(100) DEFAULT NULL, "ICON" BLOB(2147483647), "ICONBASE64" VARCHAR(2000) DEFAULT NULL, "DESCRIPTION" VARCHAR(1000) DEFAULT NULL, "CATEGORY_ID" INTEGER, "LOCATION_ID" INTEGER);
CREATE TABLE "SRINATH"."LOCATION" ("ID" INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), "TITLE" VARCHAR(100) DEFAULT NULL, "ICON" BLOB(2147483647), "ICONBASE64" VARCHAR(2000) DEFAULT NULL, "DESCRIPTION" VARCHAR(1000) DEFAULT NULL);
CREATE TABLE "SRINATH"."CATEGORY" ("ID" INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), "TITLE" VARCHAR(100) DEFAULT NULL, "ICON" BLOB(2147483647), "ICONBASE64" VARCHAR(2000) DEFAULT NULL, "DESCRIPTION" VARCHAR(1000) DEFAULT NULL);
CREATE TABLE "SRINATH"."SYSTEM_USERS" ("USERNAME" VARCHAR(100) NOT NULL, "PASSWORD" VARCHAR(100) DEFAULT NULL);
-- ----------------------------------------------
-- DDL Statements for keys
-- ----------------------------------------------
-- primary/unique
ALTER TABLE "SRINATH"."LOCATION" ADD CONSTRAINT "SQL101225075907980" PRIMARY KEY ("ID");
ALTER TABLE "SRINATH"."SYSTEM_USERS" ADD CONSTRAINT "SQL101225075656450" PRIMARY KEY ("USERNAME");
ALTER TABLE "SRINATH"."ITEM" ADD CONSTRAINT "SQL101225083438700" PRIMARY KEY ("ID");
ALTER TABLE "SRINATH"."CATEGORY" ADD CONSTRAINT "SQL101225075421390" PRIMARY KEY ("ID");
-- foreign
ALTER TABLE "SRINATH"."ITEM" ADD CONSTRAINT "LOCATIONID_FK" FOREIGN KEY ("LOCATION_ID") REFERENCES "SRINATH"."LOCATION" ("ID") ON DELETE CASCADE ON UPDATE RESTRICT;
ALTER TABLE "SRINATH"."ITEM" ADD CONSTRAINT "CATEGORYID_FK" FOREIGN KEY ("CATEGORY_ID") REFERENCES "SRINATH"."CATEGORY" ("ID") ON DELETE CASCADE ON UPDATE RESTRICT;
Saturday, December 25, 2010
Subscribe to:
Posts (Atom)