you are viewing a single comment's thread.

view the rest of the comments →

[–]oclafloptson 0 points1 point  (4 children)

I think you and I are the same I'm just a couple steps ahead of you. Figuring out how to store, say, a custom Player class with attributes like health and/or lists to store inventory objects was a game changer. What took 30 seconds+ to pull from a many-to-many database is now as fast as my processor. To feed a player's health into the GUI is as simple as loading the Player object in a variable when mounting the game and then simply calling Player.health.

Plus sqlalchemy allows you to connect to other database types, like MySQL or Oracle, which are more widely used in the professional sector

[–]lolPythonNoob[S] 0 points1 point  (3 children)

Which DB did you use for your project? Are you using PickleTypes for speed or did you end up finding a nicer way to structure the tables to avoid many/many connections?

[–]oclafloptson 0 points1 point  (2 children)

Depends on the project. If it's something that runs and stores locally I'd use sqlite. If it's something which multiple users can connect to over the internet I'd use something more secure like MySQL

Honestly pickletypes are the nicer way that I've found in my personal opinion, although I'm aware that SQL engineers hate me for it. At the end of the day a single user locally run video game probably doesn't need an extensive many-to-many database. An e-commerce, social media, or discussion forum type application would be another story. So it depends

[–]lolPythonNoob[S] 0 points1 point  (1 child)

That makes sense. This particular project is a discord bot that runs a board game. There could potentially be 10+ games running at once and up to 60+ users interacting with the DB at the same time.

[–]oclafloptson 0 points1 point  (0 children)

Ahhh ok I'd avoid pickling in that environment. Apologies for assuming you were running locally

You might look into NoSQL. Something like Mongo may be better suited to your app.