In this video, we discuss the process of correctly designing the RDBMS database for a software project. Download the session ppts here: docs.google.co...
I failed in an interview of design (my first one which is unexpected😅) because I directly jump into making tables and relationships and I am confused about what did I do wrong in that now I got it how to approach these problems. thanks a lot sir🔥
Thank you so much. You actually showed the concept of a foreign key. One thing I don't think you addressed and glosses over was how to handle multiple answers (Check Boxes). This is a major database question I don't know how to solve. Thanks again for an excellent video.
Yeah, I felt the same way while watching the video. However, he has handled this use case well. Looking at the tables, you can see a 1 to many relationship between question => answer tables. That is, one question can have multiple choices (if it is an objective question). So when fetching the question from the database, you can also fetch all the options referred to by question_id in the Answer table.
thank you brother for this video very helpful in understanding how to break down problem statement in functional entities and then creating tables and relations among them thanks a lot
I think you have bad design in tables question and survey because your design implies that each survey has its own questions because you have survey_id in question table, problem is if you have same survey, same question for every survey. I think in that case you should remove survey_id from question table and add new table something like SurveyQuestions which would be connection between question and survey (obviously) and it will have survey_id and question_id and answer_id with composite primary key, so basically classical many-to-many relationship. In that case you could have hardcoded question in db and just insert into SurveyQuestion which survey which question and which answer.
What if I want to use Agile where there is no such thing called "functional requirements". Instead it has "User Stories". Then how can I design my database from user stories?
If one product won't have multiple surveys at the same time then you don't need product_survey table, only product table would be enough with a extra column survey_id.
@@BBarters Thank you for responding. Quick question tho if you got the time. I have a hard time understanding the responder object. How does it relate to the other components?
I was in impression that this application also makes sure that a particular product is first purchased by an user before participating in the survey..that doesnot seem to be taken care here.