XML Database Migration


1. INTRODUCTION

 

 

 XML Database Migration is a project of migrating the existing databases into XML format. Conversion of databases to XML file format, the databases like Ms-Access, and MS-SQL connects in the network or in the personal computer can be connected for the generation of XML code. Let us consider, user runs a firm with three companies with different database’s respectively. User planned to mingle the entire database’s of the firm in to a single database.

 

The user wants to migrate the entire database in to a single database. Migration of a database to another database is a huge process and a complex one. In such case our project can be used as we are converting the entire database into a XML file and then it is to a single database.

 

 By doing so, the conversion is been made easier and the native database also will remain unchanged. Only the authorized person is allowed to access the databases. The user is been prompted for username and password and then the user can be allowed to select the type of database. After selection, the user is been prompted for database name and then corresponding tables present in that database is been displayed from which the user can select the table which the user wants to convert.

 

Before conversion, the user can view the table from that the user can check whether the correct table is been selected. The table is been converted and a message will be displayed to the user about the conversion. The converted file will be in the XML format and it is been previewed to the user in the database format after conversion. Here, the user can check whether all the fields in the table are converted. While converting the data’s in the tables, the tables present in the database remains unchanged and the fields from the tables retrieved are subjected for XML conversion.

 

1.1 PROJECT OVERVIEW

 

XML Database Migration is a project of migrating the databases into XML format.  Conversion of databases toXML file format, the databases like Ms-Access and MS-SQL connects in the network can be connected for the generation of XML code.

 

 1.2 OBJECT AND SCOPE OF THE PROJECT

  

·         XML Database Migration is a project of migrating the existing databases into XML format.

 

·         Conversion of databases to XML file format, the databases like Ms-Access, MS-SQL connected in the network or in the personal computer can be connected for the generation of XML code.

 

·         We retrieve tables from the corresponding database and generate      code for the appropriate databases and convert the tables into XML flat file format.

 

·         This converted XML file is been presented to the client

 

 BASIC DATABASE CONCEPTS

 

A computer database is a structured collection of records or data that is stored in a computer system. A database relies upon software to organize the storage of data. In other words, the software models the database structure in what are known as database models (or data models). The model in most common use today is the relational model. Other models such as the hierarchical model and the network model use a more explicit representation of relationships. Database management systems are usually categorized according to the database model that they support. The data model tends to determine the query languages that are available to access the database.

 

     A great deal of the internal engineering of a DBMS, however, is independent of the data model, and is concerned with managing factors such as performance, concurrency, integrity, and recovery from hardware failures. In these areas there are large differences between products. A relational database is a database that conforms to the relational model, and refers to a database's data and schema (the database's structure of how that data is arranged). Common usage of the term "Relational database management system-RDBMS" technically refers to the software used to create a relational database, but sometimes mistakenly refers to a relational database.

 

   Computer databases typically contain aggregations of data records or files, such as sales transactions, product catalogs and inventories, and customer profiles. Typically, a database manager provides users the capabilities of controlling read/write access, specifying report generation, and analyzing usage. SQL (Structured Query Language) is a standard language for making interactive queries from and updating a database such as IBM's DB2, Microsoft's Access, and database products from Oracle, Sybase, and Computer Associates.

 

BASICS OF XML

 

The Extensible Markup Language (XML) is a general-purpose specification for creating custom markup languages. It is classified as an extensible language because it allows its  users to define their own elements. Its primary purpose is to facilitate the sharing of structured data across different information systems, particularly via the Internet, and it is used both to encode documents and to serialize data. In the latter context, it is comparable with other text-based serialization languages. It started  as  a   simplified  subset   of  the  Standard  Generalized  Markup  Language (SGML),  and  is  designed   to  be  relatively   human-legible.  By   adding   semantic constraints, application languages can be implemented in XML. Moreover, XML is sometimes used as the specification language for such application languages.

 

XML is recommended by the World Wide Web Consortium. It is a fee-free open standard. The W3C recommendation specifies both the lexical grammar and the requirements for parsing. An entity in XML is a named body of data, usually text. Entities are often used to represent single characters that cannot easily be entered on the keyboard; they are also used to represent pieces of standard text that occur in many documents, especially if there is a need to allow such text to be changed in one place only. It is relatively simple to verify that a document is well-formed or validated XML, because the rules of well-formedness and validation of XML are designed for portability of tools. The idea is that any tool designed to work with XML files will be able to work with XML files written in any XML language (or XML application).

 

XML Web services, an important evolution in Web-based technology, are distributed, server-side application components similar to common Web sites. However, unlike Web-based applications, XML Web services components have no UI and are not targeted for browsers such as internet Explorer and Netscape Navigator. Instead, XML Web services consist of reusable software components designed to be consumed by other applications, such as result, XML Web services technology is rapidly moving application development and deployment into the highly distributed environment of the internet.

 

For example, the web services Description Language tool include the .NET Framework also provides a collection of classes and tools to aid in development and consumption of XML Web services applications. XML Web services are built on standards such as SOAP (a remote procedure-all protocol), XML (an extensible data format), and WSDL (the Web Services Description Language). The .NET Framework is built on these standards to promote interoperability with non-Microsoft solutions with the .NET Framework Finally, like Web pages in the managed environment, your XML Web service will run with the speed of native machine language using the scalable communication of HS.

 

ABOUT XML  

     XML (extensible Markup Language) has become one of the primary standards for data exchange and representation on the World Wide Web and is widely used in many fields. Traditionally, lots of data and information are still stored in and managed by relational database systems, such as Oracle, Sybase, SQL Server,  etc. So it is necessary and urgent to develop some efficient methods to convert relational data to XML data in order to take advantage of all the merits of XML data. As DTDs (Document Type Definitions) are still the most frequently used schemas for XML documents in these days, we will use DTDs as schemas of XML documents. The schema semantics plays a very important role in the schema conversion, and functional dependencies of relational schema are very important   representations of semantic information. So it is significant that the conversion method from relational schemas to XML schemas must consider the semantics implied by functional dependencies and keys, and final XML schemas can represent such semantics in a similar way

 

 

  • Extensible Markup Language

 

  • Markup Language for documents containing structured information

 

  • Defined by four specification

 

Ø   XML, Extensible Markup Language

Ø   XLL, Extensible Linking Language

Ø   XSL, Extensible Style Language

Ø   XUA, XML User Agent

 


2. SYSTEM ANALYSIS

 

 

    The requirements gathering process is intensified and focused on software. The nature of the programs to be built, the software engineer must understand the information domain for the software, as well as required function, behavior, performance and interface. Requirements for both the system and software are documented and reviewed with the customer.

 

 

2.1 PROBLEM STATEMENT

 

Various types of Databases are being used in Real-time. The complexity arises when a there is a need for inter-operation between databases. At this stage all or part of databases must be migrated to a common type of database. If the databases are too large then surely it will be an overhead.

 

2.2 EXISTING SYSTEM AND ITS LIMITATIONS

    The Existing system provides access for single database conversions. Databases are widely used at present in all sorts of resources, these Databases occupy part of memory in the server and amount should be paid to maintain these Databases. In web, database is widely used at present. The database occupies some part of memory in the server and amount should be paid to maintain the database. The amount will depend upon the database size, and also Access and Oracle database are platform dependent.

 

    XML is platform independent. While using database, lot of problems will be arise like data corruption, huge memory spaces, and unnecessary expenses for database security. Now a day’s most of the websites stores data in backend storage device.  The data are stored in Oracle database or some other backend devices. These databases occupy some part of memory in the server. The site owner should be paid some amount of money to maintain that database.

 

The amount should be vary depending upon the database size and also have a lot of problem to maintain the database. This is unnecessary expenses and waste of memory spaces. To retrieve the data from the database is very slow when we are browsing the site. These are the difficult arising to retrieve the database.

 

      There are lots of problems in the existing system. They are,  

 

·         Data corruption will occur.

 

·         Requires huge memory space.

 

·         Unnecessary expenses for database security.

 

 

These databases occupy some part of memory in the server. The site owner should be paid some amount of money to maintain that database. The amount should be vary depending upon the database size and also have a lot of problem to maintain the database. Replication of database and backup of database has to perform on a time to time basis as it consumes large amount of memory.

 

2.3 PROPOSED SYSTEM

 

          XML Migration is project to convert the existing Database like Oracle and MS-Access into the XML database. The XML is a text formatted flat file, so this project has an ability to store any kind of data from the application system. On using the xml as a backend we reduce the memory occupied in net and there is no need to pay amount separately for XML database as it is file and consumes less memory. XML has more advantages over other databases.

 

The XML has the ability to process on any platform, since it is platform independent we can use it in any operating system. Apart from this no proxy server or firewall can restrict xml formatted data’s. Here maintenance is very easy as it is a file and consumes very less memory.

 

Previously in database maintenance is a major task and cost paid separately. Many databases are not supported in different platforms but XML file format supports different platforms like Linux, Windows etc., as .NET transfers data in the form of XML formatted data only. As this is a major advantage to us in converting to XML. XML flat file format is used as an intermediate for the Database conversions. 

 

Advantages

               There is no need of Administrator support as this proposed system converts the database into the “text based file”. No data loss, as the database is changed into a normal text file format. Occupies less memory space. No need to pay money for maintaining the database. Accessing will be fast while processing data. Cross platform independent, so it can be used in any operating system. Enhanced security when compared, although it is flat file.  Human resource is reduced. There is no need of Administrator support since we convert the database into “text based file”. Enhanced security is assured since we provide Authentication while retrieving tables from the Databases.

 

2.4 FEASIBILITY STUDY

         It is wise to think about the feasibility of any problem we take on. Feasibility is the study of impact, what happens in the organization by the development of a system. The impact can be either positive or negative. When the positive dominates the negative, then the system is considered feasible. Here the feasibility study can be performed in three ways such as technical feasibility, economic feasibility and operational feasibility.

 

2.4.1 Technical Feasibility

    We can strongly say that it is technically feasible, since there will not be much difficulty in getting required resources for the development and maintaining the system as well. All resources needed for the development of the software as well as the maintenance of the same is available. Here we are utilizing the resources, which are already available.

 

2.4.2 Operational Feasibility

     The proposed system is beneficial if and only if they can be turned into a system that will meet the operating requirements. The best feasibility asks if the system will work when it is developed and installed. The purpose of the operational feasibility study is to determine whether the new system will be used if it is developed and implemented. The proposed system will be used frequently since it satisfies all the communication needs, hence operational feasibility is assured.

 

2.4.3 Economic Feasibility

      Development of this application is highly economically feasible. We need not spend much money for the accomplishment of the project since the resources needed for the development of the system is already available. The only thing to be done is making an environment for the development with an effective supervision. If we are doing so, we can attain the maximum usability of the corresponding resources. Therefore the system is economically feasible.

 

