tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ignacio J. Ortega" <>
Subject RE: [PATCH] change JDBCRealm to add flexibility in table layout
Date Tue, 05 Mar 2002 19:43:07 GMT
> De: John Gregg []
> Enviado el: martes 5 de marzo de 2002 20:11

> I don't see how views will solve this problem.  I'm not so 
> much concerned
> with reading user and role data as I am with updating it.  
> Somehow the two
> tables need to be linked by some common identifier.  The 

( Syntax aproximated maybe sql-92, more or less )

create table users
  user_id   integer not null primary key,
  user_name varchar(15) not null ,
  user_pass varchar(15) not null

create table user_roles
  role_id   integer not null primary key,
  user_id   integer not null,
  role_name varchar(15) not null

create view user_roles_jdbcrealm
select u.user_name,ur.role_name
from user_roles ur join users u 
on (ur.user_id=u.user_id)

and use this view in jdbcrealm..

Please add what you need to be able to understand you..

Saludos ,
Ignacio J. Ortega

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message