On Sat, Jan 20, 2007 at 10:37:33PM +0100, A. Pagaltzis wrote:
> Am I the only one who uses ${desc}_${othertable} as the name for
> FK columns? Eg. a table with weblog posts/comments in a system I
> design might look like this:
>
> CREATE TABLE entry (
> id INTEGER PRIMARY KEY,
> author_user INTEGER REFERENCES user(id),
> body TEXT
> );
How is that helpful to you? Does that let you know it's a column you
can call other methods on?
$entry->author -- not sure if can call other methods
$entry->author_user -- clear that can call "user" class methods
Or some other reason?
I like brief names. I'm working with a MySQL database now called
"webcast" where tables are prefixed by the database name, and then
columns are prefixed by their table name. Unfortunately, there's a
table "webcast" (hence table "webcastWebcast") so a column looks like:
webcast.webcastWebcast.webcastTimestamp
Not that I know exactly *what* that time represents. That database is
part of a PHP application where it seems that CamelCase is common.
--
Bill Moseley
[EMAIL PROTECTED]
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/