如何在Laravel MySQL中实现数据库专业化?
我正在从事一个项目,该项目将有两种类型的赞助商,A Person 和An 机构,所以我认为最好的方法是那就是实施专业化。 将有一个称为赞助商的父桌,它将有两个子表(个人和机构)这两个将共享赞助商表中的主要属性,并且他们将在其表格中拥有自己的更专业的属性。 我找不到如何在Laravel MySQL中实施该方法的方法。
I'm working on a project that will have two types of sponsors, a person and an institution so I figured that the best way to do that is to implement specialization.
There will be a parent table that is called sponsor and it will has two child tables (person and institution) the two would share main properties that will be in the sponsor table, and they will have their own more specialized properties in their table.
I can't find a way on how to implement that in laravel mysql.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在开始项目之前,请阅读有关数据库的信息,以了解许多数据库。如何设计和下载一个名为MySQLWorkBench的应用程序,然后在数据库关系标准化中绘制DAGGRAM。有第三种方法,N1 + N2 + N3 +
我的答案是您创建的,我找到了您与外键
https://dev.mysql.com/doc/mysql-tutorial-excerpt/8.0/en/examples.html
https://launchschool.com/books/sql/sql/read/table_relationships
https://www.kimballgroup.com/2009/06/design-tip-113-creating-usish-using-usish-usis--rand-maintain--junk-dimensions/
Before you start your project, read about a database in order to understand many databases. How to design and download an application called MySQLWorkbench and then draw a daggram in the database Relationships Normalization. There is the third way, N1 + n2 + n3 +
my answer as for your, it create and I find any call name (Scientific name call table Junk) you associate with a foreign key
https://dev.mysql.com/doc/mysql-tutorial-excerpt/8.0/en/examples.html
https://launchschool.com/books/sql/read/table_relationships
https://www.kimballgroup.com/2009/06/design-tip-113-creating-using-and-maintaining-junk-dimensions/