The data related to a project can be exported into
an archive. Choose Data -
Archive -
Create archive... from the menu. A window as shown below will open.
Select the project you want to create an archive of
and click on the Find the data
button. The data related with the project will be imported into temporary tables
to allow you to inspect them in advance of the creation of the archive (use the
buttons to see the data). To create the archive, click on the
Create the archive
button. A directory will be created containing a XML file for every table.
Before you restore an archive, please make sure
that the data from the archive do not interfere with the data in the database.
In order to avoid problems you should clean the database from any user data. To
clear the database from any user data, choose Data -
Archive -
Reset database... from the
menu. A window as shown below will open listing all tables and the number of
data within these tables. Click on the Reset database
button to remove any of these data
including any data in the log tables.
To restore an archive choose Data -
Archive -
Restore archive... from the menu. A window as shown below will open
listing the tables in the database. To restore an archive click on the Choose
archive directory
button and select the directory containing the
archive files. Next click on the Read data
button to import the data from the XML files into temporary tables.
With a click on the
buttons you can inspect the content of the temporary tables. Finally click on
the Restore the archiv
button.
To administrate the schedule based creation of
archives choose Data -
Archive -
Administrate archives... from the menu. A window as shown below will open listing
the projects in the database. Select the project that should be included in the
schedule based creation of archives. To create an archive for all selected
projects, click on the Create archives
button. The protocol of a previous
archiving is shown as in the image below.
Successful runs are indicated with a
green color while failures have a red background (see below).
Next to the data, the archive files contain a xsd description of the tables. To create xsd schemata independent of the content, select Data - Archive - Create schema from the menu. A windows as shown below will open with the list of all tables where the main tables of the database are preselected.
To change this selection you
may use the
all and
none buttons resp. the Add
to selection
and Remove from
selection
options using
* as a wildcard. Click on the Create schemata
button to
create the schemata for the selected tables in the
predefined directory. The
button will open this
directory containing the created files. The schemata contain
the name of the DiversityWorkbench module and its version,
the definition of the table, the primary key and the colums
together with their datatype and description (see the
example below).
<DiversityAgents_02.01.13>
<xs:schema
id="DiversityAgents_02.01.13">
<xs:element
name="DiversityAgents_02.01.13" msdata:IsDataSet="true"
msdata:MainDataTable="Agent" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0"
maxOccurs="unbounded">
<xs:element name="Agent">
<xs:complexType>
<xs:sequence>
<xs:element
name="AgentID" msdata:Caption="Unique ID for the Agent (=
Primary key)" type="xs:int"/>
<xs:element
name="AgentParentID" msdata:Caption="The AgentID of the
superior agent if agents are organized within a hierarchy"
type="xs:int"/>
<xs:element name="AgentName"
msdata:Caption="The whole name of the agent as shown e.g.
for selection in an user interface. For persons this entry
will be generated as follows: LastName, FirstNames,
AgentTitle" type="xs:string"/>
<xs:element name="Version"
msdata:Caption="The version of a agent record (revision
number, internally filled by system)" type="xs:short"/>
<xs:element name="AgentTitle" msdata:Caption="The title of
the agent, e.g. Dr., Prof." type="xs:string"/>
<xs:element name="GivenName" msdata:Caption="The first names
of the agent (if a person) or the name of e.g. an
institution" type="xs:string"/>
<xs:element
name="GivenNamePostfix" msdata:Caption="Variable part of
name, correctly placed at end of given names"
type="xs:string"/>
<xs:element name="InheritedNamePrefix"
msdata:Caption="Variable part of name, correctly placed at
the beginning of the inherited names" type="xs:string"/>
<xs:element name="InheritedName" msdata:Caption="The last
names of the agent (if a person)" type="xs:string"/>
<xs:element name="InheritedNamePostfix"
msdata:Caption="Additions after inherited name, like
generation (Jr., III.) or names of religious orders"
type="xs:string"/>
<xs:element name="Abbreviation"
msdata:Caption="Abbreviation of the agent"
type="xs:string"/>
<xs:element name="AgentType"
msdata:Caption="The type of the agent, e.g. person, company"
type="xs:string"/>
<xs:element name="AgentRole"
msdata:Caption="The role of an agent esp. a person within an
organization. e.g. "Database Administrator" or "Curator""
type="xs:string"/>
<xs:element name="AgentGender"
msdata:Caption="The gender resp. sex of the agent"
type="xs:string"/>
<xs:element name="Description"
msdata:Caption="A description of the agent"
type="xs:string"/>
<xs:element name="OriginalSpelling"
msdata:Caption="Name as originally written in e.g. chinese
or cyrillic letters" type="xs:string"/>
<xs:element
name="Notes" msdata:Caption="Notes about the agent"
type="xs:string"/>
<xs:element name="ValidFromDate"
msdata:Caption="The date of the begin of the exsistence of
the agent, e.g. the birthday of a person or the founding of
an institution, calculated from ValidFromDay, - Month and
-Year" type="xs:dateTime"/>
<xs:element
name="ValidFromDay" msdata:Caption="The day of the begin of
the exsistence of the agent" type="xs:unsignedByte"/>
<xs:element name="ValidFromMonth" msdata:Caption="The month
of the begin of the exsistence of the agent"
type="xs:unsignedByte"/>
<xs:element name="ValidFromYear"
msdata:Caption="The year of the begin of the exsistence of
the agent" type="xs:short"/>
<xs:element
name="ValidUntilDate" msdata:Caption="The date of the end of
the exsistence of the agent, e.g. death of a person or
closing of an institute, calculated from ValidUntilDay, -
Month and -Year" type="xs:dateTime"/>
<xs:element
name="ValidUntilDay" msdata:Caption="The day of the end of
the exsistence of the agent" type="xs:unsignedByte"/>
<xs:element name="ValidUntilMonth" msdata:Caption="The month
of the end of the exsistence of the agent"
type="xs:unsignedByte"/>
<xs:element
name="ValidUntilYear" msdata:Caption="The year of the end of
the exsistence of the agent" type="xs:short"/>
<xs:element name="ValidDateSupplement"
msdata:Caption="Verbal or additional date information, e.g.
'end of summer 1985', 'first quarter'. The time of the valid
date if necessary." type="xs:string"/>
<xs:element
name="PlaceOfBirth" msdata:Caption="The place (e.g. a city)
where a person was born or an institution was founded"
type="xs:string"/>
<xs:element name="PlaceOfDeath"
msdata:Caption="The place (e.g.a city) where the person
died" type="xs:string"/>
<xs:element
name="SynonymToAgentID" msdata:Caption="The AgentID of the
agent which was selected as a replacement for the current
agent, e.g. if to equal datasets were imported from
different sources" type="xs:int"/>
<xs:element
name="SynonymisationType" msdata:Caption=""
type="xs:string"/>
<xs:element name="RevisionLevel"
msdata:Caption="The level of the revision of the agent, e.g.
'unchecked', 'final revision'" type="xs:string"/>
<xs:element name="DataWithholdingReason" msdata:Caption="If
the dataset is withhold, the reason for withholding the
data, otherwise null" type="xs:string"/>
<xs:element
name="LogUpdatedBy" msdata:Caption="Name of user who last
updated the data." type="xs:string"/>
<xs:element
name="LogUpdatedWhen" msdata:Caption="Date and time when the
data were last updated." type="xs:dateTime"/>
<xs:element
name="IgnoreButKeepForReference" msdata:Caption="If true,
the record is ignored for all purposes of evaluation
(because contradicted). It is kept only to maintain the
cited reference. If no reference is given, it may be deleted
instead." type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1"
msdata:PrimaryKey="true">
<xs:selector xpath=".//Agent"/>
<xs:field xpath="AgentID"/>
</xs:unique>
</xs:element>
</xs:schema>
</DiversityAgents_02.01.13>
To archive the data in a scheduler based background process, you
can start the application with the following arguments:
C:\DiversityWorkbench\DiversityAgents> DiversityAgents.exe Archive snsb.diversityworkbench.de 5432 DiversityAgents C:\DiversityWorkbench\DiversityAgents\Archive
The application will create the archives, generate the protocols as described above and quit automatically after the job is done. The user starting the process needs a Windows authentication with access to the SQL-Server database and proper rights to archive the data. If the last argument is not given the default directory [...\Application directory\Archive] will be used.