[Solar-talk] Handles or IDs?

Rodrigo Moraes rodrigo.moraes at gmail.com
Tue Nov 28 15:25:56 PST 2006


On 11/28/06, Antti Holvikari wrote:
> 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... :-(

Stay calm, user ID's are still KISS. :)
... and, since this is most commonly used foreign key we

I've talked about this on the IRC channel, but let me tell to
everybody that I'm trying to stick more with Solar defaults since some
time ago. This includes using handles instead of user ID's everywhere,
at least for a while. And so I'm using them in the
nodes/tags/roles/access tables, but this new version is still on heavy
development and the new philosophy is "stick with Solar as much as you
can". :-) I plan to make some reports about the impact of some table
designs and suggest some alternatives.

The impact of using varchars vs ints to map users will only be noticed
if you have big tables, or a large access to these tables (but then
all the columns, indexes and how much the table is read/write should
be considered to design the tables and make the database more
healthy). Querying for a varchar consumes much more resources than for
a int. But perhaps the important thing is: don't let it be a problem
if it is not.

For example, one thing I can't even think to use is a count() on
tables. I'll have helper tables to store counts instead; let's see if
sticking more closer to Solar I can share this solution with others
managing big tables. This (and the indexes) is something that worries
me more to be honest, but I'm also trying to not let them be a problem
until they are. :)

rodrigo

---------------------------------------------------------------------
Solar has now a Community Wiki: solarphp.org
---------------------------------------------------------------------
Join the #solarphp IRC channel on freenode.org
---------------------------------------------------------------------


More information about the solar-talk mailing list