HTML and CSS Reference
In-Depth Information
Listing 12-6.
SQL Statements of the Weather Application Data Model
CREATE TABLE APP_USER (
ID VARCHAR(64) PRIMARY KEY,
FIRST_NAME VARCHAR(32),
LAST_NAME VARCHAR(32),
PASSWORD VARCHAR(32),
PROFESSION VARCHAR(32),
EMAIL VARCHAR(64),
ZIP_CODE VARCHAR(32)
);
CREATE TABLE APP_GROUP(userid varchar(64) not null, groupid varchar(64) not null, primary
key(userid, groupid));
ALTER TABLE APP_GROUP add constraint FK_USERID foreign key(userid) references APP_USER(id);
Finally, in order to create our custom realm in GlassFish 4.0, click
"Configurations -> server-config ->
Security -> Realms"
, enter the suitable realm information, and finally save the realm as shown in Figure
12-2
.
Figure 12-2.
Defining a new realm in GlassFish version 4.0
