对象的模型位置时间线
我正在寻找对象的时间线模型。例如,包含飞机和机场的数据库模型将具有一个类/表,其中包含到达机场和从这些机场起飞的飞机。我可以接受飞机在机场的简单场景,当进行更改时就会出现逻辑问题。假设飞机 1 不在机场 1,而是在机场 2 和机场 3,这就是模型变得棘手的地方。
我知道我不是第一个在建模对象时间线时遇到问题的人,并且想知道是否有人可以向我指出一些资源或提供建议。
I am looking to model the timeline of an object. For example, a database model with airplanes and airports will have a class/table consisting airplanes arrival at airports and and the departure from these airports. I am okay with the simple scenario of an airplane at an airport, the logic problems arise when changes are made. Let's say that Airplane 1 wasn't at Airport 1 but was at Airport 2 and 3, this is where the model gets sticky.
I know that I am not the first person to have issues modeling a timeline of an object and was wondering if anyone could point me to some resources or give advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定您正在描述哪种逻辑问题,或者您的目标是什么用例,但这里有一个听起来适合您的示例的模式:
或者您可以代替单独的到达和出发表/类有一个活动课
Not sure exactly what kind of logic problems you're describing, or what use case you're aiming for, but here's a schema that sounds like it'd fit your example:
OR instead of separate arrival and departure tables/classes, you could have an events class