This discussion is archived
1 Reply Latest reply: Nov 10, 2011 8:31 PM by Oracle, Sandra Whitman RSS

new to berkeley dbxml, possibilities of implementing it as org chart?

653831 Newbie
Currently Being Moderated
hello,

i need some advice/pointers on berkeley db xml. Currently i have a project that is dealing with a company's organization chart. They want to have a hierarchical structure to be shown by webapp. The employees, each will have the rights to view,edit,delete the nodes on the chart.

my initial idea is to store all these employee info (like personal info,address, etc. etc) as xml document, embed this xml document into berkeley dbxml's container. On the application side, i will use servlet to act as middle layer to access the document where multiple users/employees will access the same document concurrently to do (view,add,edit or delete).

my questions arised:

Q1) is this the right way to implement this architecture using servlet? given berkeley dbxml is an embedded db, can it cope with multi user access the document and edit at the same time?

Q2) design preference question actually,on relational db, commonly the employee info will be stored in few tables like "emptable","empaddresstable" referenced by foreign key. Question is do i stored it all under the same xmldocument or in another container with separate xml? or stored the referenced data (eg "empaddresstable") in relational db and all emp info as xmldocument?

Q3) is it possible to control certain node under xml? (eg. let's say the xml element "A" can only allow 2 child element, attempt to insert/append more than 2 child element underneath will throw an exception) can it be done with xml schema definition?

i know it's a lot to ask, i read some tutorial, but i need some advice on these specific problems i'm facing which i'm unable to find on tutorial. please to all the expert, please advice.

thank you for your time,

wesley
  • 1. Re: new to berkeley dbxml, possibilities of implementing it as org chart?
    Oracle, Sandra Whitman Journeyer
    Currently Being Moderated
    Hello,

    For the three questions you raised:

    1. is this the right way to implement this architecture using servlet?
    given berkeley dbxml is an embedded db, can it cope with multi user
    access the document and edit at the same time?

    Yes, you should be able to DBXML Java API through a servlet
    (DBXML is just a library) and DBXML supports ACID transactions so
    you should be able to access and update the document
    at the same time.


    2. design preference question actually,on relational db,
    commonly the employee info will be stored in few tables
    like "emptable","empaddresstable" referenced by foreign key.
    Question is do i stored it all under the same xmldocument
    or in another container with separate xml? or stored the
    referenced data (eg "empaddresstable") in relational db
    and all emp info as xmldocument?

    You could create two databases one for emp and one
    for empaddress and store the individual xmldocuments into them.


    3. is it possible to control certain node under xml?
    (eg. let's say the xml element "A" can only allow 2
    child element, attempt to insert/append more than 2 child
    element underneath will throw an exception) can it be
    done with xml schema definition?

    If by this question you are asking if DBXML supports
    XQuery please take a look at the documentation at:
    http://download.oracle.com/docs/cd/E17276_01/html/gsg_xml/cxx/index.html


    Thanks,
    Sandra

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points