This isn't purely perl I suppose, it is bit of perl/MySQL...

We are in the process of creating a new user system where I work. The way we work now is we call out to another department's system to grab a list of Access Priviledges (accprivs) for the user for each page.

We are currently working up our own local version of an accpriv system, and are having a design issue. My co-worker, who is pretty much building it, was going to use a large bitmap stored in the user table to handle the accprivs, select it out, and do all the dirty work in perl. This doesn't sound quite right to me.

My thought was to have a table of accprivs with accpriv ids, and a mapping table to map accpriv ids to user ids. Then to grab all the accprivs for a user is a simple JOIN query. However, the only arguments I can really offer for this is that it would be easier to write an accpriv editing page with this system, and easier to move things around.

Now, I could be wrong, does anyone have any good arguments/suggestions on how to might be best to handle this? The system is looking at around 1000 users and 300 accprivs, and will be accessed from a fastcgi connected to the database. Any comments are welcome - thanks

                - Ant
                - Some of my http://www.perlmonks.org/index.pl?node_id=56739#Best - (1 2 3)


In reply to User access DB design by suaveant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.