NYCPHP Meetup

NYPHP.org

[nycphp-talk] Best practices for naming conventions & coding style?

Edward Potter edwardpotter at gmail.com
Mon Apr 27 22:18:42 EDT 2009


person
------
person_id
first_name
last_name
company_id

company
-------
company_id
company_name

OR >>>

employees
--------------
id
firstname   <= generally for my field names I'll link words with _, just
firstname and lastname I concatenate.
lastname
company_id


companies
-------------
id
company

;-)




On Mon, Apr 27, 2009 at 9:34 PM, Daniel Convissor <
danielc at analysisandsolutions.com> wrote:

> On Mon, Apr 27, 2009 at 08:00:03PM -0400, Dan Cech wrote:
> >
> > Plural-names for tables are a pain...
> >
> > field: person
> > table: ???
> >
> > Is it persons or people or something else?
>
> Yep.  Plus it makes consistency very easy and makes life easier by
> allowing the use of USING.
>
> person
> ------
> person_id
> first_name
> last_name
> company_id
> ...
>
> company
> -------
> company_id
> company_name
> ...
>
>
> etc
>
> --Another Dan
>
> --
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>            data intensive web and database programming
>                http://www.AnalysisAndSolutions.com/
>  4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/show_participation.php
>



-- 
IM/iChat: ejpusa
Links: http://del.icio.us/ejpusa
Follow me: http://www.twitter.com/ejpusa
Karma: http://www.coderswithconscience.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20090427/d32b5d73/attachment.html>


More information about the talk mailing list