hunk
V2EX  ›  问与答

mongodb 是参照关系数据库做强关联还是做冗余?

  •  
  •   hunk · Jun 27, 2018 · 1966 views
    This topic created in 2913 days ago, the information mentioned may be changed or developed.

    例如登录账号,所在公司,是单独建立公司的字典表,还是将公司名直接写进账号表里? 前者是典型的关系型数据库,后者其实使用更方便,但脱离了范式的约束,一下子有些担心以后产生啥问题。

    2 replies    2019-07-10 19:44:41 +08:00
    reus
        1
    reus  
       Jun 27, 2018
    反正都是要倒闭的,随便
    smallpython
        2
    smallpython  
       Jul 10, 2019
    做冗余比较好吧
    查询效率最高
    就是修改的时候要修改的比较多
    但是查询占大头
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   844 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 21:09 · PVG 05:09 · LAX 14:09 · JFK 17:09
    ♥ Do have faith in what you're doing.