What kind of return on investment is there in learning Set Theory, with respect to database design and query?

General Tech Learning Aids/Tools 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Learning Aids/Tools related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

I am learning database right now -- and some of the queries are getting just plain crazy. I know that during query optimization you may sometimes rewrite queries in different ways to minimize certain things. I am looking at a correllated subquery example and see that it results in the same resultset as a LEFT JOIN.

I am thinking that possibly mathematically (set theory) they may be related, and if someone comfortable with set theory would be able to see that easily.

My question is: What kind of return on investment would I see from learning set theory? Would I see any return on investment? Would it be faster to learn database just by writing more queries, or should I spend time on set theory? I don't want to fall down a rabbit hole. I want to be good with database, but I need to get there as fast as possible.

profilepic.png
manpreet 2 years ago

That's a tricky question. I've taken courses in set theory and relational algebra at school, and I can definitely say that they have aided my understanding of relational databases. But just learning set theory by itself probably won't help a lot. Relational algebra, which requires a little basic set theory, is a better formalism for modeling relational databases (by design), and it's a great thing to learn if you're planning on using them a lot. It will help with not only query optimization but also database design, which can seem like a black art without examining the theoretical underpinnings. Database normal forms, for example, can be succinctly describes as simple expressions in relational algebra.

If you're only doing simple SQL querying and no complex queries or database design, then the effort to learn relational algebra may not be justified by the benefit.

It's worth mentioning that real-world relational databases are not actually sets, but rather bags or multisets. Applying set theory to bags tends to cause headaches from the impedance mismatch.


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.