473,382 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Automagically create database schema from XML dataset

Hello.

I am trying to create a database from an XML file. I am able to create a dataset from the XML doc, but how can I create a database schema from the dataset and populate the database? Or is this even possible using VS.NET 2003?

Part of the XML file follows. Thanks for any help.

Steven
VS.NET 2003 and C# newbie!

----- Part of the XML (one full record across several tables) --------

<!DOCTYPE PubmedArticleSet...>
- <PubmedArticleSet>
- <PubmedArticle>
- <MedlineCitation Owner="NLM" Status="Completed"><PMID>11604973</PMID>
- <DateCreated><Year>2001</Year><Month>10</Month><Day>17</Day></DateCreated>
- <DateCompleted><Year>2002</Year><Month>02</Month><Day>14</Day></DateCompleted>
- <Article>
- <Journal><ISSN>1569-6332</ISSN>
- <JournalIssue PrintYN="Y"><Volume>10</Volume><Issue>Pt 2</Issue>
- <PubDate><Year>2001</Year></PubDate></JournalIssue></Journal><ArticleTitle>Personal health information-seeking: a qualitative review of the literature.</ArticleTitle>
- <Pagination><MedlinePgn>1484-8</MedlinePgn></Pagination>
- <Abstract><AbstractText>This ...</AbstractText></Abstract><Affiliation>Division of Biomedical Informatics and Outcomes Research, Oregon Health Sciences University, Portland, OR, USA. zs*****@theriver.com</Affiliation>
- <AuthorList CompleteYN="Y">
- <Author><LastName>Stavri</LastName><ForeName>P Z</ForeName><Initials>PZ</Initials></Author></AuthorList><Language>eng</Language>
- <PublicationTypeList><PublicationType>Journal Article</PublicationType><PublicationType>Review</PublicationType><PublicationType>Review Literature</PublicationType></PublicationTypeList></Article>
- <MedlineJournalInfo><Country>Netherlands</Country><MedlineTA>Medinfo</MedlineTA><NlmUniqueID>7600347</NlmUniqueID></MedlineJournalInfo><CitationSubset>IM</CitationSubset>
- <MeshHeadingList>
- <MeshHeading><DescriptorName MajorTopicYN="N">Health Education</DescriptorName><QualifierName MajorTopicYN="Y">utilization</QualifierName></MeshHeading>
- <MeshHeading><DescriptorName MajorTopicYN="N">Health Services Accessibility</DescriptorName></MeshHeading>
- <MeshHeading><DescriptorName MajorTopicYN="N">Health Services Needs and Demand</DescriptorName></MeshHeading>
- <MeshHeading><DescriptorName MajorTopicYN="N">Human</DescriptorName></MeshHeading>
- <MeshHeading><DescriptorName MajorTopicYN="N">Information Services</DescriptorName><QualifierName MajorTopicYN="Y">utilization</QualifierName></MeshHeading>
- <MeshHeading><DescriptorName MajorTopicYN="Y">Patient Acceptance of Health Care</DescriptorName></MeshHeading>
- <MeshHeading><DescriptorName MajorTopicYN="N">Patient Participation</DescriptorName></MeshHeading></MeshHeadingList><NumberOfReferences>63</NumberOfReferences></MedlineCitation>
- <PubmedData>
- <History>
- <PubMedPubDate PubStatus="pubmed"><Year>2001</Year><Month>10</Month><Day>18</Day><Hour>10</Hour><Minute>0</Minute></PubMedPubDate>
- <PubMedPubDate PubStatus="medline"><Year>2002</Year><Month>2</Month><Day>15</Day><Hour>10</Hour><Minute>1</Minute></PubMedPubDate></History><PublicationStatus>ppublish</PublicationStatus>
- <ArticleIdList><ArticleId IdType="pubmed">11604973</ArticleId><ArticleId IdType="medline">21490760</ArticleId></ArticleIdList></PubmedData></PubmedArticle>
- <PubmedArticle>
Nov 12 '05 #1
2 9804
You might find the Xml Bulk Upload tool easier to work with.

Create a Schema for your Xml File - heck VS will even create a Schema for
you.
You give XML Bulk upload it your Schema can tell it to create the tables for
you and so on.

Note : not always as simple as it sounds - do you have any Schema knowledge?
If not then learn it - it will be invaluable to you.

Here's a nice little article on it http://sightkeys.com?175

Steven
Founder, http://venturetogether.com

"Steven (dotnet newbie)" <an*******@discussions.microsoft.com> wrote in
message news:BD**********************************@microsof t.com...
Hello.

I am trying to create a database from an XML file. I am able to create a dataset from the XML doc, but how can I create a database schema from the
dataset and populate the database? Or is this even possible using VS.NET
2003?
Part of the XML file follows. Thanks for any help.

Steven
VS.NET 2003 and C# newbie!

----- Part of the XML (one full record across several tables) --------

<!DOCTYPE PubmedArticleSet...>
- <PubmedArticleSet>
- <PubmedArticle>
- <MedlineCitation Owner="NLM" Status="Completed"><PMID>11604973</PMID>
- <DateCreated><Year>2001</Year><Month>10</Month><Day>17</Day></DateCreated> - <DateCompleted><Year>2002</Year><Month>02</Month><Day>14</Day></DateComplete
d> - <Article>
- <Journal><ISSN>1569-6332</ISSN>
- <JournalIssue PrintYN="Y"><Volume>10</Volume><Issue>Pt 2</Issue>
- <PubDate><Year>2001</Year></PubDate></JournalIssue></Journal><ArticleTitle>P
ersonal health information-seeking: a qualitative review of the
literature.</ArticleTitle> - <Pagination><MedlinePgn>1484-8</MedlinePgn></Pagination>
- <Abstract><AbstractText>This ....</AbstractText></Abstract><Affiliation>Division of Biomedical Informatics
and Outcomes Research, Oregon Health Sciences University, Portland, OR, USA.
zs*****@theriver.com</Affiliation> - <AuthorList CompleteYN="Y">
- <Author><LastName>Stavri</LastName><ForeName>P Z</ForeName><Initials>PZ</Initials></Author></AuthorList><Language>eng</Lang
uage> - <PublicationTypeList><PublicationType>Journal Article</PublicationType><PublicationType>Review</PublicationType><Publicati
onType>Review Literature</PublicationType></PublicationTypeList></Article> - <MedlineJournalInfo><Country>Netherlands</Country><MedlineTA>Medinfo</Medlin
eTA><NlmUniqueID>7600347</NlmUniqueID></MedlineJournalInfo><CitationSubset>I
M</CitationSubset> - <MeshHeadingList>
- <MeshHeading><DescriptorName MajorTopicYN="N">Health Education</DescriptorName><QualifierName
MajorTopicYN="Y">utilization</QualifierName></MeshHeading> - <MeshHeading><DescriptorName MajorTopicYN="N">Health Services Accessibility</DescriptorName></MeshHeading> - <MeshHeading><DescriptorName MajorTopicYN="N">Health Services Needs and Demand</DescriptorName></MeshHeading> - <MeshHeading><DescriptorName MajorTopicYN="N">Human</DescriptorName></MeshHeading> - <MeshHeading><DescriptorName MajorTopicYN="N">Information Services</DescriptorName><QualifierName
MajorTopicYN="Y">utilization</QualifierName></MeshHeading> - <MeshHeading><DescriptorName MajorTopicYN="Y">Patient Acceptance of Health Care</DescriptorName></MeshHeading> - <MeshHeading><DescriptorName MajorTopicYN="N">Patient Participation</DescriptorName></MeshHeading></MeshHeadingList><NumberOfRefer
ences>63</NumberOfReferences></MedlineCitation> - <PubmedData>
- <History>
- <PubMedPubDate PubStatus="pubmed"><Year>2001</Year><Month>10</Month><Day>18</Day><Hour>10</
Hour><Minute>0</Minute></PubMedPubDate> - <PubMedPubDate PubStatus="medline"><Year>2002</Year><Month>2</Month><Day>15</Day><Hour>10</
Hour><Minute>1</Minute></PubMedPubDate></History><PublicationStatus>ppublish
</PublicationStatus> - <ArticleIdList><ArticleId IdType="pubmed">11604973</ArticleId><ArticleId IdType="medline">21490760</ArticleId></ArticleIdList></PubmedData></PubmedAr
ticle> - <PubmedArticle>

Nov 12 '05 #2
Hi Steven - Xml schema can be difficult at first, but stick with it - it is
probably the coolest stuff in the Xml world (along with Xslt of course
IMHO). Once you learn it you will find it useful all over the place!

Brian Likes has some really great info on Bulk Upload and Sqlxml at
http://www.sqlxml.org/. He also links to the book which he co-wrote (and
which has a good chapter on bulk upload in it).

As for Schema. here are links to some books on Xml Schema
http://sightkeys.com?xmlschema

Any questions let me know.

Steven
Founder, http://venturetogether.com

"Steven (dotnet newbie)" <an*******@discussions.microsoft.com> wrote in
message news:1B**********************************@microsof t.com...
Thanks Steven!

I will start reading the XML Bulk link. I do not have any experience with schemas. It is on my todo list :)
Any great links on Schema knowledge?

Thanks again for your help!!

Steven Waldren

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: David Elliott | last post by:
I can create this: ?xml version="1.0" standalone="yes" ?> <ConfigOpt> <record> <Field_1>Text # 1</Field_1> <Field_2>Text # 2</Field_2> </record> </ConfigOpt>
3
by: Saso Zagoranski | last post by:
Hi! A question about database tables... I have a SELECT statement: SELECT something FROM someTable WHERE code = @code The parameter code starts with 1 and is autoincremented... Now I want...
2
by: Fabrizio | last post by:
HI I'm trying to copy schema and data from a dataset to another, using DataSet.Merge method The 2 dataset are filled by 2 adapters and the sources are 2 mdb database When i merge datasets, it...
2
by: Frosty | last post by:
Howto make datagrid enforce rules of xml schema? Created xml schema in the designer. Constraints created there using the following <xs:simpleType name="zipcode"><xs:restriction...
0
by: M. David Johnson | last post by:
I cannot get my OleDbDataAdapter to update my database table from my local dataset table. The Knowledge Base doesn't seem to help - see item 10 below. I have a Microsoft Access 2000 database...
10
by: Grumpy Aero Guy | last post by:
Visual Studio .net Academic Edition: After creating a OLEdbDataadapter, followed by an OLE DB Connection (all of which occurs successfully, by the way), I am unable to create a Dataset. I...
3
by: shapper | last post by:
Hello, I need to add a XML file from an Access database. Could someone tell me what would be the best approach? Thanks, Miguel
1
by: donet programmer | last post by:
I have a requirement where I need to create a dataset that consists of a table inside a table ( a child table inside a parent table). I am not really familiar with the data relations and not sure...
0
by: DrSnap | last post by:
Hi, Admitted I am a newbie to Oracle (databases in general) but now Ive installed the Oracle DB v.10g and the ODAC development tools for Microsoft Visual Studio 2005. So, now i've found out,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.