1

thank you for helping me. I got a problem when I design my database structure for kanban board application.

How can I design kanban board to rank card in a list for sorting,drag and drop,.. Currently this is my design

1. cards table
-id (P)
-list_id
-name
-title
??? (How to design for ranking cards in list for sorting, drag and drop in list)
  1. card_lists table

-id (P) -board_id -name ?? (How to design for ranking status card list in boards for sorting, drag and drop in board) 3. boards table -id -name [![enter code here][1]][1]

Imagine I am doing the card movement function in the kanban board, (move in the list or move from one list to another). I'm having a problem using a weight as an metric that determines the order of cards in a list. The more we move the card, the more number of decimal digits of the weight

=> Leads to the data type: FLOAT or DOUBLE cannot be saved correctly (divide and divide and divide,... ) So is there any way to overcome this problem and is there a better way to calculate the weight to store in the database? Thank you so much for your help

This is problem description

DFX Nguyễn
  • 111
  • 1

1 Answers1

0

Pre GW BASIC, there was TRS-80 Level ][ BASIC.

In that language, you had line numbers for each line of code.

The standard method for programming was to use intervals of 10 for your numbers as you go. Then, when you need to add code, you have space to add code.

For display/rank order, I recommend the same thing.

However, I've seen (and created) a "re-enumerate" procedure that was called after every rearrangement. This kept the numbers in multiples of 10. The procedure was a simple MERGE statement with the enumeration based on RANK() × 10

Michael Kutz
  • 4,919
  • 1
  • 10
  • 14