Welcome Guest, Not a member yet? Register   Sign In
Relationship Mapping between Users and Data, like OpenSourceFood.com
#2

[eluser]obiron2[/eluser]
firstly, well done on building security in as part of the design, It is a pain to retrofit it.

Personally, I create my own user tables that have a 1:1 relationship with the Freakauth user table. I do this for two reasons. 1) I don't like touching other peoples code and tables and 2) I will have 'users' who are not registered on the site (i.e. I will need to hold information about folks who have never visited the site, but have been added by league administrators)

For any controller that grants view access to restricted pages, you will need to build validation rules to check that the user is A) logged in, B) has the correct permissions to access that part of the site (e.g. admin pages) and C) has access to the specific area (e.g. receipe X admin)

In terms of database relationships, look for normalisation rules in your favorite search enginebut for ease of logic regard you want to build a separate table for each enitity (e.g. user, receipe) but also for each logical 1:many relationship.
A user can have many receipes = table for users, table for receipes
A receipe can have many ingredients AND An ingredient can be in many receipes= table for recepies, table for ingredients AND
new table to link recepies to ingredients


Messages In This Thread
Relationship Mapping between Users and Data, like OpenSourceFood.com - by El Forum - 11-18-2008, 05:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB