LPW: Slides... DBIC and new recommendations!
paulm at paulm.com
Sun Nov 30 12:43:01 GMT 2008
On Sun, Nov 30, 2008 at 10:39 AM, Leo Lapworth <leo at cuckoo.org> wrote:
> I've put the slides from my talk (the 20 min version) online:
> After a discussion with Matt Trout in the pub I am not as convinced about my
> tip of putting an 's' at the end of a table name (there's now a comment in
You'll find a ton of opinion on this if you look online.. The general
consensus AFAICT is to not have plural table names, despite its
initial seductive appeal (select * from authors, has a ring to it).
Apart from weirdnesses like person/people, the single row as you say
expressed as a plural sounds odd, as do plurals in join conditions.
There's an argument from the ER crowd that entities (classes) are
singular so why transform your singular entity names to plural when
making concrete in SQL/database?
My personal experience has been initially plural and then after much
SQL/DB work going back to singular as I hated all the little awkward
moments that seem to crop up.
(There's the argument that RoR requires plural table names so that
must be wrong :-))
Great talk btw :)
> the slides to this effect), but I need to do some testing before I work out
> what I would actually recommend, at the moment I'd suggest consistency is
> the best approach and adding the 's' does still make the relationships
> clearer when your learning, even if as Matt points out it makes the Result::
> package name a bit odd (Result::Authors, being for a single author).
> Matt's going to review the talk so I may put up a second version at some
> Anyway thanks to everyone that made is such a great day.
More information about the london.pm