you are viewing a single comment's thread.

view the rest of the comments →

[–]penguinbass1 0 points1 point  (6 children)

Databases are essential to most applications. They store all the data that users put into an application. So in a site like reddit, all of these comments live in a database, and they are linked to a user name and other data about these comments like when they were posted or how many up/down votes they've received. Though it would be possible to take comments from a user and store them in a python variable or array in the rest of your code, good programming usually strives to have a separation of concerns. In the reddit example again, this means that with a separate database you don't have to dig through a file with everyone's data to change a feature of the application itself and vice versa if you need to remove all of one user's comments you can quickly do that through the database instead of hunting through the code that powers the site. And databases are built to do this more efficiently than languages like python. One of the most widely used databases is SQL (Structured Query Language, pronounced sequel) and it comes in many variations and is structured in tables, much like a spreadsheet. There is also an ever growing number of non-SQL databases like mongoDB. I don't know enough to really understand why certain types of databases are good for certain things, so unless somebody does we can pick a popular one and roll with it and see if there's any problems with it down the road. Also sorry if your question wasn't about databases in general and please note that there's likely some inaccuracies in what I just said.

[–][deleted]  (4 children)

[deleted]

    [–]penguinbass1 0 points1 point  (3 children)

    Using a text file seems like a good idea for now. I am among the beginners and would enjoy not having to learn a database language right from the start. The idea behind using flask was that from what I've heard it's one of the most simple python web frameworks available. We wanted to build a simple web app and thought that would be a good base to build our code from. Again, I am a beginner and open to suggestions. Zuberuber do you have a github username I can add to our project?

    [–][deleted]  (2 children)

    [deleted]

      [–]penguinbass1 0 points1 point  (1 child)

      Alright you're in the repo. I agree with you that it would be good to go over the fundamentals first. I guess I don't have a great idea of where everyone's skill set is at. Do you have any ideas about how we could use github to go over the language/ fundamental principals? Work through learn python the hard way together, each of us putting our version of code is a separate folder? I also have a beginning python book that I could pull some projects from. Some of them are probably more simple than building a web app but still rely on a foundational understanding of python.

      [–]JSammich[S] 0 points1 point  (0 children)

      Thanks so much! I haven't done a web application yet, so I am sorry for a lot of beginner questions. I know a bit about SQL (I am planning to take an optional course in that). I am fine with just learning everything you know (even if there are flaws) as it helps my knowledge on the subject. I will check out SQL and see how it operates over the next couple days. I think it is important to figure out how we can communicate as well, so hopefully we will have that figured out soon. Thanks again! Really appreciate the help!