tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ignacio J. Ortega" <na...@siapi.es>
Subject RE: [PATCH] change JDBCRealm to add flexibility in table layout
Date Tue, 05 Mar 2002 19:43:07 GMT
> De: John Gregg [mailto:john.gregg@techarch.com]
> 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
as 
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:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message