DataSet 1到很多关系 - 如何? [英] DataSet 1 to many Relation - How to?

查看:60
本文介绍了DataSet 1到很多关系 - 如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在DataSet中有两个表,第一个是现在的房间,另一个是
家具。


家具类,如chare,可以在超过一个房间。特定房间

可以包含多种家具(chare + table + ...)。因此,

房间的桌子应该有关系,指向几种家具类型,并且

家具桌应该与几个房间有关系。


有没有办法从一个到多个定义这种关系?

如果是这样 - 怎么样?


任何建议都将受到高度赞赏。

---------

谢谢

Sharon G.

I have two tables in the DataSet, the first present rooms and the other
furniture kinds.

Furniture kind, like chare, can be in more then one room. And specific room
can contain more then one furniture kind (chare + table + ...). Therefore,
the room table should have Relation that point to several furniture kind, and
the furniture table should have Relation to several rooms.

Is there a way to define this kind of relation from one to many?
If so - How?

Any advice will be highly appreciated.
---------
Thanks
Sharon G.

推荐答案




真的,这是多对多的关系,你还需要一张额外的桌子来支撑这个
。这张桌子的房间和房间都有FK。家具种类

欢呼,

-

Ignacio Machin,

ignacio.machin AT dot .state.fl.us

佛罗里达州交通局


Sharon <嘘**** @ discussions.microsoft.com>在消息中写道

news:6E ********************************** @ microsof t.com ...


Really it''s a many to many relationship and you need an extra table to hold
this. this table will have a FK to both rooms & furniture kinds
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Sharon" <Sh****@discussions.microsoft.com> wrote in message
news:6E**********************************@microsof t.com...
我在DataSet中有两个表,第一个是现在的房间,另一个是
家具种类。

家具类,如chare,可以在一个以上的房间里。具体的房间
可以包含多种家具(chare + table + ...)。因此,房间的桌子应该有几个家具类型的关系,
和家具桌应该有几个房间的关系。

有没有办法从一个到多个定义这种关系?
如果是这样 - 如何?

任何建议都将受到高度赞赏。

------- -
谢谢
Sharon G。
I have two tables in the DataSet, the first present rooms and the other
furniture kinds.

Furniture kind, like chare, can be in more then one room. And specific
room
can contain more then one furniture kind (chare + table + ...). Therefore,
the room table should have Relation that point to several furniture kind,
and
the furniture table should have Relation to several rooms.

Is there a way to define this kind of relation from one to many?
If so - How?

Any advice will be highly appreciated.
---------
Thanks
Sharon G.



请问axplain我该怎么做?

注意:我正在使用XSD文件设计模型,VS .NET从中生成一个

DataSet对象。

----- -

谢谢

Sharon G.
Can you please axplain how do I do that?

Note: I''m designing a model using XSD file that the VS .NET generate a
DataSet object from it.
-------
Thanks
Sharon G.





你创建一个有两列的表,每列是一个FK到PK的其他表(家具,房间),注意它们都是可能。不要声明

作为PK(一个房间有多种特殊类型的家具)所以要么

你宣布另一个专栏或只是在没有PK的情况下工作。


现在,我从来没有使用过VS.NET的设计师,所以我不知道怎么做

,我用XDE你选择了关系(多对多)和

只需点击两个表,一个新表和一个表将产生关系。

欢呼,

-

Ignacio Machin,

ignacio .machin AT dot.state.fl.us

佛罗里达州交通局


Sharon <嘘**** @ discussions.microsoft.com>在消息中写道

新闻:DD ********************************** @ microsof t.com ...
Hi,

You create a table with two column, each column is a FK to the PK of the
other tables (furniture, room ), Note that they both "may" not be declare
as PK ( a room with more than one particular kind fo furniture) so either
you declare another column or just work the table without PK.

Now, I have never used the designer from VS.NET so I don''t know for sure how
to do it, I use XDE there you select the relationship ( many to many ) and
just click two tables, a new table & the relationships will be generated.
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Sharon" <Sh****@discussions.microsoft.com> wrote in message
news:DD**********************************@microsof t.com...
你能告诉我如何做到这一点?

注意:我正在使用VS.NET生成的XSD文件设计模型一个
来自它的DataSet对象。

-------
谢谢
Sharon G。
Can you please axplain how do I do that?

Note: I''m designing a model using XSD file that the VS .NET generate a
DataSet object from it.
-------
Thanks
Sharon G.



这篇关于DataSet 1到很多关系 - 如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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