S
S
SideWest2019-05-09 16:04:51
Database design
SideWest, 2019-05-09 16:04:51

How to store settings in database?

I am writing my bot for VK, it works with a database in sqlite, there is a need for settings for each user.
Tell me, how best to write down these settings? And what is the best way to work with them?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2019-05-09
@SideWest

A plate of 2 columns, user_id + properties, ideally if there is a native json field, if not, the line will do.
You can have a plate with 3 columns, user_id+key+value
You can have 2 plates, keys: id+key & properties: user_id+key_id+value

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question