3. SYSTEM SPECIFICATION

 

       The software requirement specification is produced at the culmination of the analysis task. The function and performance allocated to software as part of system engineering are refined by establishing a complete information description, a representation of system behavior, an indication of performance requirements and design constraints, appropriate validation criteria, and other information pertinent to requirements.

           

        The introduction of the software requirements specification states the goals and objectives of the software, describing it in the context of the computer-based system. Actually the introduction may be nothing more than the software scope of the planning document.

 

            The information description provides the detailed description of the problem that the software must solve. Information content, flow and structure are documented. Hardware, software and the human interfaces are described for the external system elements and internal software functions.

 

A description of each function required to solve the problem is presented in the functional description. A processing narrative is provided for each function, design constraints are stated and justified, performance characteristics are stated and one or more diagrams are included to graphically represent the overall structure of the software and interplay among software functions and other system elements.

 

          The behavioral description section of the section of the specification examines the operations of the software. As a consequence of the external events and internally generated control characteristics. Validation criteria are probably the most important and, ironically the most often neglected section of the software requirement specification.

 

Specification of validation criteria acts as an implicit review of all other requirements, it is essential the time and attention be given to the section. In many cases the software requirements specification may be accompanied by an executable prototype, a paper prototype or a preliminary user’s manual. The preliminary users manual present the software as a black box. That is, heavy emphasis is placed on user input and the resultant output. The manual can serve as a valuable tool for uncovering problems at the human/machine interface.

 

The software requirement specification is conducted by both the software developer and the customer. Because the specification forms the foundation of the development case, extreme care should be taken in conducting the review. The review is first conducted in the macroscopic level; that is, reviewers attempt to ensure that the specification is complete, consistent and accurate when the overall information, functional and behavioral domains are considered. However, to fully explore each of these domains, review becomes more detailed, examining not only broad descriptions but the way in which requirements are worded.

 

The software requirement specification is developed as a consequence of analysis. Review is essential to ensure that the developer and the customer have the same

perception of the system. Unfortunately, even with the best of methods, the problem is that the problem keeps changing.

 

3.1 HARDWARE SPECIFICATION

 

o       Processor                                 :           Pentium IV

 

o       Memory                                   :           512 MB

 

o       Hard Disk Drive                     :           20 GB

 

o       Display Adapter                      :           256 Color Monitor

 

 

 

3.2 SOFTWARE SPECIFICATION

 

·         Operating System           -       Windows XP

·         Front End                   -           .NET 2005 with ASP , C#

·         Back End                        -       Sql server 2005

 

3.3 BRIEF OVERVIEW OF SOFTWARE TOOLS

 

Microsoft Visual Studio is the main Integrated Development Environment (IDE) from Microsoft. It can  be  used to develop console and GUI applications along with Windows Forms applications, web sites, web applications, and web services in both native  codes  as  well  as  managed  code   for  all  platforms supported by Microsoft Windows,  Windows  Mobile,  .NET Framework,  .NET Compact   Framework  and Microsoft Silver light. Visual Studio includes a code editor supporting IntelliSense as well as code refactoring.  The integrated debugger works both as a source-level debugger and   a   machine-level   debugger.  Other   built-in   tools include a forms designer for building GUI applications, web designer, class designer, and database schema designer.

 

 It allows plug-ins to be added that enhance the functionality at almost every level - including adding support for source control systems (like Subversion and Visual SourceSafe) to adding new toolsets like editors and visual designers for domain-specific languages or toolsets for other aspects of the software development lifecycle (like the Team Foundation Server client: Team Explorer). Visual Studio supports languages by means of language services, which allow any programming language to be supported (to varying degrees) by the code editor and debugger, provided a language-specific service has been authored.

 

 Built-in languages include C/C++ (via Visual C++), VB.NET (via Visual Basic .NET), and C# (via Visual C#). Support for other languages such as F#, Python, and Ruby among others has been made available via language services which are to be installed separately. It also supports XML/XSLT, HTML/XHTML, JavaScript and CSS. Language-specific versions of Visual Studio also exist which provide more limited language services to the user. These individual packages are called Microsoft Visual Basic, Visual J#, Visual C#, and Visual C++.

 

The .NET infrastructure consists of all the technologies that help in creating an running robust, scalable and distributed applications. The core of the .NET infrastructure is the .NET framework, which is a collection of services and classes. It exists as a layer between .NET applications and the underlying operating system. Asp .NET is one of the languages that are directed towards meeting the objectives of the .NET initiative of creating distributed applications. It has inherited the capability of rapid application development from its earlier versions and strengthened considerably the implementation of object oriented features.

    

            Asp .NET has many new and improved features such as inheritance, interfaces, and overloading that makes it a powerful object-oriented programming language. Other new language features include free threading and structured exception handling.  Asp .NET fully integrates the .NET Framework and the Common Language Runtime, which together provide language interoperability, garbage collection, enhanced security, and improved versioning support.  As a Asp developer, we can create multithreaded, scalable applications using explicit multithreading.

 

 DATABASES

 

 Ms-Sql Server

   SQL Server 2000 is a scalable, reliable, and easy-to-use product that will provide a solid foundation for application design for the next 20 years. Database applications can now be deployed widely due to intelligent, automated storage engine operations. Sophisticated yet simplified architecture improves performance, reliability, and scalability.

 

Ms-Access

             Access is used by small businesses, within departments of large corporations, and by hobby programmers to create ad hoc customized desktop systems for handling the creation and manipulation of data. Access can be used as a database for basic web based applications hosted on Microsoft's Internet Information Services and utilizing Microsoft Active Server Pages ASP. Most typical web applications should use tools like ASP/Microsoft   SQL   Server   or the LAMP stack.


 Some professional application developers use Access for rapid application development, especially for the creation of prototypes and standalone applications that serve as tools for on-the-road salesmen. Access     does   not   scale   well   if   data access   is via a network, so   applications   that are    used   by more than a   handful l   of   people   tend to   rely   on Client-Server   based solutions. However, an Access "front end" (the forms, reports, queries   and VB code)   can be used against a   host of database backends, including JET (file-based   database   engine, used   in   Access   by   default). Microsoft   SQL Server and any other ODBC-compliant product. Some tools are   available   for unlocking and ' decompiling’, although certain   element s including original VBA comments and formatting are normally irretrievable.

 

 4. SYSTEM DESIGN

 

         The most creative and challenging phase of system lifecycle is the system design.  System  design  is  the  process  that  states  the   details   of   how     a system will meet the requirements  identified  during  system   analysis.  When the analyst   prepares  logical   system   design,   they specify the user needs at level of   detail   that   virtually   determines   information   flow   into  and out  of  the system   and  the  required  data    source.   First   step  in  the  design  is  to  determine   how  the  output  is    to  be  produced    and   in  what  format.   Secondly,   input   data and master files have to be   designed   to   meet   the   requirement   of proposed   output.   Finally,    the   end   of   the   design   phase,   the   system      flow   chart   will   be   ready   which   is   used   as   the   base   of   coding   phase.

 

4.1 OBJECT ORIENTED ANALYSIS AND DESIGN

       A high level view of the organization of a system can be shown by system flowchart. The rectangular boxes represent original aggregates of computer software. It is often very useful diagram for the system designers who must develop overall system architecture of hardware and software to implement the user requirements. There  is  one  situation  where  the  system  flowcharts  could   be  a  useful  modeling  tool:  At  the  end  of  the  system  analyst’s activity, when  the  user  implementation  model  is  being developed. At  this point,  the  user,      the system analyst, and the implementation  team discuss the implementation constraints  that  must  be   imposed  upon  the system: these include such things    as  the  determination  of  the  automation  boundary and the human interface. Input design is creative as well as technical activity, which includes the following tasks.

 

·         Approaching the terms of reference.

 

·         Designing the format medium of files.

 

·         Determining methods of data capture and data input.

 

·         Designing forms.

 

INPUT DESIGN

         The input of a system can be defined as the information that is provided to the system. This is used for future processing by the system to obtain meaningful information, which helps in decision-making. Input design is the process of converting user-oriented inputs to a computer-based format. Input is a part of overall system design, which requires special attention. Inaccurate input data are the most common cause of errors in error processing. Input design can control errors entered by data entry operators. Entered data have to be checked for   their accuracy and direction of errors. Appropriate error message have to be displayed. When an invalid data is entered, the user should not be allowed to type it.

  

OUTPUT DESIGN

           The computer output is the most important and direct source of information to the user. Efficient and intelligible output design improves the system’s relationship with the user and helps in decision-making. Output design was studied going actively during the study phase. The objective of the output design is defined the contents and format of all documents and reports in an attractive and useful format.

 

Types of Outputs

 

·         External output

·         Internal output

·         Operational outputs

·         Interactive outputs

 

Output  generally   refers  to  the  results  and  information  that are generated  by  the  system.  It can   be in the form of operational documents and reports. The   major  form  of  output  is  a  hard  copy  from  the  printer.  Once the output requirements are identified, the output devices used also should be determined. Factors like compatibility of the output device with the system and response time requirement should be considered while descending the output device to be utilized.

 

DEVELOPMENT MODEL

The development phase focuses on how the engineer attempts to develop the system.

It also deals with how data are to be structured, how the function is to be implemented within software architecture, how procedural details are to be implemented, how interfaces are characterized, how the design will be translated into a programming language, and how testing will be performed. The methods applied during the development phase will vary but three specific technical tasks should always occur.


·         Software design   

·         Code generation

·         Software testing

 

The classical life cycle model or the linear sequential model is a systematic and sequential approach to software development. It progress through analysis, design, coding, testing and support.

 

Analysis 

The requirements gathering process is intensified and focused on software. The nature of the programs to be built, the software engineer must understand the information domain for the software, as well as required function, behavior, performance and interface. Requirements for both the system and software are documented and reviewed with the customer.

 

3.4.2 Design

Software design actually a multistep process that focuses on four attributes of a program: data structure, software architecture, interface representations and procedural detail. The design process translates the requirements into a representation of the software that can be assessed for the quality before coding begins.

 

3.4.3 Code generation

          The design must be translated into a machine-readable form. The code generation step performs this task. If the design is performed in a detailed manner, code generation can be accomplished mechanistically. The requirement was converted into code.

 

3.4.4 Testing

     Once code   has been   generated, program testing begins. The testing process focuses on the logical internals of the software, ensuring that all statements have been tested, and on the functional externals; that is conducting test uncover errors and ensure that defined input will produce actual results that argue   with required results. Software is tested for its consistency and accuracy. These tests   are done in testing phase.

 

CLASS DIAGRAM

              Class diagram are widely used to describe the types of objects in a system and their relationship .Class diagram model class structure and contents using design element such as classes, packages and objects. Class diagram describe three different perspectives when designing a system, conceptual, specification, and implementation. These perspectives become evident as the diagram is created and help solidify the design. This example is meant as an introduction to the UML.

            Class diagrams are the mainstay of object-oriented analysis and design. UML  class diagrams show the classes of the system, their interrelationships (including inheritance, aggregation, and association), and the operations and attributes of the classes. Class diagrams are used for a wide variety of purposes, including both conceptual/domain modeling and detailed design modeling.  Although I prefer to create class diagrams on whiteboards because simple tools are more inclusive most of the diagrams that I’ll show in this article are drawn using a software-based drawing tool so you may see the exact notation.

Conceptual Class Diagrams

          Depicts a start at a simple UML class diagram for the conceptual model for a university.  Classes are depicted as boxes with three sections, the top one indicates the name of the class, the middle one lists the attributes of the class, and the third one lists the methods.  By including both an attribute and a method box in the class I’m arguably making design decisions in my model, something I shouldn’t be doing if my goal is conceptual modeling.  Another approach would be to have two sections, one for the name and one listing responsibilities.  This would be closer to a CRC model (so if I wanted to take this sort of approach I’d use CRC cards instead of a UML class diagram).

 

 Use Case Diagram

A use case is a methodology used in system analysis to identify, clarify, and organize system requirements. The use case is made up of a set of possible sequences of interactions between systems and users in a particular environment and related to a particular goal. It consists of a group of elements (for example, classes and interfaces) that can be used together in a way that will have an effect larger than the sum of the separate elements combined. The use case should contain all system activities that have significance to the users. A use case can be thought of as a collection of possible scenarios related to a particular goal, indeed, the use case and goal are sometimes considered to be synonymous.

A use case has these characteristics:

  • Organizes functional requirements
  • Models the goals of system/actor (user) interactions
  • Records paths (called scenarios) from trigger events to goals
  • Describes one main flow of events (also called a basic course of action), and possibly other ones.

Use cases can be employed during several stages of software development, such as planning system requirements, validating design, testing software, and creating an outline for online help and user manuals.

 

DATA FLOW DIAGRAMS

      Graphical description of a system data and how the processor transforms the data is known as data if flow diagrams Data Flow Diagrams (DFD) are used for documenting the findings in data flow analysis. They graphically show the relation between processes a data. The transformation of data from input to output, through processes, may be described logically and independently of the physical components associated with the system. DFD’S quite easy to read and understand. There are two alternate but equivalent symbol sets.

 

There are four simple notations to complete a DFS

 

*      Data Flow

*      Transform process

*      Data Store

*      External entity

 

 

ADVANTAGE OF DFD

      These are simple notations, which are easily understand by users and those involved in the system. Users can be involved in the study of DFD for more accuracy. Users can examine charts and starts. Avoiding mistakes early may prevent systems failure.

     The basic notations used to create a DFD are illustrated in below figure:

 

EXTERNAL ENTITY

    A Procedure or consumer of

Information that resides Outsides the

bounds of the system to be modeled.

  

4.1.3 MODULES DESCRIPTION

 

This project consists of the following modules.

 

·         Server Accessing Module

 

·         Retrieval of tables

 

·         XML Code generation

 

·         Preview of XML file

 

They are briefly explained as follows.

 

Server Accessing Module

    Database servers have their own username and password, for accessing    the database files. Without correct user name and password, we can’t   access the data’s from the Databases. In converting databases to XML   file format, the Database server connects in the network or in the    personal computer can be connected for the generation of XML code. We provide authentication for User and protect the Database servers from unauthorized   access.

 

 SQL   server has its   own username and   password, for accessing the database file. Both have high security. Without correct user name    and password, we can’t access oracle and SQL server database file. In  converting   databases  to   XML   file   format, the database  like  MS-Access,  connects  in  the   network   or   the  in   the     personal  computer  can   be connected    for    the  generation  of  XML   code. In that module we should provide authentication for user and protect the server Database from   unauthorized   access. MS-Access   database   can   be   connected from the local drivers, floppy or compact disk.

 

 Retrieval of Tables

           To view the tables in the database, this   module is used.   By   selecting the   each   table   in   the   database,   the   corresponding   structure   of   the   table is seen. In particular fieldname, data type, size, precision and scale. These instructions   are   collecting   from here for verifying the cascading   style sheet.   If there is any need for modifying the database, then by selecting the Table in this module manipulation can be done here like operations insertion updating and deletion.

 

This   helps   to make a necessary   manipulation   and   important changes at   that   time   of migration. To retrieve the table from the database, this module is used. After Authentication, the User is allowed to select the Database type and prompted for Database name. The tables in the specified Database are listed. The specified table name given by the User is been retrieved from the Database tables. The User is made to select the table for which the conversion is to be carried out. The tables selected by the User can also be previewed for the case of reducing mal-selections.

  

 XML Code Generation

             In this module, the data’s in the table are selected and converted into XML file   format.  The selected table is been implicitly assigned to a temporary file for the conversion   process.  The   assigned   file   is converted   into   a   XML    file by    using   the   appropriate code.  After conversion, the original data’s   in the   Database   will remain unchanged.   Individual tags are created for each   and   every field   in the table retrieved from the Database, specified by the User. This module is used to generate the XML code for the database connected in the first module.

Here we   write   the own   Algorithm   for   accessing   the     Databases   and   retrieving the   fields   in that   Database and Migrate that entire Database into proper XML format.  In   that   first   the type of the database object   is chosen. Database object and also corresponding required fields for the migration.

  

 Preview of XML file

 

