1:1 Relation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a DataSet out of an SQL Server DB. In the server, there are
several 1:1 relations, in the graphical representation of the DataSet in
Visual Studio, it seems as if there were just 1:n relations. Why? Is it a bug
in VS 2005 or is it impossible for an autogenerated DataSet to understand
those relations?
 
Florian,

What is the problem as there is in Net forever forever a parent with a
collection of childs if it is zero ore more.

There cannot be a child without a parent.

Cor
 
Florian said:
I have created a DataSet out of an SQL Server DB. In the server,
there are several 1:1 relations, in the graphical representation of
the DataSet in Visual Studio, it seems as if there were just 1:n
relations. Why? Is it a bug in VS 2005 or is it impossible for an
autogenerated DataSet to understand those relations?

I'd say it's a bug unless you didn't define / there isn't defined a
PK on the FK side of the 1:1 relation OR no UC column(s). A 1:1
relation can only be placed between two PK's or between a PK and a UC.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
 
Frans Bouma said:
I'd say it's a bug unless you didn't define / there isn't defined a
PK on the FK side of the 1:1 relation OR no UC column(s). A 1:1
relation can only be placed between two PK's or between a PK and a UC.

FB

Hi,

well both tables are using the same primary key, the PK is defined in both
tables and in SQL Server I defined the relation between these two keys.
If I look at the tables in SQL Server (Diagramm View) the relation graphs
are drawn with a "key" token on each side of the line, in Visual Studio they
have the key token on one side and the infinity token on the other. That's
why I was wondering.
Btw, what does the abbrevation "UC" stand for?

Greetings,

Flo
 
Florian said:
well both tables are using the same primary key, the PK is defined in
both tables and in SQL Server I defined the relation between these
two keys. If I look at the tables in SQL Server (Diagramm View) the
relation graphs are drawn with a "key" token on each side of the
line, in Visual Studio they have the key token on one side and the
infinity token on the other. That's why I was wondering.

then it's indeed strange. Please post this either in the Connect
buglog or post this on the forums.microsoft.com forum for ADO.NET so a
microsoftie will look at it.
Btw, what does the abbrevation "UC" stand for?

Unique Constraint ;)

FB


--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
 
Back
Top