Local sqlce database or datatable in xml file
-
Hi all, I have started a new WindowsForms project and I am wondering if there is a benefit to store my project data in a local SQLCE database or just store data table(s) in a xml file. The data-tables have a maximum of 9999 records and 150 columns. The data is used for auto-complete source(job number only) and to compare just one record from stored data with new data. the data does not change for hours. The data per column is 10 characters. I hope You can help me to choose and elaborate the pro's and cons. Groover
0200 A9 23 0202 8D 01 80 0205 00
-
Hi all, I have started a new WindowsForms project and I am wondering if there is a benefit to store my project data in a local SQLCE database or just store data table(s) in a xml file. The data-tables have a maximum of 9999 records and 150 columns. The data is used for auto-complete source(job number only) and to compare just one record from stored data with new data. the data does not change for hours. The data per column is 10 characters. I hope You can help me to choose and elaborate the pro's and cons. Groover
0200 A9 23 0202 8D 01 80 0205 00
Any table with 150 columns means you have a bad design! Having said that I would always go for a database solution but it may depend on your distribution requirements. Managing data in an XML file is dramatically more difficult than read/write to a database. You have difficulty maintaining any sort of relational integrity and reporting is painful.
Never underestimate the power of human stupidity RAH
-
Hi all, I have started a new WindowsForms project and I am wondering if there is a benefit to store my project data in a local SQLCE database or just store data table(s) in a xml file. The data-tables have a maximum of 9999 records and 150 columns. The data is used for auto-complete source(job number only) and to compare just one record from stored data with new data. the data does not change for hours. The data per column is 10 characters. I hope You can help me to choose and elaborate the pro's and cons. Groover
0200 A9 23 0202 8D 01 80 0205 00
In general, it will take a bit more effort to get up and running with SqlCE than with XML files (IMO). There is also usually a need to distribute extra runtime dll's with SqlCE. There is nothing in the description of your project that makes it obvious which is the better choice; and listing "pros and cons" that may have no bearing on your project seems pointless. If there are no obvious advantages (apparent to you), then go with the one that performs best relative to your current needs.
-
Any table with 150 columns means you have a bad design! Having said that I would always go for a database solution but it may depend on your distribution requirements. Managing data in an XML file is dramatically more difficult than read/write to a database. You have difficulty maintaining any sort of relational integrity and reporting is painful.
Never underestimate the power of human stupidity RAH
Hi Mycroft, Having a table with 150 columns is a must, the data just has 150 parameters that can change. there is no need for reporting and no relations, just one or two tables, and distribution is to one workstation only. Groover
0200 A9 23 0202 8D 01 80 0205 00
-
In general, it will take a bit more effort to get up and running with SqlCE than with XML files (IMO). There is also usually a need to distribute extra runtime dll's with SqlCE. There is nothing in the description of your project that makes it obvious which is the better choice; and listing "pros and cons" that may have no bearing on your project seems pointless. If there are no obvious advantages (apparent to you), then go with the one that performs best relative to your current needs.
Hi Gerry, With the XML datafile I will have to store the datatable in memory and overwrite or create a new XML file with new or changed data. Wit SQLCE database I will have to deal with one record only. Groover
0200 A9 23 0202 8D 01 80 0205 00
-
Hi Gerry, With the XML datafile I will have to store the datatable in memory and overwrite or create a new XML file with new or changed data. Wit SQLCE database I will have to deal with one record only. Groover
0200 A9 23 0202 8D 01 80 0205 00
Groover, You have identified a requirement that is important then. You are right: to "update" an Xml file, you will have to rewrite the entire file. If "updating" is a factor, then SqlCE is a better choice. Having committed to SqlCE, I would then also look at Entity Framework (EF) for your ORM and EF's "Code First" approach where you have EF generate the database for you based on your class / entity definitions. Gerry from Amersfoort.