In this module, the   XML   file    which   is   converted   is been   viewed. The   file   name   of   the   XML   is   been    prompted    to   the   user     so   that      we   can   view   in   as   such   format.  We   can   check   whether   all   the respective   fields   of   tables   requested   by   the   client   are   converted.   If       any   error   occur   means   we   can   modify    the   XML   file   which   is    been    converted   in    the    last   module. There   will be no change in the source file.


6. PSEUDOCODE

 

 

Login Page

 

Using System.ComponentModel;

Using System.Data;

Using System.Drawing;

Using System.Web;

Using System.Web.SessionState;

Using System.Web.UI;

Using System.Web.UI.WebControls;

Using System.Web.UI.HtmlControls;

Using System.Data.SqlClient;

 

Namespace XMLCON

{

     /// <summary>

     /// Summary description for login.

     /// </summary>

     Public partial class login: System.Web.UI.Page

 

     {

        SqlConnection con = new SqlConnection ("Data Source=.; Initial Catalog=project; Integrated Security=True");

          Protected void Page Load (object sender, System.EventArgs e)

          {

 

              // Put user code to initialize the page here

 

          }

 

          #region Web Form Designer generated code

          Override protected void OnInit (EventArgs e)

 

          {

              //

 

              // CODEGEN: This call is required by the ASP.NET Web Form Designer.

              //

              InitializeComponent ();

              base.OnInit (e);

 

 

          }

         

          /// <summary>

          /// required method for Designer support - do not modify

          /// the contents of this method with the code editor.

          /// </summary>

          Private void InitializeComponent ()

 

          {   

 

}

          #end region

 

          Protected void Button1_Click (object sender, System.EventArgs e)

 

          {

 

          SqlDataAdapter adp=new SqlDataAdapter ("select count (uname) from login where uname='"+TextBox1.Text+"'and upwd='"+TextBox2.Text+"'", con);

              DataTable DT=new DataTable ();

              adp.Fill (dt);

              int i;

              i=int.Parse (dt.Rows [0][0].To String());

         if (i=j)

              {

 

                   Response. Redirect ("DBSelection.aspx");

 

              }

 

              Else

 

              {

                   Label4.Visible=true;

                   Label4.Text="Invalid Username or Password";

              }

 

          }

       

 

 

 Protected void Button1_Click1 (object sender, EventArgs e)

        {

 

        }

}

 

}

 

 

Ms Access Page

 

Using System;

Using System.Data;

Using System.Configuration;

Using System.Collections;

Using System.Web;

Using System.Web.Security;

Using System.Web.UI;

Using System.Web.UI.WebControls;

Using System.Web.UI.WebControls.WebParts;

Using System.Web.UI.HtmlControls;

Using System.Data.OleDb;

Using System.Data.Odbc;

Using System.Xml;

 

Public partial class webform3: System.Web.UI.Page

