【问题标题】:What Should be database structure to create excel sheet like view? mean should tables store in json format or create tables for cells,rows and columns数据库结构应该是什么来创建类似视图的 excel 表?意味着表应该以 json 格式存储还是为单元格、行和列创建表
【发布时间】:2022-12-10 07:32:43
【问题描述】:

嗨,大家好,

我想创建一个板,所有板都将包含组,每个组都有表(行和列),所以我应该将表(行和列)保存为 json 格式还是为行、列和单元格等创建单独的表?

我想创建一个像 monday.com 这样的系统

【问题讨论】:

    标签: mysql sql laravel database monday.com


    【解决方案1】:

    取决于您使用的是哪种数据库,如果它是文档数据库,那么 JSON 是自然的方式,在 SQL 数据库中,更好的方法是用一个表来表示行,并用一个单独的表来表示列映射,这将使您可以灵活地随意添加列。

    例如:-

    行表

    | id | details       |
    |----|---------------|
    | 1  | row_1_details |
    | 2  | row_2_details |
    

    列表

    | id | column_name | column_value | row_id |
    |----|-------------|--------------|--------|
    | 1  | col_1       | skjdjks      | 1      |
    | 2  | col_2       | jslkds       | 1      |
    | 3  | col_1       | dhkshd       | 2      |
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-05-04
      • 2022-12-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-25
      • 1970-01-01
      相关资源
      最近更新 更多