新手问题 关于使用 Legacy db 的几个小问题

oth · April 03, 2015 · 1885 hits

需要获取 Legacy db 的数据,关于这个 mysql db:

  • 数据还在增长,意味着很难彻底放弃使用这个 db
  • 所有 table 之间没有 foreign key

几种解决方法:

  1. Database Views
  2. Overriding Defaults
  3. Rebuilding

问题:

  • 如果使用 解决方法 1,或 2,能否在设计 module 时候 使用 foreign key,或者说 M:M 关系该如何实现?

参考 http://tutorials.jumpstartlab.com/topics/models/legacy_databases.html http://factore.ca/blog/89-using-views-to-connect-a-legacy-database-to-rails

No Reply at the moment.
You need to Sign in before reply, if you don't have an account, please Sign up first.