I'm creating an application where i store all the users settings into a MySQL server. But now i got like something when tableOption3 = id25 then the users theme is red. I already got 5 such tables. And it going to get alot bigger. The user can use an mobile application that saves the personal settings for the website and java application and visa versa.

我正在创建一个应用程序,我将所有用户设置存储到MySQL服务器中。但是现在我在tableOption3 = id25时得到了一些东西,那么用户主题是红色的。我已经有5张这样的牌桌了。它会变得更大。用户可以使用保存网站和Java应用程序的个人设置的移动应用程序,反之亦然。

Do I have other options? And I keep wondering what happens if there would be 100 personal option to be loaded. Would the user notice this in loading speed.

我还有其他选择吗?而且我一直想知道如果要加载100个个人选项会发生什么。用户是否会在加载速度中注意到这一点。

2 个解决方案

#1


You have to save these personal user settings somewhere and you will always want to use some sort of datastore, like: SQL databases, NOSQL, flat files.
I think that SQL databases are usually way to go, and having more then 100 personal options shouldn't degrade performance too much.

您必须在某处保存这些个人用户设置,并且您始终希望使用某种数据存储,例如:SQL数据库,NOSQL,平面文件。我认为SQL数据库通常是可行的,拥有超过100个个人选项不应该过多地降低性能。

But my advice will be to avoid having multiple tables. You can achieve desired effect, with all properties stored for all users, by having just one table, i.e.:

但我的建议是避免使用多个表格。通过只有一个表,您可以实现所有用户存储的所有属性所需的效果,即:

 USER_ID | PROPERTY | PROPERTY_VALUE
 1       | COLOR    | RED
 2       | COLOR    | BLUE
 1       | FONT_SIZE| 12
 2       | FONT_SIZE| 14
etc

更多相关文章

  1. 有没有办法确定是由Web应用程序(php进程)执行数据库行更新,还是通过
  2. 是一个mysql临时表,每个用户访问创建它的脚本是唯一的...?
  3. MVC框架——学生信息管理系统(多表,多事务如何处理,一个用户如何共
  4. MySQL5.7以上版本root用户空密码修改(windows系统、zip版MySQL)
  5. 如何在产品和类别应用程序树中将1个表连接到(2个不同的表作为一个
  6. MySql查询脚本,每月统计活动用户。
  7. MySQL用户管理(5.7.20-winx64)
  8. Laravel - 如何为用户赋予多重角色?
  9. Linux下修改MySQL用户(root)密码

随机推荐

  1. Android SplashActivity启动时黑屏的问题
  2. Android包(android.view.animation)的简介
  3. Android: Android Light Sensor HOWTO
  4. android 获取位置
  5. Android Studio之编译t提示Invoke-custom
  6. Android添加USB add-on硬件访问服务
  7. Android(安卓)四大组件之BroadcastReceiv
  8. Android(安卓)View和ViewGroup
  9. 学习目录
  10. First day of android study