NYCPHP Meetup

NYPHP.org

[nycphp-talk] Database, table, and column naming schemes

Matt Juszczak matt at atopia.net
Tue Oct 6 00:56:41 EDT 2009


And how about one more thing...

What would you call a table that joins two other tables on a many to many:

say I have an account table, and a user table:


account
 	- ID

user
 	- ID



Finally, I have a third table:

un-named
 	- account_id
 	- user_id
 	- column X
 	- column Y


What would you call that many:many table?

Surely, not account_user, and not user_account, as that's deceiving. 
Would you do something like:

x_account_user

To show it's an intersection (many:many) of the two?

To clarify, I have a table called "post", and a table called "user", and I 
need a table that deals with "permissions" that intersects the two.  I 
don't want to call it "permission", because that's a bit vague.  I could 
call it:

x_post_user_permission

or just:

post_user_permission

Can't quite decide.

Thoughts?



More information about the talk mailing list