xscribe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2012-Oct-15 09:44 UTC
Database integrity and multiple users?
Does RAILS ensure that multiple users of a RAILS application won''t create a corrupt database if each user is creating database entries with foreign keys linking multiple tables together? Do you have to use explicit table locking ? Thanks, P. -- 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 To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/ycUeZ3lz49gJ. For more options, visit https://groups.google.com/groups/opt_out.
On Oct 15, 10:44 am, "xscr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <xscr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Does RAILS ensure that multiple users of a RAILS application won''t create a > corrupt database > if each user is creating database entries with foreign keys linking > multiple tables together? > > Do you have to use explicit table locking ? >Rails doesn''t do anything by default. You can use optimistic or pessimistic locking of rows if you need to guard against concurrent modifications to a single row. I''ve never needed table level locking (which is an obvious scalability bottleneck) I personally always use foreign key constraints to enforce integrity of those references Fred> Thanks, > > P.-- 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@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.