XML Development

Moderators: None (Apply to moderate this forum)
Number of threads: 252
Number of posts: 451

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
XML and relational database mapping Posted by antons on 5 May 2010 at 7:59 AM
Hi
I'm very new to XML, and have the following question.
I have XML file like this:

<?xml version="1.0"?>
<Company>
<Department>
<Name>Enterprise Development</Name>
<Employee>
<Name>Jeff</Name>
</Employee>
<Employee>
<Name>Mike</Name>
</Employee>>
</Department>
<Department>
<Name>Foundation Services</Name>
<Employee>
<Name>Sam</Name>
</Employee>
</Department>
</Company>

There is a one to many relationship between 'Department' and 'Employee'. When I import this file into Access DB, it creates the two tables with the data in it, but it does not seem to know there is such a relationship between the two tables. The schema is inferred.
How do I fix this.?? Do I include the primary key of the Department in both the Department and the Employee, and then manually set up the relationship in Access, or is there a more 'correct' solution.??
Thanks
Anton



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.