Re: [Rails] what is the best way to create a rota

2014-10-12 Thread Colin Law
On 12 October 2014 01:02, Mohammed Rashid li...@ruby-forum.com wrote: a rota where users can have their own unique fields they can add and share with other staff members. Where they can create edit show and delete only their own entry but admin can control everything. I got very close at a

[Rails] One huge table or separate tables? design issue

2014-10-12 Thread Yongbiao Long
Hi, everyone, I've learned Rails(Web development) on my own for two months, and came to a situation like this: There are two tables A and B in my database. A 'has_many` B. For every user input, There is an entry in table A. At the same time, I need to add a huge number(say 100,000) of entries in

Re: [Rails] One huge table or separate tables? design issue

2014-10-12 Thread Vivek Sampara
Hi, Creating multiple tables is not the key to solve this problem. If your rows are higher than 10 million records, then you have to make sure you archive the older ( Unused ) rows or solve it through MASTER - SLAVE db approach. Ideally when you're worry about performance issues with databases ,

Re: [Rails] One huge table or separate tables? design issue

2014-10-12 Thread Colin Law
On 12 October 2014 02:32, Yongbiao Long longyongb...@gmail.com wrote: Hi, everyone, I've learned Rails(Web development) on my own for two months, and came to a situation like this: There are two tables A and B in my database. A 'has_many` B. For every user input, There is an entry in table

[Rails] Re: One huge table or separate tables? design issue

2014-10-12 Thread Frederick Cheung
On Sunday, October 12, 2014 9:51:55 AM UTC+1, Yongbiao Long wrote: Hi, everyone, I've learned Rails(Web development) on my own for two months, and came to a situation like this: There are two tables A and B in my database. A 'has_many` B. For every user input, There is an entry in

Re: [Rails] One huge table or separate tables? design issue

2014-10-12 Thread Yongbiao Long
On Sun, Oct 12, 2014 at 5:17 PM, Colin Law clan...@gmail.com wrote: Are you sure your basic design is appropriate? Having 100,000 associated records per user seems very high. Are you able to explain what is in those records in case an alternative can be suggested? Thank you Colin! I'm

Re: [Rails] One huge table or separate tables? design issue

2014-10-12 Thread Colin Law
On 12 October 2014 11:34, Yongbiao Long longyongb...@gmail.com wrote: On Sun, Oct 12, 2014 at 5:17 PM, Colin Law clan...@gmail.com wrote: Are you sure your basic design is appropriate? Having 100,000 associated records per user seems very high. Are you able to explain what is in those

Re: [Rails] One huge table or separate tables? design issue

2014-10-12 Thread Colin Law
On 12 October 2014 11:54, Colin Law clan...@gmail.com wrote: On 12 October 2014 11:34, Yongbiao Long longyongb...@gmail.com wrote: On Sun, Oct 12, 2014 at 5:17 PM, Colin Law clan...@gmail.com wrote: Are you sure your basic design is appropriate? Having 100,000 associated records per user

Re: [Rails] One huge table or separate tables? design issue

2014-10-12 Thread Jim Ruther Nill
you can also run a task that archives past dates to a duplicate table since you'll rarely need them. maybe you can keep 1 month data in the table that you're writing to. this way, you won't have to worry about the exponential growth of the table you're always accessing. On Sun, Oct 12, 2014 at

Re: [Rails] One huge table or separate tables? design issue

2014-10-12 Thread Yongbiao Long
On Sun, Oct 12, 2014 at 6:54 PM, Colin Law clan...@gmail.com wrote: The first point is that you should only add rows as seats are booked, use that fact that there is no row to indicate that there is no booking. Secondly, what is the date? Is that the date of the journey or the date of the

Re: [Rails] One huge table or separate tables? design issue

2014-10-12 Thread Yongbiao Long
On Sun, Oct 12, 2014 at 7:18 PM, Jim Ruther Nill jvn...@gmail.com wrote: you can also run a task that archives past dates to a duplicate table since you'll rarely need them. maybe you can keep 1 month data in the table that you're writing to. this way, you won't have to worry about the

Re: [Rails] One huge table or separate tables? design issue

2014-10-12 Thread Yongbiao Long
On Sun, Oct 12, 2014 at 7:28 PM, Yongbiao Long longyongb...@gmail.com wrote: I do it in this way because I have another table representing the number of left seats, and I think it's easier to update this table in my way(in this case, the number of leaf seats from 1-3, 1-2, 2-3 decreases by

Re: [Rails] One huge table or separate tables? design issue

2014-10-12 Thread Colin Law
On 12 October 2014 12:28, Yongbiao Long longyongb...@gmail.com wrote: On Sun, Oct 12, 2014 at 6:54 PM, Colin Law clan...@gmail.com wrote: The first point is that you should only add rows as seats are booked, use that fact that there is no row to indicate that there is no booking. Secondly,

[Rails] Senior Ruby on Rails Developer - Berlin - Visasponsoring

2014-10-12 Thread Thomas Lersch
A worldwide brand and fast-growing media and entertainment company have big expansion plans for there development team to bring in several Senior Ruby on Rails Developers. They are looking for developers to be responsible for providing technical solutions, designs and implementations for new and

[Rails] Re: ActiveSupport::Concern small question

2014-10-12 Thread Matt Jones
On Friday, 10 October 2014 09:08:29 UTC-4, rusik wrote: Hello all. In this example, as i understand that *included* block is running when Exclaimable module is included in Person and *after* a Person class methods are 'initialized' No. See below for additional information, but if

[Rails] Posting rails application online

2014-10-12 Thread Aspiring.Student.programmer
Hey I am just curious when i finish my application (but haven't yet) can you post the application online and if so how do u do it as to submit my assignment i would be to difficult without putting it online as you need the command prompt to run the server. Regards -- You received this

Re: [Rails] Posting rails application online

2014-10-12 Thread Scott Ribe
On Oct 12, 2014, at 5:39 PM, Aspiring.Student.programmer sabrina@gmail.com wrote: I am just curious when i finish my application (but haven't yet) can you post the application online and if so how do u do it as to submit my assignment i would be to difficult without putting it online as