If you don't know how to get your rules yet then you don't know how to design a solution.
Based on what you've said I see 2 more tables. create table (pid int, rule int) create table (rule int, record int) You can have multiple rules per pid, reuse rules across pids, and records can overlap rules. The your select joins the tables and one select will work for all pids. Your rules can be exclusive or inclusive depending on what you want. Or both if you add another field to say what the rule is. Michael D. Black Senior Scientist NG Information Systems Advanced Analytics Directorate ________________________________ From: [email protected] [[email protected]] on behalf of san long [[email protected]] Sent: Sunday, July 17, 2011 1:00 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] Hidding records from the application actually I don't know how to get my rules yet, but let's assume the rules exist and we can get it from a function. get_forbidden_ids() 2011/7/17 Simon Slavin <[email protected]> > > On 17 Jul 2011, at 4:03am, san long wrote: > > > (process name) > > Implement this logic in your programming language, or do it by having your > app consult a table to see what has access to what database. > > SQL is a database language. You put data in and get the same data out > again. You don't get different data from the same database depending on > what you are. If you don't want all the records in a TABLE, use a 'WHERE' > clause on your SELECT command. > > > "A" (process name) can see all records except rowid 1,2 > > "B" .....except rowid 1,3 > > "C" ......except rowid 4,5 > > > You still haven't explained how your application is meant to know what has > access to which records. How does it know process C isn't meant to be able > to see record 4 ? Is this information stored with record 4, or in a table > about processes or what ? > > Simon. > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

