Garayed.com  

Go Back   Garayed.com > mySQL
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-20-2006, 12:59 AM
Rick
 
Posts: n/a
Default separate table vs. array-like list field

I'm very, very new to mysql and I've been toying with it the last
couple weeks. I've hit upon a theoretical question that I would like to
run by more experienced users.

One of the things I've been doing to teach myself is creating databases
and tables that might be similar to databases powering big, popular
sites like Flickr or Digg. For example, I created a user table (id
[primary key], name, nickname, email, location, birthday, profile,
etc.) and then played around with querying it in various ways.

One of the things I did to learn how to use "join" was to create a
separate table for blocked users. Sites like Flickr and Digg often give
users the ability to block other users. The way I implemented this was
to create a table with the blocker's id and the "blockee's" id. Using
that, I can query the blocked users table and cross-reference it to the
user list and come up with the list of blocked users for any specified
user. Pretty cool.

So I wonder. On a big site with a million+ users, would having to query
a separate table for a list of blocked users like that bog down the
site or would it be preferable (in terms of speed and efficiency) to
add a field to the user table that lists the id numbers of that user's
blocked users, sort of a pseudo-array that I collapse and expand when
needed (e.g., a blocked user array-like list might look like
"150|11516|61878|9091|41064" etc.

Any thoughts? Or am I still so new at this that this scenario doesn't
make sense?

--Rick

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 07:19 AM.




LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.