So, this isn't a super easy question to describe, as it's a bit conceptual in nature, but here goes:
I'm building a C# WPF application to manage Film Production and Scheduling. I'm using a Model-View-ViewModel design, and my question is solely related to the model. I'll try to keep this out of the problem domain, but I have to explain a little bit.
So basically, the program has the concepts(classes) of "ShootingDays", "Scenes", "Shots", and "FilmTasks". You define the days you plan on filming ("ShootingDays"), the details of your scenes ("Scenes"), and shots within that Scene ("Shots"). Then, within a "ShootingDay", you can create a schedule for that day which includes "FilmTasks", individual agenda items. These "FilmTasks" can be general tasks (IE Arrive to location) or they can be a specific scene. Those "Scenes" within "FilmTasks" then also contain the "Shots" within the scene.
To Summarize:
The Project has Shooting Days and Scenes
A Shooting Day has FilmTasks
A Scene has Shots
A FilmTask has one Scene or none
When I first approached this problem, I thought that this made a ton of sense as a relational database. Give every object a unique identifier and identifiers for the objects they belong to. Simple joins and I'm good. But I'm not making a web application, I'm reading from XML files on the desktop. So my first go at this, I just emulated a relational table by giving everything a unique ID from a static method that would always return a different integer. I did my "joins" based on these, but it seemed super messy, particularly when it came to serializing the project, which meant serializing the last unique integer returned, so I could continue from there.
So when I faced that, I decided to refactor everything to a more simple hierarchy, where Scenes have a list of Shot objects instead of a list of integers to do the "joins" on, and the other relations in the same way. But now I'm facing update anomalies, for example adding or deleting Shots from a Scene after it has been added to a FilmTask, the Scene object inside the FilmTask doesn't change. I could manually change all of them, searching through all the tasks to find the relevant ones, but that seems super messy too.
I hope this isn't too confusing. Basically I feel like both the approaches I've taken are sub-optimal and I'm looking to clean things up. What can I do here? And if any clarification is needed, I can provide.