In this document, we will load some data into the database "my-database". We have prepared the sample data files atkins.xml and bloggs.xml for you, so that you do not have to bother about creating XML files yourself. Each of these files contains one instance of the doctype patient, which is defined in the previously mentioned schema HospitalSchema. The sample data files are located in the directory <TaminoDocRootDir>/examples/patient.
To load XML objects into the database
In the Tamino X-Plorer, navigate to the collection
Hospital
and select it.
From the
menu, choose .The Insert Instance dialog box is displayed:
On the From XML File tab, choose the browse button () and browse to the sample data file atkins.xml, which is located in the documentation examples directory <TaminoDocRootDir>/examples/patient. Choose the button to load the file into the database "my-database".
In the navigation tree, the loaded data instance is displayed in the following way:
The data for patient Atkins is represented in the navigation tree by the number "1" underneath the patient node. If you select it, you can see the corresponding XML data in the plain text view in the Content pane:
(The icons in the Content pane allow you to choose between plain text view, HTML view and tree view.)
In the properties pane, metadata is displayed:
For XQuery examples that will follow in the section Retrieving Objects from the Database Using XQuery, now go back to step 1 and also load the XML data set for Mr. Bloggs with the filename bloggs.xml.
The method described here is one of many ways of loading data into Tamino. Another way of loading objects that are structured according to a schema is to use a client programming interface. Tamino offers client APIs for Java and .NET, as well as for ActiveX and JScript. Tamino also offers a programming interface on the basis of the X-Machine programming language. To access the documentation for these APIs, refer to the documentation overview page. An additional method is to use the Tamino Data Loader. Refer to the Tamino Data Loader documentation for details.