In the Rails world, what Scott wrote is basically right (bordering on insane). ActiveRecord really won't place nice with that kind of a design.
Outside of the Rails world, "Big Data" and Reporting people do things like that (date stamping table names) for aggregate reporting. There are times when those kinds of designs aren't such a bad idea (like you have a massive amount of data and you want to build a reporting engine). But if that's your case, Rails isn't the right tool for you. You could still write a Rails app, but then use some kind of reporting tool to extract data from your Rails database and copy it into another reporting database where you will do your reporting operations (and probably use Crystal Reports or something to deal with that data). On Oct 15, 2014, at 10:58 AM, Scott Ribe <scott_r...@elevated-dev.com> wrote: > On Oct 15, 2014, at 8:44 AM, Yongbiao Long <longyongb...@gmail.com> wrote: > >> How to deal with the daily created tables in rails? > > Don't do that. It's an unnormalized, broken, bordering-on-insane design. The > date is an attribute of some entity that belongs in its own table, to which > your other data is related. Figure out that entity, design it, set up the > relationship appropriately between the two. > > -- > Scott Ribe > scott_r...@elevated-dev.com > http://www.elevated-dev.com/ > (303) 722-0567 voice > > > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/97FDAFF1-402E-4AE6-BED3-AC1F480E5699%40elevated-dev.com. > For more options, visit https://groups.google.com/d/optout. > ---- Jason Fleetwood-Boldt t...@datatravels.com http://www.jasonfleetwoodboldt.com/writing All material © Jason Fleetwood-Boldt 2014. Public conversations may be turned into blog posts (original poster information will be made anonymous). Email ja...@datatravels.com with questions/concerns about this. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4628DB17-2C9E-46DA-8F9E-145D2C4711B3%40datatravels.com. For more options, visit https://groups.google.com/d/optout.