|
 |
aspx thread: Datasets - whats so good about the relationships???
Message #1 by "Greg Quinn" <greg@i...> on Mon, 28 Jan 2002 11:39:05 -0800
|
|
Hi,
I've just finished reading about datasets in my ASP.NET book. I understand
that its nice to keep certain tables in a dataset so you can work with them
and reference them etc. But why the heck do I need to specify relationships
between these tables. If I want to join two tables, isn't it just
easier/better performance for me to use a query and return those results as
a table in my dataset?
Please can someone explain to me why I would ever need to specify the
relationships between tables in a dataset, and give me some real-world
examples of what benefit this brings...
Thanks
Greg
Message #2 by "Wim Verdeyen" <Wim.Verdeyen@e...> on Mon, 28 Jan 2002 10:38:48 +0100
|
|
This is a multi-part message in MIME format.
------_=_NextPart_001_01C1A7DF.964F3CE3
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
It's useful if you need to create some tables in memory.
-----Original Message-----
From: Greg Quinn [mailto:greg@i...]
Sent: maandag 28 januari 2002 20:39
To: ASP+
Subject: [aspx] Datasets - whats so good about the relationships???
Hi,
I've just finished reading about datasets in my ASP.NET book. I
understand that its nice to keep certain tables in a dataset so you can
work with them and reference them etc. But why the heck do I need to
specify relationships between these tables. If I want to join two
tables, isn't it just easier/better performance for me to use a query
and return those results as a table in my dataset?
Please can someone explain to me why I would ever need to specify the
relationships between tables in a dataset, and give me some real-world
examples of what benefit this brings...
Thanks
Greg
Message #3 by "Kyle" <Kyle@T...> on Mon, 28 Jan 2002 07:08:54 -0500
|
|
I think it may apply to a parent child relationship between tables, like
invoice header and invoice items. I'm reaching a point in a current
project where I will get to try this out and then I'll know for sure.
_____________________________________________
Kyle Dunn
Chief Information Officer
Funeral Services, Inc.
xxx-xxx-xxxx x 309
Kyle@F...
-----Original Message-----
From: Greg Quinn [mailto:greg@i...]
Sent: Monday, January 28, 2002 2:39 PM
To: ASP+
Subject: [aspx] Datasets - whats so good about the relationships???
Hi,
I've just finished reading about datasets in my ASP.NET book. I
understand
that its nice to keep certain tables in a dataset so you can work with
them
and reference them etc. But why the heck do I need to specify
relationships
between these tables. If I want to join two tables, isn't it just
easier/better performance for me to use a query and return those results
as
a table in my dataset?
Please can someone explain to me why I would ever need to specify the
relationships between tables in a dataset, and give me some real-world
examples of what benefit this brings...
Thanks
Greg
Message #4 by "Mark Struck" <struckm@a...> on Mon, 28 Jan 2002 08:22:17 -0600
|
|
Greg,
If you are retrieving results from different SQL Servers you can store
your multiple result sets in the dataset and then build a relationship
which will allow you to further refine what you want displayed.
Mark
-----Original Message-----
From: Greg Quinn [mailto:greg@i...]
Sent: Monday, January 28, 2002 1:39 PM
To: ASP+
Subject: [aspx] Datasets - whats so good about the relationships???
Hi,
I've just finished reading about datasets in my ASP.NET book. I
understand that its nice to keep certain tables in a dataset so you can
work with them and reference them etc. But why the heck do I need to
specify relationships between these tables. If I want to join two
tables, isn't it just easier/better performance for me to use a query
and return those results as a table in my dataset?
Please can someone explain to me why I would ever need to specify the
relationships between tables in a dataset, and give me some real-world
examples of what benefit this brings...
Thanks
Greg
Message #5 by ToddC@m... on Mon, 28 Jan 2002 09:53:47 -0600
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C1A813.F8E58180
Content-Type: text/plain
You are correct in thinking that there is a bunch of hype for a feature that
me never be used; however, I think that comes form our "We never needed this
before" mindset. I said the same thing when I started into DataSets.
Here is my thoughts on it;
1. If you are really into disconnected data, like .NET, then some way to
create and maintain data integrity is very useful. By establishing
relationships and constraints in the DataSet, we don't have to worry about
tracking these things in our code.
2. You can think of Related Tables in a DataSet as linked lists. That
would make coding hierarchical data easier to manage.
3. Disparate Data Sources, such as customers in SQL Server, and Orders in
MySQL (It could happen ;), but you still need to maintain the data
integrity.
So my reasoning is that Data Integrity is the big gain from it. Speed on
the other hand is not. If all you want to do is join the data in two
tables, the a Query is better than a DataSet with relations defined.
tc
-----Original Message-----
From: Greg Quinn [mailto:greg@i...]
Sent: Monday, January 28, 2002 1:39 PM
To: ASP+
Subject: [aspx] Datasets - whats so good about the relationships???
Hi,
I've just finished reading about datasets in my ASP.NET book. I understand
that its nice to keep certain tables in a dataset so you can work with them
and reference them etc. But why the heck do I need to specify relationships
between these tables. If I want to join two tables, isn't it just
easier/better performance for me to use a query and return those results as
a table in my dataset?
Please can someone explain to me why I would ever need to specify the
relationships between tables in a dataset, and give me some real-world
examples of what benefit this brings...
Thanks
Greg
Message #6 by "Dave Buckner" <Dave@N...> on Mon, 28 Jan 2002 11:16:16 -0600
|
|
Joins = More rows, More rows = more memory! I also like what others said on
different data sources.
Regards,
Dave
-----Original Message-----
From: Greg Quinn [mailto:greg@i...]
Sent: Monday, January 28, 2002 1:39 PM
To: ASP+
Subject: [aspx] Datasets - whats so good about the relationships???
Hi,
I've just finished reading about datasets in my ASP.NET book. I understand
that its nice to keep certain tables in a dataset so you can work with them
and reference them etc. But why the heck do I need to specify relationships
between these tables. If I want to join two tables, isn't it just
easier/better performance for me to use a query and return those results as
a table in my dataset?
Please can someone explain to me why I would ever need to specify the
relationships between tables in a dataset, and give me some real-world
examples of what benefit this brings...
Thanks
Greg
Message #7 by ToddC@m... on Mon, 28 Jan 2002 11:24:17 -0600
|
|
Joins don't necessarily mean more rows, just more processing than single
table selects (at least for the DB Server).
tc
-----Original Message-----
From: Dave Buckner [mailto:Dave@N...]
Sent: Monday, January 28, 2002 11:16 AM
To: ASP+
Subject: [aspx] RE: Datasets - whats so good about the relationships???
Joins = More rows, More rows = more memory! I also like what others said on
different data sources.
Regards,
Dave
-----Original Message-----
From: Greg Quinn [mailto:greg@i...]
Sent: Monday, January 28, 2002 1:39 PM
To: ASP+
Subject: [aspx] Datasets - whats so good about the relationships???
Hi,
I've just finished reading about datasets in my ASP.NET book. I understand
that its nice to keep certain tables in a dataset so you can work with them
and reference them etc. But why the heck do I need to specify relationships
between these tables. If I want to join two tables, isn't it just
easier/better performance for me to use a query and return those results as
a table in my dataset?
Please can someone explain to me why I would ever need to specify the
relationships between tables in a dataset, and give me some real-world
examples of what benefit this brings...
Thanks
Greg
Message #8 by "Dave Buckner" <Dave@N...> on Mon, 28 Jan 2002 12:22:59 -0600
|
|
All rows returned though from the server in most cases generate more rows
then when not joining a table. Most of the time this is due to multi child
records. yes?
Dave
-----Original Message-----
From: ToddC@m... [mailto:ToddC@m...]
Sent: Monday, January 28, 2002 11:24 AM
To: ASP+
Subject: [aspx] RE: Datasets - whats so good about the relationships?? ?
Joins don't necessarily mean more rows, just more processing than single
table selects (at least for the DB Server).
tc
-----Original Message-----
From: Dave Buckner [mailto:Dave@N...]
Sent: Monday, January 28, 2002 11:16 AM
To: ASP+
Subject: [aspx] RE: Datasets - whats so good about the relationships???
Joins = More rows, More rows = more memory! I also like what others said on
different data sources.
Regards,
Dave
-----Original Message-----
From: Greg Quinn [mailto:greg@i...]
Sent: Monday, January 28, 2002 1:39 PM
To: ASP+
Subject: [aspx] Datasets - whats so good about the relationships???
Hi,
I've just finished reading about datasets in my ASP.NET book. I understand
that its nice to keep certain tables in a dataset so you can work with them
and reference them etc. But why the heck do I need to specify relationships
between these tables. If I want to join two tables, isn't it just
easier/better performance for me to use a query and return those results as
a table in my dataset?
Please can someone explain to me why I would ever need to specify the
relationships between tables in a dataset, and give me some real-world
examples of what benefit this brings...
Thanks
Greg
Message #9 by "Albert Davis" <albertdavis@h...> on Mon, 28 Jan 2002 13:28:24 -0500
|
|
I agree with Todd - for instance say for our first schema we have 2 tables
in where the second table has a relationship with the first based upon the
customer name (just an example - having keys as varchar's is not optimal):
tblCustomer
-----------
1 record: "Test Customer"
tblCreditCards
-----------
1 record: "Test Customer", "Visa"
1 record: "Test Customer", "Master Card"
1 record: "Test Customer", "Discover"
or for the second just one denormalized table as:
tblCustomer
-----------
1 record: "Test Customer", "Visa"
1 record: "Test Customer", "Master Card"
1 record: "Test Customer", "Discover"
in this example if I do a join on the first schema or a single select on the
second I always get back 3 rows, so just because you have a join (in this
case an inner) doesn't mean your gonna get back more rows....
>From: "Dave Buckner" <Dave@N...>
>Reply-To: "ASP+" <aspx@p...>
>To: "ASP+" <aspx@p...>
>Subject: [aspx] RE: Datasets - whats so good about the relationships??
>?
>Date: Mon, 28 Jan 2002 12:22:59 -0600
>
>All rows returned though from the server in most cases generate more rows
>then when not joining a table. Most of the time this is due to multi child
>records. yes?
>
>Dave
>
>-----Original Message-----
>From: ToddC@m... [mailto:ToddC@m...]
>Sent: Monday, January 28, 2002 11:24 AM
>To: ASP+
>Subject: [aspx] RE: Datasets - whats so good about the relationships?? ?
>
>
>Joins don't necessarily mean more rows, just more processing than single
>table selects (at least for the DB Server).
>
>tc
>
>
>-----Original Message-----
>From: Dave Buckner [mailto:Dave@N...]
>Sent: Monday, January 28, 2002 11:16 AM
>To: ASP+
>Subject: [aspx] RE: Datasets - whats so good about the relationships???
>
>Joins = More rows, More rows = more memory! I also like what others said on
>different data sources.
>
>Regards,
>Dave
>
>-----Original Message-----
>From: Greg Quinn [mailto:greg@i...]
>Sent: Monday, January 28, 2002 1:39 PM
>To: ASP+
>Subject: [aspx] Datasets - whats so good about the relationships???
>
>
>Hi,
>
>I've just finished reading about datasets in my ASP.NET book. I understand
>that its nice to keep certain tables in a dataset so you can work with them
>and reference them etc. But why the heck do I need to specify relationships
>between these tables. If I want to join two tables, isn't it just
>easier/better performance for me to use a query and return those results as
>a table in my dataset?
>
>Please can someone explain to me why I would ever need to specify the
>relationships between tables in a dataset, and give me some real-world
>examples of what benefit this brings...
>
>Thanks
>Greg
>
>
>
>
>
>
>
>
>
>
>
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
|
|
 |