Skip to content
Advertisement

Sqlite3 store list in column

I havea some data i need to store in a sqlite database that looks like this

How do i store the list of programming languages for each user in sqlite3

Advertisement

Answer

The standard solution is have a table for each thing: users, languages, and the table that holds the 1 to many relationship which in this case is users_languages. user and language are relatively large and variable sized key, so it’s pretty common optimization to introduce a an artificial key usually integer auto_increment.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement