且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

删除2个表的级联?

更新时间:2023-02-02 22:46:23

你确定它们没有任何共同之处吗?如果许多部件属于一个序列,那么你肯定会有一个链接两个的外键吗?
Are you sure that they have nothing in common? If many parts belong to a serial then surely you''d have a foreign key that links the two?



你确定他们什么都没有共同点?如果许多部件属于一个序列,那么你肯定会有一个链接两者的外键吗?
Are you sure that they have nothing in common? If many parts belong to a serial then surely you''d have a foreign key that links the two?



Hey Acoder,


嗯,事情是他们没有关系。两者完全分开..但他们都持有相同的数字。因此,如果pkb_fk_ticketNo的值为1,那么fk_ticketNo。但是虽然它们具有相同的价值,但它们没有相同的字段名称。在示例中,我看到他们展示的一个示例是两个表都具有字段名称ID。然而,我的并不是他们有2个不同的名字。我知道两个领域不一定要有相同的名字来建立关系。但我知道这些领域并不存在这样的关系。因为如果我去插入我的表单fk_ticketNo不能正常工作,pkb_fk_ticketNo仍然可以使用或不使用fk_ticketNo.I希望这样做,因为我不是那个自己创建表的人。 br />

谢谢,

Rach

Hey Acoder,

Well the thing is they don''t have a relationship together. There both completely seperated.. But they both do hold the same number. So if pkb_fk_ticketNo has the value of 1 so will fk_ticketNo . But although they hold the same value they don''t have the same field name in common. Like in the examples i saw one example they showed was both tables had the field name ID. However, mine are not like that they have 2 different names.An i know that both fields don''t have to have the same name to have a relationship. But i know for a fact these fields don''t share a relationship. Because if i go to insert my form an fk_ticketNo don''t work right, pkb_fk_ticketNo will still work right with or without fk_ticketNo.I hope that makes since, its hard to explain since i am not the one that created the tables myself.

Thank you,
Rach


如果我理解正确,一张票有很多系列,每个系列有很多部件。如果是这样,那么部件不应该有指向票证的外键,它应该是串行的。在包含与串行主键匹配的外键的部分中是否有字段?
If I understand correctly, a ticket has many serials and each serial has many parts. If so, then parts should not have the foreign key pointing to ticket, it should be for serial. Do you have a field in parts containing the foreign key that matches the primary key of serial?