MySQL 5.5 Community Server
MySQL 5.6 Community Server
Percona Configuration Wizard
XtraBackup 搭建主从复制
Great Sites on MySQL
Percona
MySQL Performance Blog
Severalnines
推荐管理工具
Sequel Pro
phpMyAdmin
推荐书目
MySQL Cookbook
MySQL 相关项目
MariaDB
Drizzle
参考文档
http://mysql-python.sourceforge.net/MySQLdb.html
rupert
V2EX  ›  MySQL

请问下怎么设计表? 没有玩过复杂的表设计

  •  
  •   rupert · Feb 21, 2017 · 3760 views
    This topic created in 3393 days ago, the information mentioned may be changed or developed.

    本人 js 背景, 这种数据一般就直接存 MongoDB, 取出来也不麻烦。

    如果是存为 Mysql, 是不是要分为几个表 addressList, history, products, leaders, 用 companyId 关联?

    还有数组应该怎么存合适?比如 addressList, labels, leaders 。

    2 replies    2017-02-21 17:14:39 +08:00
    bombless
        1
    bombless  
       Feb 21, 2017
    就是这样,数组用 companyid 关联
    jian529910670
        2
    jian529910670  
       Feb 21, 2017
    数组中 companyId 是一样的话 存 4 条记录 使用 companyId 做业务主键查询
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1145 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 17:35 · PVG 01:35 · LAX 10:35 · JFK 13:35
    ♥ Do have faith in what you're doing.