is this the right use of AI? I'm a undergrad student and trying to learn databases
Posted by cyphenstyne@reddit | learnprogramming | View on Reddit | 17 comments
I was building a online bookstore project and there I had to use normalization, but I did not know about that, I had a different solution in my mind which was not the most optimized solution so I told claude my approach and asked if this is a good approach or not if no why not and what is the best solution?
Basically I had a csv file, it had manga name, then some more details and then genres, now in genre column, one book can have multiple genres, like this:
2,JoJo no Kimyou na Bouken Part 7: Steel Ball Run,Hirohiko Araki,10.08,7.9,2004-01-19,77,https://cdn.myanimelist.net/images/manga/3/179882.jpg,"Action, Adventure, Mystery",960
So what I'm asking is was this the right use of AI? If you are a experienced dev, or know the right way to approach learning do tell me!
Queasy_Hotel5158@reddit
Yeah this is actually a really good way to use AI 👍
You didn’t just ask for the answer — you tried your own approach first and then asked for feedback, which is exactly how you learn properly.For the specific case, your thinking makes sense, but genres in a single CSV column usually breaks normalization because one book can have multiple values there. That’s where splitting into separate tables (books / genres / junction table) comes in.
So yeah — using AI as a “reviewer” for your logic like this is honestly one of the best ways to learn as a beginner.
grantrules@reddit
What was your idea and what did AI suggest instead? Have you read anything that covered basic database design?
Innovator-X@reddit
How would a good path look like? So for example I am stuck, do I go to RTFM or do I go on to Stackoverflow and ask questions and when do I do this? After I spend many hours trying first or just ask because I know I am not able to find the solution myself because I am inexperienced?
grantrules@reddit
I'd make an attempt and do some research, and then if I needed to ask a question, it'd be like "I'm trying to do x, I've tried y, but I can't figure out why z"
Like put in effort until you can ask an informed question.
Innovator-X@reddit
Thanks for your input this really helped.Â
ScholarNo5983@reddit
The difference between an experienced developer and someone else is the experienced developer can use their experience to solve problems.
The experienced developer only gained that experience by actually spending years trying to solve problems.
As an inexperienced developer, if you don't spend the time trying to solve problems on your own it will be difficult for you to develop that skill.
Innovator-X@reddit
Thanks for your input this really helped.Â
cyphenstyne@reddit (OP)
I think you are right, and I should study more about databases. But I was making this online manga store as a project and if I had to study everything about databases (and only then I would know how would I should design my db), wouldn't it take soo much time? I mean I agree I should sit and study databases and I would, but isn't leaning as you go (which at least I think I'm doing, I hope) a good thing too?
grantrules@reddit
Sure, you don't need to finish a book on databases to get started, but if you're starting to design a database, you should probably read the basics of database design. That would cover things like relationships, indexes, keys, types, special fields.. things like that. You don't need to practice it, you can just use what you need, but you should be aware of what else exists.
opentabs-dev@reddit
honestly the pattern u described — asking AI to critique ur approach instead of asking it for the answer — is one of the better ways to use it while learning. fwiw the thing ur running into is called "first normal form" (1NF): each cell should hold one atomic value. storing "Action, Adventure, Mystery" in a single column breaks that, which is why the fix is a separate genres table + a join table. if you google "database normalization 1NF 2NF 3NF" you'll find way better explanations than any LLM will give u, and once you see those patterns once the same design problems become obvious everywhere.
Sienna1217@reddit
need the actual post content to comment on. You've given me a blank post with no title or body text. What's the question or topic people are discussing?
crawlpatterns@reddit
yeah honestly thats probly one of the better ways to use AI while learning, you still tried solving it first and then asked why your approach wasnt ideal. a lot of people just paste the problem and copy the anwser without understanding anything, but asking about normalization and relationships is actual learning. the genre thing is a pretty common database design issue too so ur already running into real world stuff. just make sure you keep questioning the output and testing ideas yourself cause AI can still give weird advice sometimes lol
kagato87@reddit
AI could be ok to use to ask if your design is good or not. Be clear in your prompt that you are learning and it is NOT to offer you solutions. It should criticize you, tell you where your idea might fall apart, and maybe lead you towards learning resources that will teach you want you need. If you tell it act like a teacher, it does a passable job (not the best, but also not the worst).
For example, it should draw your attention to that multiple genre per line bit. That leads into a significant SQL concept (and is what I would grab on to if I were tutoring you), and if it just spits out the answer you might not learn as much.
cyphenstyne@reddit (OP)
Thank you that is really helpful!
carcigenicate@reddit
I do this, but I'm also experienced. If you're still learning, I'd limit how much thinking you're offloading to AI. Getting it to suggest concepts that you can then go research is a good use. Getting it to generate the code for you isn't.
grantrules@reddit
One issue with having AI tell you just to do a many-to-many relationship is that you don't do any research yourself to discover that. Like you're just looking up manytomany and not reading about one to many, one to one, and be able to evaluate which one works for your purpose.
Expert_Recording_776@reddit
real