Table naming question...

Matt Slay
Mon, 10 May 2010 20:54:55 -0000

Conisdering the naming conventions of ActiveRecord tables...

I have a parent table called "Jobs" and a child table to it called
"JobItems" which holds the line items on any give "Job" that
we process.

Now I''m dealing with the Invoice table, which is a Parent-type of table
("Invoices"), and I have an "InvoiceItems" child that is
related to it.

However, in some ways, each Invoice is also a child record to a Job.
(Some Jobs build up multiple Invoices if we do progress billing of
partial shipments).

So, one could argue that the "Invoices" table should be named
"JobInvoices", and the child invoice items would go in a table name
"JobInvoiceItems".

So...

Invoices and InvoiceItems

or

JobInvoices and JobInvoiceItems

Which way is the accepted way?
--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at