{

 

   Public OleDbConnection con; // = new OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\praveen.mdb;Persist Security Info=False; user id=Admin;");                                          

 

    Protected void Page_Load (object sender, EventArgs e)

    {

 

        If (! IsPostBack == true)

        {

 

        }

 

    }

 

    Private void WriteDataSetToXmlFile (Dataset ds, string fileName)

    {

 

        If (ds! = null)

 

        {

            String absoluteFileName = Server.MapPath (fileName);

            System.IO.FileStream myFileStream = new System.IO.FileStream (absoluteFileName, System.IO.FileMode.Create);

            System.Xml.XmlTextWriter myXmlWriter = new System.Xml.XmlTextWriter (myFileStream, System.Text.Encoding.Unicode);

            ds.WriteXml (myXmlWriter);

            myXmlWriter.Close ();

 

        }

    }

 

 

     Protected void Button1_Click (object sender, EventArgs e)

    {

        String a = TextBox1.Text;

       

       

        OleDbConnection con = new OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D: \\XML DATABASE MIGRATION\\XML database migrration\\XMLCON\\"+a.ToString () + ".mdb; Persist Security Info=False; user id=Admin ;");

        con.Open ();

        String [] tblrestrictions = new string [] {null, null, null,"TABLE”};

        DataTable DT = new DataTable ();

        DT=con.GetSchema ("tables", tblrestrictions);

        con.Close ();

        GridView1.DataSource = dt;

        GridView1.DataBind ();

 

    }

 

    Protected void Button2_Click (object sender, EventArgs e)

    {

 

        String a = TextBox1.Text;

        OleDbConnection con = new OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D: \\XML DATABASE MIGRATION\\XML database migration\\XMLCON\\" + a.ToString () + ".mdb; Persist Security Info=False; user id=Admin ;");

        String b = TextBox2.Text;

        OleDbDataAdapter ADP = new OleDbDataAdapter ("select * from " + b.ToString () + "", con);

        Dataset ds = new Dataset ();

        adp.Fill (ds);

        GridView1.DataSource = ds;

        GridView1.DataBind ();

    }

 

    Protected void Button3_Click (object sender, EventArgs e)

    {

        String a = TextBox1.Text;

        String b = TextBox2.Text;

        OleDbConnection con = new OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D: \\XML

 

 

DATABASE MIGRATION\\XML database migrration\\XMLCON\\"+a.ToString () + ".mdb; Persist Security Info=False; user id=Admin ;");

        con.Close ();

        OleDbDataAdapter ADP = new OleDbDataAdapter ("select * from "+b.ToString () +"", con);

        DataTable dta = new DataTable ();

        adp.Fill (dta);

        Dataset ds = new Dataset ();

        ds.Tables.Add (dta);

        //XmlTextWriter = new XmlTextWriter (Response.OutputStream, System.Text.Encoding.UTF8);

        WriteDataSetToXmlFile (ds, ""+b.ToString () +".xml");

        Label3.Visible = true;

    }

   

}

 

Ms Sql Page

 

 

Using System;

Using System.Collections;

Using System.ComponentModel;

Using System.Data;

Using System.Data.SqlClient;

Using System.Drawing;

Using System.Web;

Using System.Web.SessionState;

Using System.Web.UI;

Using System.Web.UI.WebControls;

Using System.Web.UI.HtmlControls;

Using System.Xml;

 

Namespace XMLCON

{

 

    Public partial class WebForm1: System.Web.UI.Page

     {

       

        Public SqlConnection con;

        Protected void Page_Load (object sender, System.EventArgs e)

          {

              If (! IsPostBack==true)

              {

 

              }

 

          }

 

          Private void WriteDataSetToXmlFile (Datasets ds, string fileName)

          {

              If (ds! = null)

              {

                   String absoluteFileName = Server.MapPath (fileName);

                   System.IO.FileStream myFileStream = new System.IO.FileStream (absoluteFileName, System.IO.FileMode.Create);

                   System.Xml.XmlTextWriter myXmlWriter = new System.Xml.XmlTextWriter (myFileStream, System.Text.Encoding.Unicode);

                   ds.WriteXml (myXmlWriter);

                   myXmlWriter.Close ();

           

              }

          }

 

 

          #region Web Form Designer generated code

          Override protected void OnInit (EventArgs e)

          {

              //

              // CODEGEN: This call is required by the ASP.NET Web Form Designer.

              //

              InitializeComponent ();

              base.OnInit (e);

          }

         

          /// <summary>

          /// required method for Designer support - do not modify

          /// the contents of this method with the code editor.

          /// </summary>

          Private void InitializeComponent ()

          {   

 

 

          }

          #end region

 

         

 

          Protected void Button2_Click (object sender, System.EventArgs e)

          {

            String a = TextBox1.Text;

            SqlConnection con = new SqlConnection ("server=.; Initial Catalog=" + a.ToString () + "; Integrated Security=True");

            SqlDataAdapter da1=new SqlDataAdapter ("select count (name) from sysobjects where xtype='u'", con);

              DataTable dt=new DataTable ();

              da1.Fill (dt);

              DropDownList1.Items.Clear ();

 

              SqlDataAdapter da2=new SqlDataAdapter ("select name from sysobjects where xtype='u'", con);

              DataTable dt1=new DataTable ();

              da2.Fill (dt1);

              int i,j;

              i=int.Parse (dt.Rows [0][0].To String ());

              For (j=0; j<i; j++)

              {

                   DropDownList1.Items.Add (dt1.Rows [j] [0].To String ());

              }

 

 

             

          }

        Protected void Button1_Click (object sender, System.EventArgs e)

 

        {

            String a = TextBox1.Text;

            SqlConnection con = new SqlConnection ("server=.; Initial Catalog=" + a.ToString () + "; Integrated Security=True");

            String b = DropDownList1.Text;

            SqlDataAdapter ADP = new SqlDataAdapter ("select * from " + b.ToString () + "", con);

            DataTable dta = new DataTable ();

            adp.Fill (dta);

            Dataset ds = new Dataset ();

            ds.Tables.Add (dta);

            //XmlTextWriter = new XmlTextWriter (Response.OutputStream, System.Text.Encoding.UTF8);

            WriteDataSetToXmlFile (ds, "" + b.ToString () + ".xml");

            Label3.Visible = true;

 

           

        }

 

 

        Protected void Button3_Click (object sender, EventArgs e)

        {

            String a = TextBox1.Text;

            SqlConnection con = new SqlConnection ("server=.; Initial Catalog=" + a.ToString () + "; Integrated Security=True");

            String b = DropDownList1.Text;

            SqlDataAdapter adp = new SqlDataAdapter ("select * from " + b.ToString () + "", con);

            Dataset ds = new Dataset ();

            adp.Fill (ds);

            GridView1.DataSource = ds;

            GridView1.DataBind ();

 

        }

 

 

       }

}

 

 

 

                   7. TESTING AND IMPLIMENTATIONS

 

 

 SYSTEM IMPLEMENTATION

Implementation is the stage, which is crucial in the life cycle of new system designed. The main stages in the implementation are

 

·         Planning

·         Testing

·         System testing

 

This system implementation phase consists of the following steps:

 

*      Testing the developed software with sampled data correction of any error if identified.

 

*      Creating the files of the system with actual data.

 

*      Making necessary changes to the system to find out errors.

 

*      Training of user personnel data.

 

The system has been   tested   with sample data, changes are made to the user requirements and run in parallel with existing system to find out the discrepancies. The user has also been appraised how to run the system during the training period. A crucial phase in the system life cycle is successful implementation of the new system design. Implementation   simply means converting a new system design into an operation.  This   involves   creating computer compatible   files, training   the operating staffs and installing hardware, terminals and telecommunication network before   the    system is up and running.  A   critical factor in   conversion is   not disrupting the functioning of an

 

Organization. Implementation means converting a new system or revised system into an operational one.

 

It is the process if designing from an old system to the new one. Several procedures and documents are carried during the conversion process.

 

There are three types of implementation

 

·         Implementation of computer system to replace a manual system. The problems encountered are converting files, training users, creating accurate files and verifying printouts for integrity.

·         Implementation of a new computer system to replace an existing one. This is usually a difficult conversion. If not properly planned, there can be many problems. Some large computer systems have takes as long as a year to convert.

·         Implementation of a modified application to replace an existing one, using the same computer. This type of conversion is relatively easy to handle, provided there are no major changes in the file.

 

The method of implementation and time scale to be adopted is found out initially. Next the system is tested properly and at the same time the users are trained in the new procedure. Proper implementation is essential to provide a reliable system to meet organization requirements. Successful implementation may not guarantee improvement in the organization using the new system, but it will prevent   improper installation.  The implementation involves the following things:

 

Maintenance Issues

In software maintenance, an enormous mass of potential problems and cost lies under the surface.  Software maintenance is of course, far more than fixing mistakes.  Analysis’s and programmers append for more time in maintaining the program then they do writing them.  Few tools and techniques are available for maintenance.  The literature on maintenance contains very few entries when compared to development activities.  The software maintenance is classified into four tasks:

 

·         Corrective Maintenance

·         Adaptive Maintenance

·         Perfective Maintenance

 

 Corrective Maintenance

 The corrective maintenance is to correct the diagnosis errors in this project.  It helps to easily identify the diagnosis errors in this software for debugging it.

 

 Adaptive Maintenance

It modifies this project with a changing environment.

 

 Perfective Maintenance

                        It recommends for new capabilities in any module, Modification s to the existing functions and increases the value of this project that is general enhancements. The modules   of   the system are tested   separately. This test is carried   out   during programming stage   itself.  Each module should work satisfactorily as regards to the expected   from   the module. There   are   validation   checks    for the   fields    also. Analysis’s   and   programmers   append   for   more   time   in   maintaining    the   program then they do writing them.  Few tools and techniques are available for    maintenance.  The literature on maintenance contains   very few    entries   when compared to development activities. The software maintenance is classified into four tasks

 

 SYSTEM TESTING

      The objective of testing is a process of executing a program with the intention of finding errors. Testing provides the last option from which quality     can be accessed and more pragmatically, errors can be uncovered. Testing is an individualistic process and the number of different types of tests varies as much as the different development approaches. System testing is a series of different tests whose primary purpose is to fully exercise the computer-based system. Testing accounts for largest percentage of technical   effort in the software development process.

 

Test   begins   as the module level and work towards the integration of   the entire computer based system. Software testing must accommodate low level tests that are necessary to verify that a small source code segment has been correctly implemented as well as high level test that validate major system functions, against customer’s requirements. No testing is complete without verification and validation. 

  

White Box Testing

By using this   technique, it was tested that all the individual logical paths were executed at least once. All the logical decisions were tested on both their true and false side. All the troops were tested with data in between the ranges and especially at the boundary values.

 

 Black Box Testing

         By the use of this technique the missing functions were identified and placed in their positions. The errors in the interfaces were identified and corrected. This technique was also used to identified the initialization and termination errors and correct them.


 

 SOFTWARE TESTING STRATEGIES

 

          Any software has to be tested with pre-planned strategies. As Roger Pressman States, the preparation for testing should start as soon as the design of the system starts. To carry out the testing in an efficient manner certain amount of strategic planning has to be done. Any testing strategy must incorporate test planning, test case design, test execution and the resultant data collection and evaluation. The Web-Robot was tested with the help of the following software testing strategies:

 

Unit Testing

          In the lines of strategy, all the individual functions and modules were put to the test independently. By following this strategy all the errors in coding were identified and corrected. This method was applied in combination with the White and Black Box testing Techniques to find the errors in each module.

 

 Integration Testing

     Again   this software testing strategy has   two different   approaches namely the top down approach in  which the integration   is carried out   from the top level module to  the  bottom  and  the  bottom  up approach  in  which  the integration is carried out from the low level modules to the top. The modules were tested using the bottom up  approach  by introducing stubs  for the top-level functions. This test was used  to identify  the  errors  in  the  interface  the  errors  in  passing the parameters between the functions and to correct them.

 

 Validation Testing

The main aim of this testing is to verify that the software system does what it was designed for. Alpha testing was carried out to ensure the validity of the system.


8. CONCLUSION

       

           Using this project we can easily migrate the existing database. The XML is a text format flat file, so our project has an ability to store any kind of data in different operating system. XML file format support different platform like Linux, Windows   etc…Even though our source data’s crashes we can backup the database from XML file.  By migrating into common file format, the  database size  is been reduced, accessing time is minimized and also with less human resource.

Using this project we migrate databases to the XML file. In future this  can be enhanced into multiple databases. In this project the semantic constraints present in the source databases are not included in the   conversion. In future it can be included in the conversion process.

 

 

9. BIBILOGRAPHY

 

 

1.      Essential Skills for First-Time Programmers "SQL- A Beginners’ Guide", by Forrest Houlette, Ph.D.  Osborne Mc Graw-Hill, USA.

 

2.      "Microsoft Access Data Analysis: Unleashing the Analytical Power of Access" by Michael Alexander, Wiley Publishing, Inc.

 

3.      Converting Code from One Language to Another- C# & VB.NET “Conversion Pocket Reference " by Jose Mojica, O'Reilly Publications.

 

4.      Sites Referred

 

www.sourceforge.net

www.codeguru.com

www.codeproject.com

www.planetsourcecode.com

 

Comments

Popular posts from this blog

Chemical test for Tragacanth

Chemical test for Benzoin

Chemical test for Agar/Agar-Agar / Japaneese Isinglass