Database table design

a b c d 4 people

a delegate the task to b.

b delegate the task to c.

c delegate the task to d.
.

The record seen by

a. A-> b-> c-> d
.

how should the data table be designed?

May.16,2021

because MySQL does not support storing sequential list types , of course, if the task queue a-> b-> c-> d is regarded as a string. Has
ever considered adding some additional attributes to the task , such as counting, timestamp, etc. Because the task itself should have a certain timeliness.

if you understand it correctly, it means that when a user starts to take over the task , the subsequent tasks of are visible to him .

for example, if the execution order of a task is a-b-c-d-b , you can have:

  

make a task transfer record table. A task can correspond to multiple transfer records. All the transfer records can be queried according to the task ID, and in ascending order according to time, the effect of a-> b-> c-> d can be obtained

.
  • Sql optimization: add judgment when querying

    1. Structure of the data table: order ID:orderid, user ID:memberid, date of order issued: order_date 2. Demand: need to query the record of orders issued from 2017 to April (orderid,memberid). If the user of the current record has placed an order b...

    Mar.20,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5bb75-44388.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5bb75-44388.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?