4 ms·
You'd recommend MySQL over SQLite? The latter comes "baked in" to Python, so no installation required, and I was planning to go with that as a starter to avoid
by LookingToLearn 15y ago
You'd recommend MySQL over SQLite? The latter comes "baked in" to Python, so no installation required, and I was planning to go with that as a starter to avoid any problems with installation and configuring.
It would be easy to write a command line for that so I could then experiment. Thoughts?
And any suggestions for guide to SQL syntax and semantics?
Many thanks.
- drpancake 15y agoGood point - SQLite is even easier to get started with. I believe its command-line tool comes bundled on most distros as 'sqlite3'. As for syntax and semantics... it's so simple that anything on Google will do. The interesting part is normalization - again I'm sure there's plenty of free guides.
- LookingToLearn 15y agoI'm pretty sure normalization won't be a problem in my context and with my background. My requirement is simple, and the design straight-forward. Many thanks for your response.
- drpancake 15y agoWhen I say normalization that includes simple cases. For example using foreign keys to separate out your data - pretty common in most schemas. Good luck!
- LookingToLearn 15y agoIndeed. And thanks again.
- andrewcooke 15y agosqlite is nice because it's so easy to use but it's a pig to optimize and isn't a complete sql (it lacks typing, foreign keys are not enforced, etc etc). despite that i would (do!) use it for projects where you're storing data for one program (configuration, etc). but if the main functionality of your program is storing data then you are better with something a bit more comprehensive. to be honest, i would suggest postgres over mysql, but either will do. not only as these more feature-complete, but they are much easier to optimise. also, if you are using python, you might consider sqlalchemy. that can be used as an orm, but is really more like a very neat embedding of sql in python. and it will even let you define your database in python. i think it's very cool. but there's also a risk that you might end up confused about what is sqlalchemy, what is python, and what is sql. finally, python's documentation for calling sql is not that great. you'll probably end up wanting to read this document - http://www.python.org/dev/peps/pep-0249/ http://www.python.org/dev/peps/pep-0249/
- LookingToLearn 15y agoExcellent information - thanks.