最好的表结构是什么?
我正在开发一个应用程序,它将存储来自多个不同 MLS 的 MLS(多重列表服务)房产列表。我的大多数客户只会使用一种 MLS,但也有一些客户会使用多种 MLS。我的问题是:设置表格的最佳方法是什么?假设我有 50 个不同的 MLS。每个 MLS 大约有 80k 条记录和 100 个字段。我是否应该将所有列表放入一个表中并通过 MLSID 进行引用?或者我应该为每个 MLS 创建一个新表?每个 MLS 将始终具有相同的字段名称和数据类型。
我认为将每个 MLS 放入它自己的表中对于性能来说是最好的,但对于可扩展性来说却不是。如果我将所有记录放入一个表中,您认为这会对性能产生多大影响?我还认为单个表可能更好,因为当客户使用多个 MLS 时,我可以从单个表而不是多个表中提取数据。想法或想法?
I'm developing an app that will store MLS (Multiple Listing Service) Property Listings from several different MLS's. The majority of my customers will only use one MLS, however, some will use mutliple MLS's. My question is: What is the best method to setup the table(s)? Let's say I have 50 different MLS's. Each MLS will have roughly 80k records and 100 fields. Should I put all listings into a single table and reference by an MLSID? or should I create a new table for each MLS? Each MLS will always have the same field names and datatypes.
I would think that putting each MLS into it's own table would be best for performance, but not for scalability. If I were to put all records into a single table, how much do you think that would effect the performance? I'm also thinking a single table may be better because when the customer uses multiple MLS's, I can pull from a single table rather than multiple tables. Thoughts or ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会将所有 MLS 放在同一张表中。标准化意味着如果存在可重复的数据,一些 MLS 数据也将单独存储。我对这个行业了解不够,无法谈论这个。
如果客户可以有多个 MLS,我将创建一个交集表来明确显示一对多关系。
I would put all MLS's in the same table. Normalization would dictate that if there is repeatable data, some MLS data would be stored separately as well. I don't know enough about the business to speak on that.
And if clients can have more than one MLS I would create an intersection table to explicitly show the one to many relationship.