[Solar-talk] Handles or IDs?
Paul M Jones
pmjones at ciaweb.net
Tue Nov 28 14:48:52 PST 2006
On Nov 28, 2006, at 4:40 PM, Antti Holvikari wrote:
> And it seems it would be really hard to use only ids (write id support
> for all the adapters). I'm basicly only worried about the speed of my
> queries. The thing is, using only handles would be so easy. Please
> convince me to use only handles :-) All the SQL gurus say we'd have to
> use ids but then we say KISS and use handles... :-(
Man, I'm using handle strings *everywhere*. It's the only way I know
that will maintain portability between all the authentication
backends, whether mail, sql, ini, htacces, typekey, or anything else
that may come (OpenID?).
By the time you get to the DB you've slowed down a hell of a lot
anyway; at that point, you might be well off to try and cache data
rather than speed up the query (within reason) and avoid the DB
altogether.
Alternatively, you can keep track of handles in a "handle_id =>
handle_string" mapping table, and join on that. Then your tags table
can use the handle_id value. But me, I'm OK with the handle strings
for now.
Rodrigo has a huge number of users, iirc, and may be able to provide
more useful input here.
--
Paul M. Jones <http://paul-m-jones.com>
Solar: Simple Object Library and Application Repository
for PHP5. <http://solarphp.com>
Join the Solar community wiki! <http://solarphp.org>
Savant: The simple, elegant, and powerful solution for
templates in PHP. <http://phpsavant.com>
More information about the solar-talk
mailing list