semoon
V2EX  ›  问与答

一个数据库表结构设计的问题

  •  
  •   semoon · Aug 23, 2012 · 3371 views
    This topic created in 5107 days ago, the information mentioned may be changed or developed.
    任务记录表,任务可能分几个步骤,不如步骤1,步骤2

    常规的想法:

    任务1,步骤字段1,步骤字段1;
    任务1,步骤字段1,步骤字段2;
    任务1,步骤字段2,步骤字段1;
    任务1,步骤字段2,步骤字段2;
    ...

    切记是关系型数据库!!!


    当然也可以是

    任务1,步骤1#步骤2#。。。自己解析下,就是看上去不舒服。。。
    1 replies    1970-01-01 08:00:00 +08:00
    tearsinchina
        1
    tearsinchina  
       Aug 23, 2012
    1张task表,就2个field,一个是主键,另一是stepId

    另一张Step表,
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5784 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 02:53 · PVG 10:53 · LAX 19:53 · JFK 22:53
    ♥ Do have faith in what you're doing.