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?
#1
Hi,

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
#2
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: https://docs.python.org/2/library/sqlite3.html
Quote
#3
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.
Quote
#4
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
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  How to debug high-performance additives written in C ++ code? AlekseyPython 5 139 Nov-12-2019, 08:27 AM
Last Post: AlekseyPython
  Create database in python module ? Johnse 5 157 Sep-05-2019, 04:14 AM
Last Post: buran
  high light change made in notepad nadavrock 0 238 Jul-05-2019, 07:25 PM
Last Post: nadavrock
  Book: "Python in high school" arnbod 1 347 Jun-03-2019, 02:12 PM
Last Post: heiner55
  Apple High Sierra problem(s) jamie 1 830 Mar-31-2018, 05:02 PM
Last Post: jamie
  3Blue1Brown high quality Math/Physics contend snippsat 4 1,414 Feb-26-2018, 01:50 PM
Last Post: wavic
  High School coding club willnida 7 1,392 Feb-08-2018, 04:12 PM
Last Post: nilamo

Forum Jump:


Users browsing this thread: 1 Guest(s)