A few points and thoughts... most of them not necessary but might be
good to have.
• created_on and updated_on should loose the "_on" part to match Cakes
conventions and be filled automatically.
• You could add created and updated to comments and users as well.
• You may want a boolean for the users "activated" or "blocked" or
whatever you prefer. That way you can easily block users without
actually deleting them and also handle email-verification (like every
website in the world does)
• You may want to have all user data (even those not registered) in
the users table. Or in another central table for email and created_by
(= name). The email might be a good unique value for such a table.
That table would then be linked to users, pois and comments.
happy baking!
/Martin
On Oct 30, 3:13 am, pgraju <prashant.g.r...@gmail.com> wrote:
> Hi all,
>
> I'm trying to create a map mashup using CakePHP for my first Web App
> with Cake :) But I'm just afraid that I'm not structuring my database
> correctly...
>
> The idea: A simple mashup with google maps which allows people to
> submit/search points of interest on a map and click on the pointers
> for address information and to view/add comments. Users don't have to
> register but there is an option available if they want to.
>
> My db tables so far:
>
> ---------------------------------
> pois (point of interests)
> ---------------------------------
> id
> name
> address1
> address2
> locality
> state
> country
> lng
> lat
> ip_address (should I log this?)
> user_id
> comment_id
> created_by (this is filled out by the user if they do not want to
> registered)
> email_address (this is filled out by the user if they do not want to
> registered)
> created_on
> updated_on
>
> ---------------------------------
> users
> ---------------------------------
> id
> username
> password
> firstname
> lastname
> email_address
>
> ---------------------------------
> comments
> ---------------------------------
> id
> title
> content
> created_by (this is filled out by the user if they do not want to
> registered)
> email_address (this is filled out by the user if they do not want to
> registered)
> ip_address (should I log this?)
> user_id
>
> Have I gone about the right way doing this for a CakePHP app? If not
> do you mind shedding some light?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment