帮助解决多对多问题 [英] Help with Many-to-Many-to-Many Problem

查看:77
本文介绍了帮助解决多对多问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在创建多对多类型关系时遇到问题。它是好的,但是当我创建一个视图来查询并测试它时,它不会产生我预期的结果。


下面是表格的DDL和视图的SQL。


任何帮助都会非常感激。



非常感谢提前。


问候


基思




图5:SYS_Relationship_Individuals_Courses

http://www.step-online.org.uk/diagram5.png


这是我遇到问题的关系。每个人都可以参加很多课程。我试图通过创建此图来对此进行建模。

它包含以下表格。 SYS_Individual(显示个人)。

显示课程(已经有多对多的关系

http://www.step-online.org.uk/diagram2.png),我添加了所有图2中的表格与

相同 - SYS_Courses,SYS_Courses_Venues,SYS_Courses_TimeTable,

SYS_Courses_Tutors(使用SYS_Xref_Join_Courses加入)。现在每个人都可以参加很多课程,我认为正确的方式来建立另一个多对多的模式。

SYS_Individual表和SYS_Xref_Join_Courses使用新的连接表

(SYS_Xref_Join_Ind_Courses)。


我试图使用视图检查这是否有效(SYS_Individual_Courses_List ) -

下面的视图5.


问题在于,无论我在

SYS_Xref_Join_Ind_Courses中输入了多少条目,测试视图(下面的视图5),只显示一个

记录。在玩视图时,我得到了显示所有

条目,但每次重复4次!我现在也不记得我是怎么做的了。现在这两个。


现在用于表格的DDL:


CREATE TABLE [do]。[SYS_Individual](


[IND_ID] [数字](18,0)IDENTITY(1,1)NOT NULL,


[IND_Date_Entered] [datetime] NOT NULL,


[IND_Date_on_Project] [datetime] NULL,


[IND_First_Name ] [varchar](30)COLLATE

SQL_Latin1_General_CP1_CI_AS NULL,


[IND_Surname] [varchar](30)COLLATE

SQL_Latin1_General_CP1_CI_AS NULL,


[IND_Address] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,


[IND_Post_Code] [varchar](10)COLLATE

SQL_Latin1_General_CP1_CI_AS NULL,


[IND_Telephone_Home] [varchar](15)COLLATE

SQL_Latin1_General_CP1_CI_AS NULL,


[IND_Telephone_Mobile] [varchar](15)COLLATE

SQL_Latin1_General_CP1_CI_AS NULL,


[IND_Telephone_其他] [varchar](15)COLLATE

SQL_Latin1_General_CP1_CI_AS NULL,


[IND_Email_Address] [varchar](150)COLLATE

SQL_Latin1_General_CP1_CI_AS NULL,


[IND_Date_Started] [datetime] NULL,


[IND_Trading_Name] [varchar](150)COLLATE

SQL_Latin1_General_CP1_CI_AS NULL,


[IND_Description_Proposed] [text] COLLATE

SQL_Latin1_General_CP1_CI_AS NULL,


[IND_Profile ] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

[IND_DD_Economic_Activity_ID] [数字](18,0)NULL,


[IND_DD_Referal_Source_Code] [数字](18,0)NULL,

[IND_DD_Training_Status_ID] [数字](18,0)NULL,


[IND_DD_Age_ID] [数字](18,0)NULL,

[IND_DD_Potential_Business_Type_ID] [数字](18,0)空,


[IND_DD_Exit_ID] [数字](18,0)NULL,


[IND_DD_Disadvantage_ID] [数字]( 18,0)NULL,

[IND_DD_Bank_ID] [数字](18,0)NULL,


[IND_DD_Start_Up_Confirmation_ID] [数字]( 18,0)NULL,

[IND_DD_Growth_Potential_ID] [数字](18,0)NULL,


[IND_DD_Ethnicity_ID] [数字]( 18,0)NULL,

[IND_DD_Marital_Status_ID] [数字](18,0)NULL,


[IND_DD_Gender_ID] [数字]( 18,0)NULL,

[IND_DD_Status_ID] [数字](18,0)NULL,


[IND_Related_To_Another] [varchar]( 3)COLLATE

SQL_Latin1_General_CP1_CI_AS NULL,


[IND_DD_Business_Status_ID] [数字](18,0)NULL,


[IND_Last_Updated] [datetime] NULL


CREATE TABLE [dbo]。[SYS_Courses](


[COURSE_ID] [数字](18 ,0)IDENTITY(1,1)NOT NULL,


[COURSE_Date_Entered] [datetime] NOT NULL,


[COURSE_Title] [varchar ](255)COLLATE

SQL_Latin1_General_CP1_CI_AS NOT NULL,


[COURSE_Description] [text] COLLATE SQL_Latin1_General_CP1_CI_AS

NOT NULL,


[COURS_Last_Modified] [datetime ] NULL


CREATE TABLE [dbo]。[SYS_Courses_Venues](


[COURS_VEN_ID] [数字](18,0)IDENTITY(1 ,1)NOT NULL,


[COURSE_VEN_Date_Entered] [datetime] NOT NULL,


[COURSE_VEN_Address] [text] COLLATE SQL_Latin1_General_CP1_CI_AS

NOT NULL,

[COURSE_VEN_Last_Updated] [datetime] NULL


CREATE TABLE [dbo]。[SYS_Courses_TimeTable](


[COURSE_TT_ID] [数字](18,0)IDENTITY(1,1)NOT NULL,


[COURSE_TT_Date_Entered] [datetime] NOT NULL,


[COURSE_TT_Date] [datetime] NOT NULL


CREATE TABLE [dbo]。[SYS_Courses_Tutors](


[COURSE_TUT_ID] [数字](18,0)IDENTITY(1,1)NOT NULL,


[COURSE_TUT_Date_Entered] [datetime] NOT NULL ,


[COURSE_TUT_First_Name] [varchar](30)COLLATE

SQL_Latin1_General_CP1_CI_AS NOT NULL,


[COURSE_TUT_Surname] [varchar](30)COLLATE

SQL_Latin1_General_CP1_CI_AS NOT NULL,


[COURSE_TUT_Last_Updated] [datetime] NULL


CREATE TABLE [dbo]。[SYS_Xref_Join_Courses](


[XREF_Courses_ID] [数字](18,0)IDENTITY(1,1)NOT NULL,


[XREF_Courses_Date_Entered] [datetime] NOT NULL,


[COURSE_ID] [数字](18,0)NOT NULL,


[COURSE_VEN_ID] [数字](18,0)NOT NULL,


[COURSE_TT_ID] [数字](18,0)NOT NULL,


[COURSE_TUT_ID] [数字](18,0)NOT NULL,


[XREF_Courses_Last_Updated] [datetime] NULL


CREATE TABLE [dbo]。[SYS_Xref_Join_Ind_Courses](


[XREF_Ind_Course_ID] [数字](18,0)IDENTITY(1,1)NOT NULL,


[XREF_Ind_Course_Date_Ent ered] [datetime] NOT NULL,


[IND_ID] [数字](18,0)NOT NULL,


[XREF_Courses_ID] [数字](18,0)NOT NULL,


[XREF_Ind_Course_Last_Updated] [datetime] NULL


现在查看:


查看5:


创建视图dbo.SYS_Individual_Course_List


AS


SELECT dbo.SYS_Individual.IND_First_Name,

dbo.SYS_Individual.IND_Surname,dbo.SYS_Courses.COURSE_Title,

dbo.SYS_Courses_Venues.COURSE_VEN_Address,

dbo.SYS_Xref_Join_Ind_Courses.XREF_Ind_Course_ID


来自dbo.SYS_Courses_Venues INNER JOIN


dbo.SYS_Courses INNER JOIN


dbo.SYS_Xref_Join_Ind_Courses INNER JOIN


dbo.SYS_Individual ON

dbo.SYS_Xref_Join_Ind_Courses.IND_ID = dbo.SYS_Individual.IND_ID INNER JOIN


dbo.SYS_Xref_Join_Courses ON

dbo.SYS_Xref_Join_Ind_Courses.XR EF_Ind_Course_ID =

dbo.SYS_Xref_Join_Courses.XREF_Courses_ID ON


dbo.SYS_Courses.COURSE_ID =

dbo.SYS_Xref_Join_Courses.COURSE_ID INNER JOIN


dbo.SYS_Courses_TimeTable ON

dbo.SYS_Xref_Join_Courses.COURSE_TT_ID =

dbo.SYS_Courses_TimeTable.COURSE_TT_ID INNER JOIN


dbo.SYS_Courses_Tutors ON

dbo.SYS_Xref_Join_Courses.COURSE_TUT_ID =

dbo.SYS_Courses_Tutors.COURSE_TUT_ID ON


dbo.SYS_Courses_Venues.COURSE_VEN_ID =

dbo.SYS_Xref_Join_Courses.COURSE_VEN_ID

I am having a problem creating a many-to-many-to-many type relationship. It
works fine, but when I create a view to query it and test it, it does not
generate the results I expected.

Below if the DDL for the tables and the SQL for the view.

Any help would be most appreciated.


Many thanks in advance.

Regards

Keith



DIAGRAM 5: SYS_Relationship_Individuals_Courses
(http://www.step-online.org.uk/diagram5.png)

This is the relationship I am having a problem with. Each individual can
attend many courses. I have tried to model this by creating this diagram.
It has the following tables in it. SYS_Individual (to show individuals).
To show courses (which already have a many-to-many relationship
(http://www.step-online.org.uk/diagram2.png), I added all the same tables as
in diagram 2 - SYS_Courses, SYS_Courses_Venues, SYS_Courses_TimeTable,
SYS_Courses_Tutors (joined using SYS_Xref_Join_Courses). Now as each
individual could attend many courses, I assumed that the correct way to
model this would be by creating another many-to-many between the
SYS_Individual table and the SYS_Xref_Join_Courses by using a new join table
(SYS_Xref_Join_Ind_Courses).

I tried to check this works using a view (SYS_Individual_Courses_List) -
VIEW 5 below.

The problem is that no matter how many entries I put in the
SYS_Xref_Join_Ind_Courses, the test view (VIEW 5 below), only ever shows one
record. While playing around with the view, I got it to show all the
entries, but they were duplicated 4 times each! I can''t remember how I did
this now either.

Now for the DDL for the tables:

CREATE TABLE [do].[SYS_Individual] (

[IND_ID] [numeric](18, 0) IDENTITY (1, 1) NOT NULL ,

[IND_Date_Entered] [datetime] NOT NULL ,

[IND_Date_on_Project] [datetime] NULL ,

[IND_First_Name] [varchar] (30) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL ,

[IND_Surname] [varchar] (30) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL ,

[IND_Address] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[IND_Post_Code] [varchar] (10) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL ,

[IND_Telephone_Home] [varchar] (15) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL ,

[IND_Telephone_Mobile] [varchar] (15) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL ,

[IND_Telephone_Other] [varchar] (15) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL ,

[IND_Email_Address] [varchar] (150) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL ,

[IND_Date_Started] [datetime] NULL ,

[IND_Trading_Name] [varchar] (150) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL ,

[IND_Description_Proposed] [text] COLLATE
SQL_Latin1_General_CP1_CI_AS NULL ,

[IND_Profile] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[IND_DD_Economic_Activity_ID] [numeric](18, 0) NULL ,

[IND_DD_Referal_Source_Code] [numeric](18, 0) NULL ,

[IND_DD_Training_Status_ID] [numeric](18, 0) NULL ,

[IND_DD_Age_ID] [numeric](18, 0) NULL ,

[IND_DD_Potential_Business_Type_ID] [numeric](18, 0) NULL ,

[IND_DD_Exit_ID] [numeric](18, 0) NULL ,

[IND_DD_Disadvantage_ID] [numeric](18, 0) NULL ,

[IND_DD_Bank_ID] [numeric](18, 0) NULL ,

[IND_DD_Start_Up_Confirmation_ID] [numeric](18, 0) NULL ,

[IND_DD_Growth_Potential_ID] [numeric](18, 0) NULL ,

[IND_DD_Ethnicity_ID] [numeric](18, 0) NULL ,

[IND_DD_Marital_Status_ID] [numeric](18, 0) NULL ,

[IND_DD_Gender_ID] [numeric](18, 0) NULL ,

[IND_DD_Status_ID] [numeric](18, 0) NULL ,

[IND_Related_To_Another] [varchar] (3) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL ,

[IND_DD_Business_Status_ID] [numeric](18, 0) NULL ,

[IND_Last_Updated] [datetime] NULL

CREATE TABLE [dbo].[SYS_Courses] (

[COURSE_ID] [numeric](18, 0) IDENTITY (1, 1) NOT NULL ,

[COURSE_Date_Entered] [datetime] NOT NULL ,

[COURSE_Title] [varchar] (255) COLLATE
SQL_Latin1_General_CP1_CI_AS NOT NULL ,

[COURSE_Description] [text] COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,

[COURSE_Last_Modified] [datetime] NULL

CREATE TABLE [dbo].[SYS_Courses_Venues] (

[COURSE_VEN_ID] [numeric](18, 0) IDENTITY (1, 1) NOT NULL ,

[COURSE_VEN_Date_Entered] [datetime] NOT NULL ,

[COURSE_VEN_Address] [text] COLLATE SQL_Latin1_General_CP1_CI_AS
NOT NULL ,

[COURSE_VEN_Last_Updated] [datetime] NULL

CREATE TABLE [dbo].[SYS_Courses_TimeTable] (

[COURSE_TT_ID] [numeric](18, 0) IDENTITY (1, 1) NOT NULL ,

[COURSE_TT_Date_Entered] [datetime] NOT NULL ,

[COURSE_TT_Date] [datetime] NOT NULL

CREATE TABLE [dbo].[SYS_Courses_Tutors] (

[COURSE_TUT_ID] [numeric](18, 0) IDENTITY (1, 1) NOT NULL ,

[COURSE_TUT_Date_Entered] [datetime] NOT NULL ,

[COURSE_TUT_First_Name] [varchar] (30) COLLATE
SQL_Latin1_General_CP1_CI_AS NOT NULL ,

[COURSE_TUT_Surname] [varchar] (30) COLLATE
SQL_Latin1_General_CP1_CI_AS NOT NULL ,

[COURSE_TUT_Last_Updated] [datetime] NULL

CREATE TABLE [dbo].[SYS_Xref_Join_Courses] (

[XREF_Courses_ID] [numeric](18, 0) IDENTITY (1, 1) NOT NULL ,

[XREF_Courses_Date_Entered] [datetime] NOT NULL ,

[COURSE_ID] [numeric](18, 0) NOT NULL ,

[COURSE_VEN_ID] [numeric](18, 0) NOT NULL ,

[COURSE_TT_ID] [numeric](18, 0) NOT NULL ,

[COURSE_TUT_ID] [numeric](18, 0) NOT NULL ,

[XREF_Courses_Last_Updated] [datetime] NULL

CREATE TABLE [dbo].[SYS_Xref_Join_Ind_Courses] (

[XREF_Ind_Course_ID] [numeric](18, 0) IDENTITY (1, 1) NOT NULL ,

[XREF_Ind_Course_Date_Entered] [datetime] NOT NULL ,

[IND_ID] [numeric](18, 0) NOT NULL ,

[XREF_Courses_ID] [numeric](18, 0) NOT NULL ,

[XREF_Ind_Course_Last_Updated] [datetime] NULL

Now for the View:

VIEW 5:

CREATE VIEW dbo.SYS_Individual_Course_List

AS

SELECT dbo.SYS_Individual.IND_First_Name,
dbo.SYS_Individual.IND_Surname, dbo.SYS_Courses.COURSE_Title,

dbo.SYS_Courses_Venues.COURSE_VEN_Address,
dbo.SYS_Xref_Join_Ind_Courses.XREF_Ind_Course_ID

FROM dbo.SYS_Courses_Venues INNER JOIN

dbo.SYS_Courses INNER JOIN

dbo.SYS_Xref_Join_Ind_Courses INNER JOIN

dbo.SYS_Individual ON
dbo.SYS_Xref_Join_Ind_Courses.IND_ID = dbo.SYS_Individual.IND_ID INNER JOIN

dbo.SYS_Xref_Join_Courses ON
dbo.SYS_Xref_Join_Ind_Courses.XREF_Ind_Course_ID =
dbo.SYS_Xref_Join_Courses.XREF_Courses_ID ON

dbo.SYS_Courses.COURSE_ID =
dbo.SYS_Xref_Join_Courses.COURSE_ID INNER JOIN

dbo.SYS_Courses_TimeTable ON
dbo.SYS_Xref_Join_Courses.COURSE_TT_ID =
dbo.SYS_Courses_TimeTable.COURSE_TT_ID INNER JOIN

dbo.SYS_Courses_Tutors ON
dbo.SYS_Xref_Join_Courses.COURSE_TUT_ID =
dbo.SYS_Courses_Tutors.COURSE_TUT_ID ON

dbo.SYS_Courses_Venues.COURSE_VEN_ID =
dbo.SYS_Xref_Join_Courses.COURSE_VEN_ID

推荐答案

>>我在创建多对多类型

关系时遇到问题。它

工作正常,..<<


不,你似乎有5NF问题。你不能创建一个真正的三向

关系作为一系列二元关系;查看加入项目

普通表格。


但是你还有很多其他问题。


1你为什么要把NUMERIC(18,0)一切都搞定?想想如果现实就是这样的话会有什么惊人之处。


2)为什么你使用IDENTITY而不是寻找真正的密钥?


3)为什么你没有遵循ISO-11179命名规则?可怕的前缀,

缺乏列的任何行业标准等。


4)为什么要将物理历史记录放入表中?

有工具。


5)不是场地属于课程的属性吗?


6)这些XREF表在逻辑数据模型中的逻辑含义是什么?


7)什么是_type_id? ?属性是一个类型,或者它是一个

标识符,但绝不是两者。再一次,你不理解数据和元数据之间的差异,所以你可以用很多方式混合它们。


你的DDL看起来应该更像这个:


CREATE TABLE IndividualCourses

(ssn CHAR(9)NOT NULL

参考个人(ssn)

ON UPDATE CASCADE

ON DELETE CASCADE,

course_id CHAR(5)NOT NULL)

REFERENCES课程(course_id)

ON UPDATE CASCADE

ON DELETE CASCADE,

PRIMARY KEY(ssn,course_id));


您需要约束,默认值,实际键,逻辑名称等。开始

结束并获得一本关于数据建模的书。
>> I am having a problem creating a many-to-many-to-many type
relationship. It
works fine, .. <<

No, you seem to have 5NF problems. You cannot create a true three-way
relationship as a series of binary relationships; look up join-project
normal forms.

But you have a lot of other problems.

1) Why did you make everything NUMERIC(18,0)? Think about what an
amazing thing that would be if reality was like that.

2) Why did you use IDENTITY instead of looking for real keys??

3) Why didn''t you follow ISO-11179 naming rules? Terrible prefixes,
lack of any industry standards for columns, etc.

4) Why put physical history into the tables? There are tools for
that.

5) Isn''t a venue an attribute of a course?

6) What is the logical meaning of those XREF tables in terms of a
logical data model?

7) What is a "_type_id"?? An attribute is either a type or it is an
identifier, but never both. Again, you don''t understand the
differences between data and metadata, so you mix them in wreird ways.

Your DDL ought to look more like this:

CREATE TABLE IndividualCourses
(ssn CHAR(9) NOT NULL
REFERENCES Individuals (ssn)
ON UPDATE CASCADE
ON DELETE CASCADE,
course_id CHAR(5) NOT NULL)
REFERENCES Courses(course_id)
ON UPDATE CASCADE
ON DELETE CASCADE,
PRIMARY KEY (ssn, course_id));

You need constraints, defaults, real keys, logical names, etc. Start
over and get a book on data modeling.




" - CELKO - " <乔******* @ northface.edu>在留言中写道

新闻:a2 ************************** @ posting.google.c om ...

"--CELKO--" <jo*******@northface.edu> wrote in message
news:a2**************************@posting.google.c om...
我在创建多对多类型

<时遇到问题关系。它工作正常,...<<

不,你似乎有5NF的问题。你不能创建一个真正的三向关系作为一系列二元关系;查看加入项目
正常形式。

但是你还有很多其他问题。

1)你为什么要把所有东西都做成NUMERIC(18,0) ?想想如果现实就是这样的话会有什么惊人之处。

2)你为什么使用IDENTITY而不是寻找真正的钥匙?

3)为什么你不遵循ISO-11179命名规则?可怕的前缀,没有列的任何行业标准等。

4)为什么要将物理历史记录放入表中?
有工具。

5)不是场地属于课程的属性吗?

6)这些XREF表的逻辑含义是什么?在逻辑数据模型方面?

7)什么是_type_id?属性是一个类型,或者是一个
标识符,但绝不是两者。同样,你不了解数据和元数据之间的差异,所以你要以各种方式混合它们。

你的DDL看起来应该更像这样:

CREATE TABLE IndividualCourses
(ssn CHAR(9)NOT NULL
参考个人(ssn)
ON UPDATE CASCADE
ON DELETE CASCADE,
course_id CHAR(5) NOT NULL)
REFERENCES课程(course_id)
ON UPDATE CASCADE
ON DELETE CASCADE,
PRIMARY KEY(ssn,course_id));

你需要约束,默认值,真实键,逻辑名称等。开始
并获得一本关于数据建模的书。


relationship. It
works fine, .. <<

No, you seem to have 5NF problems. You cannot create a true three-way
relationship as a series of binary relationships; look up join-project
normal forms.

But you have a lot of other problems.

1) Why did you make everything NUMERIC(18,0)? Think about what an
amazing thing that would be if reality was like that.

2) Why did you use IDENTITY instead of looking for real keys??

3) Why didn''t you follow ISO-11179 naming rules? Terrible prefixes,
lack of any industry standards for columns, etc.

4) Why put physical history into the tables? There are tools for
that.

5) Isn''t a venue an attribute of a course?

6) What is the logical meaning of those XREF tables in terms of a
logical data model?

7) What is a "_type_id"?? An attribute is either a type or it is an
identifier, but never both. Again, you don''t understand the
differences between data and metadata, so you mix them in wreird ways.

Your DDL ought to look more like this:

CREATE TABLE IndividualCourses
(ssn CHAR(9) NOT NULL
REFERENCES Individuals (ssn)
ON UPDATE CASCADE
ON DELETE CASCADE,
course_id CHAR(5) NOT NULL)
REFERENCES Courses(course_id)
ON UPDATE CASCADE
ON DELETE CASCADE,
PRIMARY KEY (ssn, course_id));

You need constraints, defaults, real keys, logical names, etc. Start
over and get a book on data modeling.




仅仅是出于好奇 - 我不喜欢声称对这个问题有任何答案

我自己 - 你会为欧洲学生使用什么主键? SSN

不存在,学生们经常在一个不在他们出生地的地方学习。


Simon



Just from curiosity - and I don''t claim to have any answer to this question
myself - what primary key would you use for European students? The SSN
doesn''t exist, and students routinely study in a country which is not where
they were born.

Simon


Keith等人:
Keith et al:
我遇到创建多对多类型的问题关系。


用一句话说:不要屎。这是设计的。

我在创建多对多类型关系时遇到问题。
它工作正常,但是当我创建一个视图来查询它并测试它时,它会产生
不会产生我预期的结果。
I am having a problem creating a many-to-many-to-many type relationship. It
In a single word: `No shit''. This is by design.
I am having a problem creating a many-to-many-to-many type relationship. It works fine, but when I create a view to query it and test it, it does not generate the results I expected.



你不应该有预计它将在First Place工作。

如果你需要在关系A和

B之间创建多对多关系,那么我们创建第三个关系C 。

将关系A和B与C相交(即C接受来自

关系A和B的外键)。

由于关系C应该只包含来自

关系A和B的外键属性你应该能够弄清楚如何使用它。


不包括DDL / source - 在usenet帖子中编码。人们会尝试用b $ b来纠正你的代码,而不是破坏逻辑。为了获得最佳效果,请不要提供具体实施。


享受新的玩具,

Timothy J. Bruce
un*****@hotmail.com

< / RANT>


You should not have expected it to work in the First Place.
If you need to create a many-to-many relationship between relations A and
B, then we create a third relation C.
Intersect relations A and B with C (that is C accepts foreign keys from
relations A and B).
Since relation C should only contain the foreign key attributes from
relations A and B you should be able to figure out how to work with it.

Do not include DDL/source-code in usenet posts. People will try to
correct your code instead of your broken logic. For best results do not
even mention your `specific implementation''.

Have fun with your new `toy'',
Timothy J. Bruce
un*****@hotmail.com
</RANT>


这篇关于帮助解决多对多问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