Jump to content

Python Database

Wictorian
Go to solution Solved by Kilrah,

What is the best option for setting up a database in python? I have tried just writing to .txt files and using pickle but having to rewrite the whole file to make edits is annoying to me, is there an option that enables regular editing?

Link to comment
Share on other sites

Link to post
Share on other sites

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

sqlite would be a good choice here - it's pretty much what it was designed for.  The fact that a lot of tooling exists to touch it outside Python is a bonus.

Link to comment
Share on other sites

Link to post
Share on other sites

Why reinvent the wheel? If you need a database, use an actual database (SQLite, MariaDB) and the appropriate client libs instead of implementing your own.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

19 hours ago, Eigenvektor said:

Why reinvent the wheel? If you need a database, use an actual database (SQLite, MariaDB) and the appropriate client libs instead of implementing your own.

This is just plain good advice for programming in general.

 

99% of all programming problems have already been solved, better, by someone else.  Use it.  Especially for encryption.  Unless you know exactly why you're rolling your own encryption, you have no business rolling your own encryption.

Link to comment
Share on other sites

Link to post
Share on other sites

7 hours ago, SydneyBrokeIt said:

This is just plain good advice for programming in general.

 

99% of all programming problems have already been solved, better, by someone else.  Use it.  Especially for encryption.  Unless you know exactly why you're rolling your own encryption, you have no business rolling your own encryption.

A bit random but good advice about encryption nonetheless. I had implemented my encryption because I had thought it would be easier. I won't use encryption  this time at all though.

Link to comment
Share on other sites

Link to post
Share on other sites

Yes, although in most cases "large chunks of data" don't really belong in a database... context is missing to give more advice though.

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

  • 1 month later...
3 hours ago, t0int said:

You can try Redis

This is very dependent on your needs, and Redis generally isn't what I would recommend as a database if you have any sort of complicated structures.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×