Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • by gav (2710) on 2003.04.29 14:13 (#19581) Homepage Journal
    How do you work around that? For example, if you were showing a list of things to a user and wanted them to select something, I'd have internal IDs visible. They'd see:
    /script/select?id=1
    I'm not quite sure what the problem is, they could always edit the url to change the ID but there should be no chance that they can work around permissions this way.
  • GUIDs (Score:3, Informative)

    by Theory (10) on 2003.04.29 20:02 (#19596) Homepage Journal

    I think that we might be using GUIDs for objects in Bricolage 2.0, probably using Data::UUID [cpan.org]. It will fascilitate syncing independent Bricolage servers. Of course, database sequence IDs will still be used for primary keys.

    --David

  • I would generalize that in a different way: no system-generated unique identifier should ever be interpreted as to its content. In other words, those columns should be used for joins to other tables and nothing else. For example, if you ever find yourself writing "order by" on that column, you're setting yourself up for trouble. As a test, if you're using any kind of SUID, I should be able to substitute 1, -47, or 240981 for any of the values consistently, and no program or user should be any the wiser.

    Now, I will admit to breaking that rule in one particular situation (you knew that was coming ;-). In most data warehousing applications, you want to capture date values or time values (rarely both) in a dimension table. I've found it's very convenient to have meaningful SUIDs for primary keys on those tables; it makes debugging much simpler when you can look at date_id 20030430 and know it refers to today.