简体   繁体   English

MySQL:这套自定义成员记录应该形成一个单独的数据库,一个新表还是仅一个新列?

[英]MySQL: Should this set of custom member records form a separate DB, a new table, or just new columns?

I have two MySQL databases,one from a membership script (MS) and one from a forum script (FS). 我有两个MySQL数据库,一个来自成员资格脚本(MS),一个来自论坛脚本(FS)。

MS is like this: MS是这样的:

___________________________________________________  

useremail    |      membergroups | oranges | apples | pears |... (and 30 more columns)  
_______________________________________________  
jill@jill.com | A,B,C     | 1     |  0  |   1  |...... (and 30 more values)
________________________________________________  


and FS is like this:


- - - - -- - - - -- - - -- - - - - -- - - -

USER_ID  | USERNAME | EMAIL     |    GROUPTYPE  |
- - - - - - - - - - - - - - - - - - - - -- - - -
2289   | jill     | jill@jill.com | gold  |
---------------------------------------------

So: 所以:

1) The two member tables are of course very different. 1)这两个成员表当然有很大的不同。
2) The MS member table has many, many data columns. 2)MS成员表具有许多数据列。

Goals: 目标:
1) I'd like to draw on the many data in MS in whatever membership script/forum combo I wind up ultimately using. 1)我想以最终使用的任何成员资格脚本/论坛组合的形式利用MS中的许多数据。 2) I want to establish a Single Sign-On, so the user only needs to login once for both systems to operate. 2)我想建立一个单一登录,因此用户只需要登录一次就可以使两个系统同时运行。

Question: Would it be best to 问题:最好是

a) store the MS data in the existing MS DB, and just have the FS DB query it; a)将MS数据存储在现有的MS DB中,然后让FS DB查询它;
b) add a new table to the FS DB, and add the old MS data to the new FS table, so that are now two distinct tables carrying member data in the same DB; b)将新表添加到FS DB中,并将旧的MS数据添加到新FS表中,以便现在是两个不同的表,它们在同一DB中承载成员数据;
c) add the MS data to newly created columns in the FS DB; c)将MS数据添加到FS DB中新创建的列中;
d) do something else that I haven't thought of. d)做其他我没想到的事情。

My gut says "b" is the best choice, but since I've gotta hire someone to do this, I'll stackoverflow's insights over the promptings of my gut. 我的直觉说“ b”是最好的选择,但是由于我必须雇用某人来做,因此我将根据我的直觉提示对stackoverflow进行深入分析。

In my respect b is also best choice. 就我而言, b也是最佳选择。 I prefer you to go with it . 我更希望你随它去。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM