Yea sorry... I did an absolutely awful job of explaining.

In my app, I want the user to have a list of 'friends' in his/her profile 
that he can message and see what content they have posted (very original, 
night?).  My plan is to have users be able to view other users content who 
they are NOT friends with through other means; but if they take a liking to 
it they can 'friend' the person and be able to easily view what the 
'friended' user has been up to.  Sort of like book marking things in a 
browser I guess.

In my mind it would be more efficient to have each user have its table that 
was a list of its users.  It just seamed silly in my mind to query every 
single user for the relationship...

Clearly a total noob in database design here!  Thanks so much for taking 
the time to answer my dumb questions.

Do you think it would help me to spend a while writing raw SQL to get an 
idea of how DBs are structured?  Any references to help me get a grip would 
be much appreciated.

Thanks so much again for the help,
Hunt


On Wednesday, August 14, 2013 2:17:28 PM UTC-4, Richard wrote:
>
> If you explain better what you want to acheive, we could help you better...
>
> Maybe you just need a self reference field name friend_id let you 
> associate each user which are friends. Maybe you need a many to many 
> relation table where you will where you can manage there friendship 
> relation between each user.
>
> But for sure, forget about the idea of creating 1000 tables...
>
> RIchard
>
>
> On Wed, Aug 14, 2013 at 1:27 PM, Hunt <[email protected] <javascript:>
> > wrote:
>
>> Really?  So I should just add like a 1000 "friend_id" fields to 
>> auth_user?  I thought there would an easier way to go about this.
>>
>> Thanks though Marin!
>>
>>
>> On Wednesday, August 14, 2013 2:07:08 AM UTC-4, Marin Pranjić wrote:
>>
>>> Don't do that. It is wrong.
>>> Create only one new table and put everything there
>>>
>>> Marin (mobile)
>>>
>>> On Aug 14, 2013 7:08 AM, "Hunt" <[email protected]> wrote:
>>>
>>> Did an absolutely atrocious job naming this question.  A better title 
>>> would be:  "How to auto-generate an additional table for each auth_user 
>>> table entry".
>>>
>>>
>>>
>>> On Tuesday, August 13, 2013 5:54:03 PM UTC-4, Hunt wrote:
>>> >
>>> > Hi all,
>>> >
>>> > I want to add a 'friends...
>>>
>>>
>>> -- 
>>>  
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "web2py-users"...
>>>
>>>  -- 
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to