Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Should I se SQLite to create a simple High-scores database?

I'm quite new to programming and am currently making an LAN 2D Shooter on Python3 (Pygame). For my game, the player will have the option to log in or sign up and their highscores and login details (username and encrypted password) are going to be stored in a database.

I only have one talbe with 4 fields (Primary Key ID, Username, Password and High-score). Would there be an advantage of using Sqlite instead of something like a csv file? I've heard that sqlite is mainly for relational databases, but do you think it would be appropriate for this?

I'm going to be storing just the player's own highscores locally btw. Any advice on this matter would be helpful, thanks :)
Quote:sqlite is mainly for relational databases
Sqlite3 is a relational data base management system (DBMS), it's not like one.

It would be perfectly OK to use Sqlite3, but simpler to arrange your data in memory as a dictionary, and then store as a JSON file.
Or arrange as a data frame an save with pandas.

Using sqlite3 with python is quite simple, see:
Oh ok, I was confused because sqlite is known for relational databases so I didn't know if it would be ok to do a flatfile on it. Thanks for the help.
There are also simple and good databases like TinyDB or dataset.
Here a test a did with dataset some years ago.
Larz60+ likes this post

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Create database in python module ? Johnse 5 364 Sep-05-2019, 04:14 AM
Last Post: buran

Forum Jump:

Users browsing this thread: 1 Guest(s)