[Maypole] Maypole::Plugin::Relationships and YAML

Peter Speltz peterspeltz@yahoo.com
Tue, 1 Feb 2005 14:38:55 -0800 (PST)


--- Dana Hudes <dhudes@hudes.org> wrote:

> 
> 
> On Tue, 1 Feb 2005, Dave Howorth wrote:
> 
> > Sebastian Riedel wrote:
> > > Plural table names are bad bad bad!
> > 
> > They work perfectly with my loader :)
> > That was one inconsequential factor that drove me to write it.
> 
> I don't see your loader on CPAN...
> > 
> > > Use id as primary key...
> > > 
> > > This is better.
> > 
> > Well, it's doubleplus conformant with the thought police maybe :)
> 
> With Sebastian, and nobody else including major works on database theory,
> ontology, semantics....you don't see Ullman writing schema with 'id'.
> Nor Codd. I don't believe Tim Berners-Lee used that as an identifier
> in his work on the Semantic Web.
> 

Why is id recommended for all PK's?  I'm guessing it makes something convenient
but i haven't found what. CDBI users and some old database programmers from 8
years back are only people i've heard to say this.  Database texts and articles
i've read in past 2 years all say use something like "beer_id" and and if
'beer_id' is FK use 'beer_id' in foreign table too.

> Individual objects may, or may not be, plural. Tables of rows certainly
> make sense as plural names. Or worse yet, collection names may be another 
> word altogether. think about the plural and singular of clothing.
> We have an article, not item, of clothing and we have a collection of 
> clothes....or a line of clothes is a term often used in the fashion 
> industry (and therefore in a system catering to fashion photographers...).
> 
> We speak of a particular designer's line of clothes, their (e.g.) fall 
> collection, and a particular garment.

I recall experts recommending singular names always. Also lowercase table adn
column names because some dbms's are strange. My experience is in the english
language singular is good for preventing typos cause it's easier to spell
because plural endings vary. Lowercase is good cause you have less to think
about. 

Someone should write up an article: "Database naming conventions and structure
for a new Maypole, Class::DBI application ". I would but i dont have th eknow
how.



=====
pjs


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250