user158057
user158057

Reputation:

Python and database

I am working on a personal project where I need to manipulate values in a database-like format.

Up until now I have been using dictionaries, tuples, and lists to store and consult those values.

I am thinking about starting to use SQL to manipulate those values, but I don't know if it's worth the effort, because I don't know anything about SQL, and I don't want to use something that won't bring me any benefits (if I can do it in a simpler way, I don't want to complicate things)

If I am only storing and consulting values, what would be the benefit of using SQL?

PS: the numbers of rows goes between 3 and 100 and the number of columns is around 10 (some may have 5 some may have 10 etc.)

Upvotes: 1

Views: 339

Answers (3)

Wai Yip Tung
Wai Yip Tung

Reputation: 18794

SQL is useful in many applications. But it is an overkill in this case. You can easily store your data in CSV, pickle or JSON format. Get this job done in 5 minutes and then learn SQL when you have time.

Upvotes: 2

Alex Martelli
Alex Martelli

Reputation: 882791

SQL is nice and practical for many kinds of problems, is not that hard to learn at a simple "surface" level, and can be very handy to use in Python with its embedded sqlite. But if you don't know SQL, have no intrinsic motivation to learn it right now, and are already doing all you need to do to/with your data without problems, then the immediate return on the investment of learning SQL (relatively small as that investment may be) seem like it would be pretty meager indeed for you.

Upvotes: 7

YOU
YOU

Reputation: 123937

No, I think you just stick to dictionaries or tuples if you only have rows around 100

Upvotes: 2

Related Questions