Hi guys,
I'm a somewhat experienced web programmer in PHP and MySQL, but I've been wondering how you would "convert" a web data structure to desktop programming. For example, on the web, from what I have seen, you generally have a database filled with tables and each column is a single field. Database inserts and updates occur through direct SQL, or an API doing direct SQL. Data usually comes from POST or GET data, so it can be put directly into the queries or API (minding security of course).
It doesn't seem to be the case in Desktop programming. While making a C# app, and storing your data in objects, and collections of objects, what is the best practice for storing this data in a database?
Serialize and dump it into a blob field? But then you loose the ability to effectively query the data.
You could serialize and dump the data, but then store some columns anyway. At least ones you might want to search on, but that doesn't seem like the optimal approach either.
Finally, it looks like there are some things you could do to "extract" the data from the objects, and break them up into datasets, but that feels like you're rewriting the whole app. i.e., you would be converting the objects from one form to another, but for no real purpose, other than storage. But again, seems like a lot of work.
Any C#, ADO.NET gurus out there? Thanks in advance.
jbubrisk
I'm a somewhat experienced web programmer in PHP and MySQL, but I've been wondering how you would "convert" a web data structure to desktop programming. For example, on the web, from what I have seen, you generally have a database filled with tables and each column is a single field. Database inserts and updates occur through direct SQL, or an API doing direct SQL. Data usually comes from POST or GET data, so it can be put directly into the queries or API (minding security of course).
It doesn't seem to be the case in Desktop programming. While making a C# app, and storing your data in objects, and collections of objects, what is the best practice for storing this data in a database?
Serialize and dump it into a blob field? But then you loose the ability to effectively query the data.
You could serialize and dump the data, but then store some columns anyway. At least ones you might want to search on, but that doesn't seem like the optimal approach either.
Finally, it looks like there are some things you could do to "extract" the data from the objects, and break them up into datasets, but that feels like you're rewriting the whole app. i.e., you would be converting the objects from one form to another, but for no real purpose, other than storage. But again, seems like a lot of work.
Any C#, ADO.NET gurus out there? Thanks in advance.
jbubrisk