{"id":5624,"date":"2014-04-04T05:11:58","date_gmt":"2014-04-04T05:11:58","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/04\/can-i-create-a-database-schema-from-a-dataset-and-or-xsd-file-collection-of-common-programming-errors\/"},"modified":"2014-04-04T05:11:58","modified_gmt":"2014-04-04T05:11:58","slug":"can-i-create-a-database-schema-from-a-dataset-and-or-xsd-file-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/04\/can-i-create-a-database-schema-from-a-dataset-and-or-xsd-file-collection-of-common-programming-errors\/","title":{"rendered":"Can I create a database schema from a DataSet and\/or .xsd file?-Collection of common programming errors"},"content":{"rendered":"<p>I have some questions about creating SQL Server CE databases. Based on my experiments and what I&#8217;ve read on these forums, it looks like there are a couple ways to create a database schema.\u00a0I can edit the database schema via the Server Explorer in Visual Studio, or\u00a0use an external program like SQL Server Management Studio and somehow convert those files to .sdf files.<\/p>\n<p>I find Visual Studio&#8217;s built in tools to be cumbersome to use and limited in functionality, and using SSMS seems like a roundabout way of approaching the problem. I understand Microsoft will be releasing better tools with Orcas, but in the meantime, I&#8217;m wondering if there are alternative ways to generate database schemas.<\/p>\n<p>For instance, I find Visual Studio&#8217;s DataSet designer fairly easy to use. The DataSet designer generates schema definitions (.xsd files), and an instantiated DataSet can both\u00a0read and write schema definitions\u00a0via Read\/WriteXMLSchema. Furthermore, DataAdapter&#8217;s Fill and FillSchema methods can be used to push\u00a0a schema from a database to a\u00a0DataSet. So, can I somehow go the other direction and\u00a0push a schema from a DataSet to\u00a0a database? It seems like all the tools are there&#8230;<\/p>\n<p>For example, if I create the DataSet schema,\u00a0could I use a small\u00a0app to create a new .sdf file, instantiate a DataSet, write the schema from the DataSet to the database, and then save the .sdf file? Or given the generated .xsd file, is there any way to create a SQL database from that?<\/p>\n<p>Thanks in advance for any replies.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have some questions about creating SQL Server CE databases. Based on my experiments and what I&#8217;ve read on these forums, it looks like there are a couple ways to create a database schema.\u00a0I can edit the database schema via the Server Explorer in Visual Studio, or\u00a0use an external program like SQL Server Management Studio [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5624","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5624"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5624\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}