P
Paul
Hi, I'm building a database project and have just started getting away
from my newbie habit of storing, say, User names in a User field, as
text. I've now replaced the Name field with a NameID field and map this
field as a Foreign Key to a User table where it is a PK. I'm trying to
build the app based upon a real relational model. This will save a lot
of space in the Name field and other fields as the ID integers replace
the text strings.
The problem I have with it is the seeming waste of processing power
during binding, and how often that happens. The main table binds to a
DataGrid, and I can't now just bind each ItemTemplate cell to the
corresponding text in the main table. Now I have to call a code-behind
function during binding with the ID as an argument and let the function
figure out the mapping between the ID and Name, and then send the Name
back to the ASP.NET for presentation.
Then this has to happen again in EditMode when several DropDownLists get
into the act, and again, I call a code-behind function to figure out
that text belongs in the SelectedItem.
This is not large data; it's small data, maybe a couple of thousand rows
with 12-15 fields each.
In a way this all seems more wasteful of processor resources than what
I'm saving in unused disk storage.
Is this a better mouse trap or a worse one? I guess I'm doing it the
"right" way, with regard to using a relational model. I'm just not sure
it's worth it. Thanks for you opinion. ~Paul
from my newbie habit of storing, say, User names in a User field, as
text. I've now replaced the Name field with a NameID field and map this
field as a Foreign Key to a User table where it is a PK. I'm trying to
build the app based upon a real relational model. This will save a lot
of space in the Name field and other fields as the ID integers replace
the text strings.
The problem I have with it is the seeming waste of processing power
during binding, and how often that happens. The main table binds to a
DataGrid, and I can't now just bind each ItemTemplate cell to the
corresponding text in the main table. Now I have to call a code-behind
function during binding with the ID as an argument and let the function
figure out the mapping between the ID and Name, and then send the Name
back to the ASP.NET for presentation.
Then this has to happen again in EditMode when several DropDownLists get
into the act, and again, I call a code-behind function to figure out
that text belongs in the SelectedItem.
This is not large data; it's small data, maybe a couple of thousand rows
with 12-15 fields each.
In a way this all seems more wasteful of processor resources than what
I'm saving in unused disk storage.
Is this a better mouse trap or a worse one? I guess I'm doing it the
"right" way, with regard to using a relational model. I'm just not sure
it's worth it. Thanks for you opinion. ~Paul