Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAlexander Hansson
2,083 PointsDatabases and lists?
Are lists common in database programming or for communicating with databases?
4 Answers
Matthew Hill
7,799 PointsThere's a separate course for databases in Python. This covers the use of Peewee which is a module designed for database interaction using Python (although there are plenty more available, Django has its own ORM for interacting with databases for example). Could you say how you were anticipating using the list? This might make it easier to answer your question, but these ORMs I've mentioned use classes and method calls to interact with databases, not lists
Alexander Hansson
2,083 PointsAha. Thank you. Now I understand. I was actually thinking about storing different sets of data in lists and lists of lists like this:
storing in lists -> [1,2,3,4,5] storing in lists of lists -> [[fruit_type,color],[fruit_type,color],[fruit_type,color],[fruit_type,color]]
And I was wondering if that could be used for interacting with databases. But I must admit. My knowledge is very limited at this point in time because I am still just a beginner. But I feel that I am learning at a stunning rate with your courses. Thanks, actually your answer is very sufficient for me for now. :)
Alexander Hansson
2,083 PointsTo clarify, I was just guessing but I have to learn more to understand the concepts of databases etc. :) The only thing I need to do right now is to learn and dig in to the basic concepts of programming. :)
Matthew Hill
7,799 PointsSounds like a good way forward! The more I learn the more it all comes together, good luck, Matt
Etern Mist
Courses Plus Student 997 PointsYou can also store your data that way using MongoDB. If you want to store it as array that is.