There was an error in this gadget

Tuesday, October 20, 2009

XDb - XML Base Proprietary Database


Project Synposis by : Mr. Atanu Maity, Email : am@programmer2programmer.net


XML (Extensible Markup Language) is a general-purpose specification for creating custom markup languages. It is classified as an extensible language, because it allows the user to define the mark-up elements. XML's purpose is to aid information systems in sharing structured data.

Proposed XML based proprietary database - XDb will be developed for Image based application. It will be file system based database system. It uses XML to store table definition and storing data. XML has inbuilt DTD data type definition features to validate the input data. Proposed System will use XQuery to query the stored data from XML file. Images will be stored in file system. File name or file pointer will be used to retrieve the image file from the file system.

System.XML, System.XML.XPath and System.XML.Schema namespace will be used to manipulate XML node, element, attribute and value in a XML file within .Net application.

Advantages

  1. It is completely Proprietary database.
  2. Data will be stored in XML file which is easy to manipulate in ADO.Net
  3. Image will be stored in file system which will give better access speed.
  4. Multiple images can be stored in single file and system can read individual image from one file.
  5. Individual image can be stored in single image folder and can read from that folder.
  6. Data and Image can be encrypted by any industry standard encryption algorithm like DES, AES, 3 DES.
  7. System will query the by using XQuery.
  8. Complete manage code written in .NET 2.0.
  9. Easy to integrate in .NET application.

Project Scope

1. Database Designing

Database details will be stored in XML file, like image folder or image storing file name, location.

2. Table Designing

Table definition will be stored in XML schema file having .xsd extension. With standard XML data type and precision, A "Valid" XML document is a "Well Formed" XML document, which also conforms to the rules of a XML file.

veh_data.xsd

xml version="1.0"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="veh_data">

<xs:complexType>

<xs:sequence>

<xs:element name="vd_id" type="xs:integer" use="required" />

<xs:element name="vd_loan" type="xs:string" use="required" length="16" />

<xs:element name="vd_loc" type="xs:string" use="required" />

<xs:element name="vd_date" type="xs:date" use="required" />

<xs:element name="vd_img_name" type="xs:string" use="required" />

<xs:element name="vd_img_type" type="xs:string" use="required" />

xs:sequence>

xs:complexType>

xs:element>

schema>

3. Storing of Data

Data will be stored in xml file, data integrity and constraint will be maintain by XML schema file

veh_data.xml

xml version="1.0" encoding="utf-8" ?>

<include xmlns="veh_data.xsd" />

<veh_data>

<vd_id>Tovevd_id>

<vd_loan>VDPU00000011vd_loan>

<vd_loc>Mumbaivd_loc>

<vd_date>10-Jan-2009vd_date>

<vd_img_name>VDPU00000011.jpgvd_img_name>

<vd_img_type>jpgvd_img_type>

>

<veh_data>

. . .

. . .

>

<veh_data>

. . .

. . .

>

<veh_data>

. . .

. . .

>

<veh_data>

. . .

. . .

>

4. Storing of Data

4.1 Store multiple images in a single imagebase file

While write single file in imagebase file it stores file information in imagebase header like file name, file type, byte start position, byte length. While read single file from imagebase it reads file information from header and read the bytes from imagebase by reading byte position and byte length. While write and read data in imagebase it can be used and standard byte encryption algorithm like DES, 3DES, RC4, PGP, AES. This will maintain data integrity and data security.


4.2 Store images in folder

Image will be stored in folder and file name will be stored in database table. It will give best performance however it reduces data integrity. While storing the file in folder we can apply standard encryption algorithm like DES, 3DES, RC4, PGP, AES.

Query the Data

XDb will use XQuery to query the data from XML file. XQuery is the language for querying XML data. XQuery is a language for finding and extracting elements and attributes from XML documents. XQuery provides the means to extract and manipulate data from XML documents.

XQuery uses XPath expression syntax to address specific parts of an XML document. It supplements this with a SQL-like "FLWOR expression" for performing joins. A FLWOR expression is constructed from the five clauses after which it is named: FOR, LET, WHERE, ORDER BY, RETURN. The language is based on a tree-structured model of the information content of an XML document, containing seven kinds of node: document nodes, elements, attributes, text nodes, comments, processing instructions, and namespaces.

Out of Scope

Following are the out of scope for current version of XDb 1.0, will be work upon on next version.

  1. Data Compression
  2. Store image file in different drive for single file concept.
  3. DB Interface for creating, altering and managing data base.

Database Architechture

Following diagram will explain the different file in the XDb database and their purpose.

No comments:

Post a Comment