从 JDO 中的关系表获取额外信息

发布于 2025-01-04 23:14:36 字数 276 浏览 4 评论 0原文

我现在正在对数据库进行建模,以便在仅 sql 应用程序中使用。

我有三个表,

Company 
company_id,name

Contact
contact_id, name

rel_contact_company
company_id, contact_id, is_employee

这是多对多关系,但关系表包含有关关系的额外信息(is_employee)。

是否可以使用普通关系从 jdo 查询此信息,还是创建两个关系表更好?

I am modelling a database for use in a sql only application for now.

I have three tables

Company 
company_id,name

Contact
contact_id, name

rel_contact_company
company_id, contact_id, is_employee

It's a many to many relationship but the relation ship table has extra information about the relationship (is_employee).

Is it possible to query this information from jdo using normal relationships or is it better to create two relationship tables?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文