When you download NetBeans 7.1.2, the "Everything" package you get with it the Glassfish application server. After installing w / glassfish in the IDE, you should select the Services tab> Deploy Databases and you should see Java DB. R. Click on Java DB and select "Start Server". Then R. Press again and select "Create Database". Enter your username, username and password. BTW I usually use APP for the user and password, because in this way it also becomes the default scheme, and I do not need to change anything for the production environment.
Java DB . R. connect. , " ". , APP, , , . R. "", " ", ui, . , . ide - Execute, DDL . db, script .sql , db .
dbinit.sql script, .
create table usertable (
username varchar(128) NOT NULL CONSTRAINT USER_PK PRIMARY KEY ,
password varchar(128) NOT NULL,
email varchar(128) NOT NULL,
firstname varchar(128) NOT NULL,
lastname varchar(128) NOT NULL
);
create table grouptable(
username varchar(128) NOT NULL,
groupid varchar(128) NOT NULL,
CONSTRAINT GROUP_PK PRIMARY KEY(username, groupid),
CONSTRAINT USER_FK FOREIGN KEY(username) REFERENCES usertable(username)
ON DELETE CASCADE ON UPDATE RESTRICT
);
insert into usertable(username,password,firstname,lastname)
values ('admin', '21232f297a57a5a743894a0e4a801fc3','','');
insert into grouptable(username,groupid) values ('admin', 'USER');
insert into grouptable(username,groupid) values ('admin', 'ADMIN');
, , , R. , , . script, .

, !:)