How do I define aggregate and aggregate roots and link between aggregates

Course Queries Syllabus Queries 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Syllabus Queries related to Course Queries. 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 (1)

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


So I am new to DDD and I am trying to design an application correctly. But I am having a bit of difficulty with identifying aggregate roots.

My need is more or less a tree

*Customers
*Each customer can have 0 or more licenses
*Each license can have 0 or more courses
*Each course can have 0 or more lessons
*Each lesson can have 0 or more slides and videos

Finally I have quizzes/tests that can be linked to almost anything, even a certain time in a video in a lesson.

No matter how I think about it I only get that Customer will be an aggregate root for an aggregate that contains [Customer, License, Course, Lesson, Slide, Video]

But that is a fairly big aggregate and I have understood that big aggregates should be avoided.

A quiz would then be an aggregate with questions, answers and so on. As a second question I might ask is how the link should look? because lets say i want a quiz to pop up in a video after 4 minutes. Well then my quiz needs to link to that video and store a time. But that video is deep down another aggregate (under customer, license, course, lesson) and should not be linked directly in a persistent way from this quiz aggregate.

So how do I solve that. I have ordered my big DDD book but it wont be here for a while, If I could understand this before then it would be great!

I dont it should matter but I use .net c# mvc, with ef5 and repository pattern.

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.