Vous êtes sur la page 1sur 84

Data Migration for Standard Browseable Representation

1. INTRODUCTION
In present day scenario most organization handles text or critical data in databases, excel or text files. They use associated softwares to maintain the data. These data are however not web distributable or previewed across a browser. The application proposes a standard format to represent data that can be previewed across any browser. The format of the text that are used as inputs are databases such as Sql-Server, Oracle and access. Additionally inputs from Excel are used to migrate data and make it available on the web. Hence at the receivers end the system need not have associated softwares. Also text that is delimited can be converted to xml at runtime. The system enhances the facility as the source of data for databases can also be remote systems. The system provides graphical windows interface to accept inputs from the user on the data source. These inputs are validated before establishing connection to the data source. Without knowing the origin or the contents of the data within the application converts the data to an internet standard representation browseable format. The created xml files are transferred to the IIS server for making it available readily to the internet users. The application can also use XML as input and read the contents of it from both the value and attribute perspective. The data can then be available for other applications using XML as input.

Data Migration for Standard Browseable Representation

2. HARDWARE & SOFTWARE REQUIREMENTS

Software Requirement
Operating System Language Web Server RDBMS/Back End : Win 2000 or higher : .Net, Vb.Net, Asp.net : IIS Server : Ms-Access, Sql-Server, Oracle, Ms-excel, txt

Hardware Requirement
Processor RAM Hard disk : P4 or higher :512 Mb :10Gb

Data Migration for Standard Browseable Representation

3. LITERATURE SURVEY

3.1 .NET FRAMEWORK


The .NET Framework is an integral Windows component that supports building and running the next generation of applications and XML Web services. The .NET Framework is designed to fulfill the following objectives:

To provide a consistent object-oriented programming environment whether object

code is stored and executed locally, executed locally but Internet-distributed, or executed remotely.

To provide a code-execution environment that minimizes software deployment and To provide a code-execution environment that promotes safe execution of code, To provide a code-execution environment that eliminates the performance problems To make the developer experience consistent across widely varying types of To build all communication on industry standards to ensure that code based on

versioning conflicts.

including code created by an unknown or semi-trusted third party.

of scripted or interpreted environments.

applications, such as Windows-based applications and Web-based applications.

the .NET Framework can integrate with any other code.

Internet Explorer is an example of an unmanaged application that hosts the runtime (in the form of a MIME type extension). Using Internet Explorer to host the runtime enables you to embed managed components or Windows Forms controls in HTML documents. Hosting the runtime in this way makes managed mobile code (similar to Microsoft ActiveX controls) possible, but with significant improvements that only managed code can offer, such as semi-trusted execution and isolated file storage.

Data Migration for Standard Browseable Representation

The following illustration shows the relationship of the common language runtime and the class library to your applications and to the overall system. The illustration also shows how managed code operates within a larger architecture.

3.2 .NET Framework in context

The following sections describe the main components and features of the .NET Framework in greater detail.

3.3 Features of the Common Language Runtime

Data Migration for Standard Browseable Representation

The common language runtime manages memory, thread execution, code execution, code safety verification, compilation, and other system services. These features are intrinsic to the managed code that runs on the common language runtime.

With regards to security, managed components are awarded varying degrees of trust, depending on a number of factors that include their origin (such as the Internet, enterprise network, or local computer). This means that a managed component might or might not be able to perform file-access operations, registry-access operations, or other sensitive functions, even if it is being used in the same active application. The runtime enforces code access security. For example, users can trust that an executable embedded in a Web page can play an animation on screen or sing a song, but cannot access their personal data, file system, or network. The security features of the runtime thus enable legitimate Internet-deployed software to be exceptionally feature rich. The runtime also enforces code robustness by implementing a strict type-and-codeverification infrastructure called the common type system (CTS). The CTS ensures that all managed code is self-describing. The various Microsoft and third-party language compilers generate managed code that conforms to the CTS. This means that managed code can consume other managed types and instances, while strictly enforcing type fidelity and type safety. Workflow-enabled applications using Windows Workflow Foundation (WF). See Introduction to Programming Windows Workflow Foundation.

3.4 ADO.NET
ADO.NET is a set of classes that expose data access services to the .NET programmer. ADO.NET provides a rich set of components for creating distributed, datasharing applications. It is an integral part of the .NET Framework, providing access to relational, XML, and application data. ADO.NET supports a variety of development needs, 5

Data Migration for Standard Browseable Representation

including the creation of front-end database clients and middle-tier business objects used by applications, tools, languages, or Internet browsers.

ADO.NET provides consistent access to data sources such as SQL Server and XML and to data sources exposed through OLE DB and ODBC. Data-sharing consumer applications can use ADO.NET to connect to these data sources and retrieve, handle, and update the data that they contain. The ADO.NET classes are found in System.Data.dll, and are integrated with the XML classes found in System.Xml.dll.

3.4.1 Net Framework Data Providers

A .NET Framework data provider is used for connecting to a database, executing commands, and retrieving results. Those results are either processed directly, placed in a Dataset in order to be exposed to the user as needed, combined with data from multiple sources, or remote between tiers. .NET Framework data providers are lightweight, creating a minimal layer between the data source and code, increasing performance without sacrificing functionality. The following table lists the data providers that are included in the .NET Framework. .NET Framework data provider .NET Framework Data Provider for SQL Server .NET Framework Data Provider for OLE DB For data sources exposed by using OLE DB. Uses the System.Data.OleDb namespace. Provides data access for Microsoft SQL Server version 7.0 or later versions. Uses the System.Data.SqlClient namespace. Description

Data Migration for Standard Browseable Representation

.NET Framework Data Provider for ODBC .NET Framework Data Provider for Oracle

For data sources exposed by using ODBC. Uses the System.Data.Odbc namespace.

For Oracle data sources. The .NET Framework Data Provider for Oracle supports Oracle client software version 8.1.7 and later, and uses the System.Data.OracleClient namespace.

3.4.2 ADO.NET architecture

3.4.3 XML and ADO.NET

Data Migration for Standard Browseable Representation

ADO.NET leverages the power of XML to provide disconnected access to data. ADO.NET was designed hand-in-hand with the XML classes in the .NET Framework; both are components of a single architecture.

ADO.NET and the XML classes in the .NET Framework converge in the DataSet object. The DataSet can be populated with data from an XML source, whether it is a file or an XML stream. The DataSet can be written as World-Wide Web Consortium (W3C) compliant XML that includes its schema as XML schema definition language (XSD) schema, regardless of the source of the data in the DataSet. Because of the native serialization format of the DataSet is XML, it is an excellent medium for moving data between tiers, making the DataSet an optimal choice for remote data and schema context to and from an XML Web service.

Data Migration for Standard Browseable Representation

4. SOFTWARE REQUIREMENT ANALYSIS


4.1. Present System & Disadvantages

Data stored in a container is viewed only thru that container. The data is not in a browseable format. Associated softwares are needed at the receiving end if these data are transmitted or attached or uploaded on the network. Tabulated listing or representing text data in row, column format not available.

1 ) .

4.2. MODULES
4.2.1. Login & Security
The module allows only authorized users to use the application. The application comes with a default administrator account. This account has a user id Admin and password Admin by default. This user can change his password as and when necessary. The system also identifies staff of the company who makes request for xml files.

Data Migration for Standard Browseable Representation

4.2.2. XML Requester


The module allows employee to use the online web forms to post request for XML file. The user needs to provide information on the data source and path as required. This information is saved to the database and is available to the administrator. The administrator then uses corresponding modules to convert the data to XML.

4.2.3. Text to XML


The module provides information on the text file whose data needs conversion to XML. The text file should have its contents delimited by a character such as ,. The modules uses streams to convert the text file into a tabulated form and then to corresponding XML. The XML file is then send to the server. The module generates the tags as necessary. The text file may or may not be fixed length in Size.

4.2.4. Xls2Xml converter


The module allows the user to provide information on the Excel book. Additional information on the book and the sheet is provided. A connection string is established with the excel sheet and its data retrieved. The ODBC drivers are used to establish connection with the sheet specified. The retrieved data is then sent to xml via the dataset. The created xml file is then available on the server in a browseable format.

4.2.5. Access2XML converter


The module allows administrator to use OLEDB provider and the Microsoft Jet database engine to connect to the access database as specified by the staff. The table name and query is accepted to generate the dataset. The xml file is then

10

Data Migration for Standard Browseable Representation

generated from the dataset. The query can contain nested sub-queries. The query can contain columns from one or more tables as well.

4.2.6. OracletoXML converter The module uses the system name, database name, user id and password to communicate with the oracle database. The system allows both local and remote database connectivity. The table name and query is used to retrieve the data from the backend to generate the dataset. The xml file is then generated from the dataset. The ODBC or Oracle Client Connection is used to establish database connectivity.

4.2.7. SQLservertoXML converter


The module allows generation of the connection string based on the user authentication mode. It uses the sqlclient provider to interact with the local or remote database. The system name, database name, user id and password should be provided to communicate with the sqlserver database. Based on the table name and query the dataset is generated. The xml file is then created from the dataset object.

11

Data Migration for Standard Browseable Representation

5. SYSTEM DESIGN

5.1 INTRODUCTION
Software design sits at the technical kernel of the software engineering process and is applied regardless of the development paradigm and area of application. Design is the first step in the development phase for any engineered product or system. The designers goal is to produce a model or representation of an entity that will later be built. Beginning, once system requirement have been specified and analyzed, system design is the first of the three technical activities -design, code and test that is required to build and verify software. The importance can be stated with a single word Quality. Design is the place where quality is fostered in software development. Design provides us with representations of software that can assess for quality. Design is the only way that we can accurately translate a customers view into a finished software product or system. Software design serves as a foundation for all the software engineering steps that follow. Without a strong design we risk building an unstable system one that will be difficult to test, one whose quality cannot be assessed until the last stage.

5.2. UNIFIED MODELING LANGUAGE


5.2.1. Introduction
The unified modeling language allows the software engineer to express an analysis model using the modeling notation that is governed by a set of syntactic semantic and pragmatic rules.

12

Data Migration for Standard Browseable Representation

A UML system is represented using five different views that describe the system from distinctly different perspective. Each view is defined by a set of diagram, which is as follows.

5.2.2. User Model View


This view represents the system from the users perspective. The analysis representation describes a usage scenario from the end-

users perspective.

5.2.3. Structural model view


In this model the data and functionality are arrived from inside the system. This model view models the static structures.

5.2.4. Behavioral Model View


It represents the dynamic of behavioral as parts of the system, depicting the interactions of collection between various structural elements described in the user model and structural model view.

5.2.5. Implementation Model View

In this the structural and behavioral as parts of the system are

represented as they are to be built.

13

Data Migration for Standard Browseable Representation

5.2.6. Environmental Model View

In this the structural and behavioral aspects of the environment in which the system is to be implemented are represented.

UML is specifically constructed through two different domains they are

UML Analysis modeling, which focuses on the user model and structural model views of the system

UML design modeling, which focuses on the behavioral modeling, implementation modeling and environmental model views.

5.3. INTRODUCTION TO THE UNIFIED MODIFIED LANGUAGE


Building a model for a software system prior to its construction is as building a large building. Good models are

essential as having a blueprint for

essential for communication among project teams. As the complexity of the systems increases, so does the importance of good modeling techniques. A modeling language must include: Model elements- fundamentally modeling concepts and semantics. Notation-visual rendering of model elements Guidelines-expression of usage within trade The use of visual notation to represent or model a problem can provide us several benefits relating to clarity, familiarity, maintenance, and simplification. The main reason for modeling is the reduction of complexity. The Unified Modeling Language (UML) is a

14

Data Migration for Standard Browseable Representation

set of notations and conventions used to describe and model an application. The UML is intended to be a universal language for modeling systems, meaning that it can express models of many different kinds and purposes, just as a programming language or a natural language can be used in different ways. A model is an abstract representation of a system , constructed to understand the system prior to building or modifying it. The term system is used here in a broad sense to include any process or structure. For example, the organizational structure of a corporation , health services, computer software, instruction of any sort (including computers) , the national economy, and so forth all would be termed systems. The unified modeling language is a language for specifying, constructing, visualizing, and documenting the software system and its components. The UML is a graphical language with sets of rules and semantics. The rules and semantics of a model are expressed in English, in a form known as object constraint language(OCL).OCL is a specification language that uses simple logic for specifying the properties of a system. The UML is not intended to be a visual programming language in the sense of having all the necessary visual and semantic support to replace programming languages. However, the UML does have a tight mapping to a family of object-oriented languages, so that you can get the best of both worlds. The primary goals in the design of the UML were as follows: 1. Provide users ready-to-use, expensive visual modeling languages so they can develop and exchange meaningful models. 2. Provide extendibility and specialization mechanisms to extend the core concepts. 3. Be independent of particular programming languages and development process. 4. Provide a formal basis for understanding the modeling language. 5. Encourage the growth of the OO tools market. 6. Support higher level development concepts. 7. Integrate best practices and methodologies.

15

Data Migration for Standard Browseable Representation

UML is a language used to: Visualize the software system well-defined symbols. Thus a developer or tool can unambiguously interpret a model written by another developer, using UML stages. Specify the software system and help building precise, unambiguous and Construct the models of the software system that can directly Document models of the software system during its development complete models. communicate with a variety of programming languages.

5.3.1. UML DIAGRAMS


Every complex system is best approached through a small set of nearly independent views of a model; no single viewer is sufficient. Every model may be expressed at different levels of fidelity. The best models are connected to reality. The UML defines nine graphical diagrams. 1. Class diagram 2. Object diagram 3. Use-case diagram 4. Behavior diagrams 5. Interaction diagrams 6. Sequence diagram 7. Collaboration diagram

16

Data Migration for Standard Browseable Representation

5.3.1.1. Class diagram .

Datamigration 1 + uid + pwd + utype + signin ( ) + about ( ) 1..* 1 Adminopn + aid + apwd + request + xmlfile + convert ( ) Staffopn + sid + spwd + request + xmlfile + reqconv ( ) + viewxml ( )

1..* Xm lConverter + text + datasrc + uid + pwd + sysname + dbname + xmlfile + Attribute1 + text2xml ( ) + xls2xml ( ) + mdb2xml ( ) + ora2xml ( ) + sql2xml ( )

Fig.5.1 Class diagram for data migration

17

Data Migration for Standard Browseable Representation

5.3.1.2. Use-case diagram

Login

Staff Reg

Admin

XML Request

Staff

XML Conv TexttoXML use use use SQLservtoXML

use use XlstoXML MdbtoXML OracletoXML

XML Reuse Values Attributes

Tags

Fig.5.2 Use case diagram for data migration

18

Data Migration for Standard Browseable Representation

5.3.1.3. Component Diagram

Fig.5.3 Component Diagram for Data Migration

19

Data Migration for Standard Browseable Representation

5.3.1.4. Statechart Diagram

login

Admin

Staff

Registration

Requestxml

Reusexml

Viewxml Converter

Text2xml

Sqlserver2xml Xls2xml mdb2xml Oracle2xml

Fig.5.4 Statechart Diagram for Data Migration

20

Data Migration for Standard Browseable Representation

5.3.1.5.1. Sequence diagram For Login

user

data m igration

1 : request login()

2 : prom uid,pwd() pt

3 : uid,pwd() 4 : check with user db()

5 : success/failed()

Fig.5.5 Sequence Diagram for Data Migration

21

Data Migration for Standard Browseable Representation

5.3.1.5.2. Sequence Diagram for Converter

user

converter

1 : request conversion() 2 : prom data source() pt

3 : data source()

4 : prom xm file() pt l 5 : xm file() l 6 : save and update()

7 : pending status()

Fig.5.6 Sequence diagram for xml converter

22

Data Migration for Standard Browseable Representation

5.3.1.5.3. Sequence Diagram For Converting Text to Xml

adm in

converter

text to xm l

1 : request pending conversion() 2 : populate conversion request()

3 : show request()

4 : choose request() 5 : fetch text file() 6 : text file()

7 : check delim iter()

8 : convert xm file() l

9 : xm file() l 10 : status,xm file() l

Fig.5.7 Sequence diagram for converting text to XML

23

Data Migration for Standard Browseable Representation

5.3.1.5.4. Sequence Diagram for Converting Xls to Xml

ad in m

c ve on rsion

xls to xm l

1 : req est xls to xm u l() 2 : p m t xls file ro p () 3 : xls file()

4 : p p sh rom t eet,d ata()

5 : sh t,d ee ata()

6: g n e erate c n e tion strin () onc g

7 : c n t to xls() on ec

8: g e en rate xm l() 9 : xmfile() l 1 : xmfile() 0 l

Fig.5.8 Sequence diagram for converting xls to xml

24

Data Migration for Standard Browseable Representation

5.3.1.5.5. Sequence Diagram for Converting MsAccess to Xml

am di n

c n eso ov ri n

mbt x l d o m

1: r q e t a c s t x l ) e u s ces o m ( 2: po p a c s ( r mt c e s) 3: d n m a dd p t ( b a e n b ah)

4: c e ke i t ( h c xss )

5: po p t b ,q ey) r mt a l u r ( e 6: t b ,q ey) al ur ( e

7: r t i v d t a dg n r t d t s t ) ere e aa n e eae aa e(

8: ce t x l ) r ae m ( 9: x lfie) ml( 1 : x lfie) 0 ml(

Fig.5.9 Sequence diagram to convert from MS access to XML

25

Data Migration for Standard Browseable Representation

5.3.1.5.6. Sequence Diagram for Converting Oracle to Xml

am di n

cne o ovr r t

o c t xl r l om ae

1 r qe o c t x l) : eus r l o m t ae (

2 p mdt su e : r p a or ( o t a c)

3 sse nm : yt m e a ( )

4 p mD u ri f ( : r p Bs n ) o t , e o 5 D u ri f ( : Bs n ) , e o

6 gnr t cne i n ti g : ee e onco sr ( a t n)

7 ce cne i n : hc onco( k t ) 8 p mt b , ur ( : r p al qe ) o t e y

9 t b , ur ( : al qe ) e y

1 :r ti v ad ee t dt st) 0 e ee n gnr e a e r a a (

1 :gnr t x l) 1 ee e m a (

1 :x l) 2 m ( 1 :x l) 3 m (

Fig.5.10 Sequence diagram to convert from oracle to XML

26

Data Migration for Standard Browseable Representation

5.3.1.5.7. Sequence Converting for SQL to Xml

am di n 1 r qets lt x l ) : eus q o m (

c net r ov r e

s lt x l qom

2 p m dt s uc ( : r p aa or e) o t 3 s se nm) : yt ma e (

4 p m D,ue i f ( : r p B srn ) o t o

5 D,ue i f ( : B srn ) o

6 gnr t c neto srn( : eeae onci n ti g )

7 c ek onci n) : hc c neto(

8 p m t b ,qey) : r p al ur ( o t e

9 t b ,qey) : al ur ( e

1 : r ti v ad eeae aa e( 0 eree n gnr t dt s t )

1 : gnr t x l ) 1 eeae m (

1 :x l) 2 m (

1 :x l ) 3 m (

Fig.5.11 Sequence diagram to convert from SQL to XML

27

Data Migration for Standard Browseable Representation

5.3.1.6. Activity Diagram

Fig.5.12 Activity diagram for data migration

28

Data Migration for Standard Browseable Representation

5.4 DATA DICTIONARY

TABLE: REQUESTS s.no 1 2 3 4 5 6 7 8 9 10 Data field Src Dbname Tbname Sysname Uid Pwd Tid Status Xmlfile Sid Data type Text Text Text Text Text Text Number Text Text Number constraint Not null Null Not Null Null Null Null Primary key Not null Null Not null

TABLE: STAFF s.no 1 2 3 4 TABLE: USERS s.no 1 2 Data field Uid Pwd Data type Text Text Constraints Primary key Not null Data field Sid Sname Spwd Addr Data type Number Text Text Text Constraint Primary key Not null Not null Not null

29

Data Migration for Standard Browseable Representation

6. CODING
6.1 Code for SQL server to XML conversion
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try con.Open() Dim cmd As New SqlCommand("select * from " & gtbname, con) Dim da As New SqlDataAdapter(cmd) Dim ds As New DataSet() da.Fill(ds) DataGridView1.DataSource = ds.Tables(0) ds.WriteXml("d:\migweb\xmlfiles\" & TextBox6.Text) MsgBox("XML File Generated Successfully") Dim con1 As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=common.mdb") con1.Open() Dim cmd3 As New OleDbCommand("update requests set status='Complete',xmlfile='" & TextBox6.Text & "' where tid=" & gtid, con1) cmd3.ExecuteNonQuery() con1.Close() Catch ex As Exception Dim con1 As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=common.mdb") con1.Open() MsgBox("Check Parameters! XML Generation Failed.") Dim cmd3 As New OleDbCommand("update requests set status='Check Database Parameters' where tid=" & gtid, con1) cmd3.ExecuteNonQuery() con1.Close() End Try con.Close() End Sub

30

Data Migration for Standard Browseable Representation

6.2 Code for oracle to XML conversion


Dim con As New OdbcConnection("dsn=oradsn;uid=" & guid & ";pwd=" & gpwd & ";") Private Sub oracle2xml_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load TextBox1.Text = gsysname TextBox2.Text = guid TextBox3.Text = gpwd TextBox4.Text = gdbname TextBox5.Text = gtbname Try con.Open() Dim cmd As New OdbcCommand("select * from " & gtbname, con) Dim da As New OdbcDataAdapter(cmd) Dim ds As New DataSet() da.Fill(ds) DataGridView1.DataSource = ds.Tables(0) Button1.Enabled = True TextBox6.ReadOnly = False Catch ex As Exception Dim con1 As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=common.mdb") con1.Open() MsgBox("Check Parameters! XML Generation Failed.") Dim cmd3 As New OleDbCommand("update requests set status='Check Database Parameters' where tid=" & gtid, con1) cmd3.ExecuteNonQuery() con1.Close() TextBox6.ReadOnly = True End Try con.Close() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.Close() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try con.Open() 31

Data Migration for Standard Browseable Representation

Dim cmd As New OdbcCommand("select * from " & gtbname, con) Dim da As New OdbcDataAdapter(cmd) Dim ds As New DataSet() da.Fill(ds) DataGridView1.DataSource = ds.Tables(0) ds.WriteXml("d:\migweb\xmlfiles\" & TextBox6.Text) MsgBox("XML File Generated Successfully") Dim con1 As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=common.mdb") con1.Open() Dim cmd3 As New OleDbCommand("update requests set status='Complete',xmlfile='" & TextBox6.Text & "' where tid=" & gtid, con1) cmd3.ExecuteNonQuery() con1.Close() Catch ex As Exception Dim con1 As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=common.mdb") con1.Open() MsgBox("Check Parameters! XML Generation Failed.") Dim cmd3 As New OleDbCommand("update requests set status='Check Database Parameters' where tid=" & gtid, con1) cmd3.ExecuteNonQuery() con1.Close() End Try con.Close() End Sub

32

Data Migration for Standard Browseable Representation

6.3 Code for converting MS-Access to XML


Private Sub access2xml_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load MsgBox("aa") TextBox1.Text = gdbname TextBox2.Text = gtbname TextBox4.Text = gtid Dim con As OleDbConnection Try con = New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=" & gdbname) con.Open() Dim cmd As OleDbCommand If File.Exists(TextBox1.Text) Then cmd = New OleDbCommand("select * from " & TextBox2.Text, con) Dim dr As OleDbDataReader = cmd.ExecuteReader(CommandBehavior.SequentialAccess) If dr.Read() Then dr.Close() Dim da As New OleDbDataAdapter(cmd) Dim ds As New DataSet() da.Fill(ds) DataGridView1.DataSource = ds.Tables(0) TextBox3.ReadOnly = False Button1.Enabled = True Else MsgBox("No Records Found.") End If Else Dim con1 As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=common.mdb") con1.Open() MsgBox("XML Generation Failed.") Dim cmd3 As New OleDbCommand("update requests set status='Check Database Parameters' where tid=" & gtid, con1) cmd3.ExecuteNonQuery() con1.Close() End If con.Close() Catch ex As Exception

33

Data Migration for Standard Browseable Representation

Dim con1 As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=common.mdb") con1.Open() MsgBox("Check Parameters! XML Generation Failed.") Dim cmd3 As New OleDbCommand("update requests set status='Check Database Parameters' where tid=" & gtid, con1) cmd3.ExecuteNonQuery() con1.Close() End Try End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Path.GetExtension(TextBox3.Text).ToLower().Equals(".xml") Then Dim con As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=" & gdbname) con.Open() Dim cmd As New OleDbCommand("select * from " & TextBox2.Text, con) Dim da As New OleDbDataAdapter(cmd) Dim ds As New DataSet() da.Fill(ds) ds.WriteXml("d:\migweb\xmlfiles\" & TextBox3.Text) Dim con2 As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=common.mdb") con2.Open() Dim cmd2 As New OleDbCommand("update requests set xmlfile='" & TextBox3.Text & "',status='Complete' where tid=" & gtid, con2) Dim stat As Integer = cmd2.ExecuteNonQuery() If stat > 0 Then MsgBox("XML Generation successfull.") Else MsgBox("XML Generation Failed.") Dim cmd3 As New OleDbCommand("update requests set status='Check Database Parameters' where tid=" & gtid, con2) cmd3.ExecuteNonQuery() End If Else MsgBox("Provide filename with extension .XML") End If End Sub

34

Data Migration for Standard Browseable Representation

7. TESTING
7.1 PURPOSE
The purpose of testing is to assess product quality. It helps to strengthen and stabilize the architecture early in the development cycle. We can verify through testing, the various interactions, integration of components and the requirements which were implemented. It provides timely feedback to resolve the quality issues, in a timely and cost effective manner. The test workflow involves the following: Verifying the interactions of components. Verifying the proper integration of components. Verifying that all requirements have been implemented correctly. Identifying and ensuring that all discovered defects are addressed before the software is deployed.

7.2 QUALITY
The common usage of the term quality refers to a number of things: principally it means the absence of defects, but more importantly, a fitness for a desired purpose. The ultimate goal of testing is to assess the quality of the end product. Quality assessments often consider process quality and organizational factors as well as direct product quality.

7.3 PRODUCT QUALITY


The role of testing is not to assure quality, but to assess it, and to provide timely feedback so that quality issues can be resolved in a timely and cost-effective manner.

35

Data Migration for Standard Browseable Representation

7.4 TESTING IN THE ITERATIVE LIFECYCLE


Testing is not a single activity, nor is it a phase in the project during which we assess quality. If developers are to obtain timely feedback on evolving product quality, testing must occur throughout the lifecycle: we can test the broad functionality of early prototypes: we can test the stability, coverage and performance of the architecture while there is still an opportunity to fix it; and we can test the final product to assess its readiness for delivery to customers.

7.5 DIMENSIONS OF TESTING:


To assess product quality, different kinds of tests, each one with a different focus, are needed. These tests can be categorized by several dimensions: 6.5.1 6.5.2 6.5.3 Quality dimension: The major quality characteristic or attribute that is the focus of test. Stage of testing: The point in the lifecycle at which the test, usually limited to a single quality dimension. Type of testing: The specific test objective for an individual test, usually limited to a single quality dimension. 7.5.1 STAGES OF TESTING: Testing is not a single activity, executed all at once. Testing is executed against different types of targets in different stages of the software development. Test stages progress from testing small elements of the system, such as components (unit testing), to testing completed systems (system testing). The four stages have the following purposes:

36

Data Migration for Standard Browseable Representation

7.5.1.1 Unit test: The smallest testable elements of the system are tested individually; typically at the same time those elements are implemented. 7.5.1.2 Integration test: The integrated units (or components or subsystems) are tested. 7.5.1.3 System test: the complete application and system (one or more applications) are tested. 7.5.1.4 Acceptance test: The complete application (or system) is tested by end users (or representatives) for the purpose of determining readiness for deployment. These stages occur throughout the lifecycle, with varying emphasis. An early conceptual prototype user in the inception phase to assess the viability of the product vision will be subjected to acceptance tests. Architectural prototype developed during the elaboration phase is subjected to integration and system tests to validate architectural integrity and performance of key architectural elements.

7.5.2 TYPES OF TESTING: After a test plan has been developed, system testing begins by testing program modules separately, followed by testing bundled modules as a unit. A program module may function perfectly in isolation but fail when interfaced with other modules. The approach is to test each entity with successively larger ones, up to the system test level. System testing consists of the following steps: 7.5.2.1 Program(s) testing. 7.5.2.2 String testing. 7.5.2.3 System testing. 7.5.2.4 User acceptance testing.

37

Data Migration for Standard Browseable Representation

7.5.2.1 Program testing: A program represents the logical elements of system. programs. For a program to run satisfactorily, it must compile and test data correctly and tie in properly with other Achieving an error-free program is the responsibility of the programmer. Program testing checks for two types of errors: syntax and logic. A syntax error is a program statement that violates one or more rules of the language in which it is written. An improperly defined field dimension or omitted key words are common syntax errors. These errors are shown through error messages generated by syntax errors. These errors are shown through error messages generated by the computer. A logic error, on the other hand, deals with incorrect data fields, out-of range items, and invalid combinations. Since diagnostics do not detect logic errors, the programmer must examine the output carefully for them. When a program is tested, the actual output is compared with the expected output. When there is a discrepancy, the sequence of instructions must be traced to determine the problem. The process is facilitated by breaking the program down into self-contained portions, each of which can be checked at certain key points. The idea is to compare program values against desk-calculated values to isolate the problem. 7.5.2.2 String Testing Programs are invariably related to one another and interact in a total system. Each program is tested to see whether it conforms to related programs in the system. Each portion of the system is tested against the entire module with both test and live data before the entire system is ready to be tested. 7.5.2.3 System Testing System testing is designed to uncover weaknesses that were not found in earlier tests. This includes forced system failure and validation of the total system as it will be 38

Data Migration for Standard Browseable Representation

implemented by its user(s) in the operational environment. Generally, it begins with low volumes of transactions based on live data. The volume is increased until the maximum level for each transaction type is reached. The total system is also tested for recovery and fallback after various major failures to ensure that no data are lost during the emergency. All this is done with the old system still in operation. After the candidate system passes the test, the old system is discontinued.

7.5.2.4 User Acceptance Testing: An acceptance test has the objective of selling the user on the validity and reliability of the system. It verifies that the systems procedures operate to system Performance of an specifications and that the integrity of vital data is maintained.

acceptance test is actually the users show. User motivation and knowledge are critical for the successful performance of the system. Then a comprehensive test report is prepared. The report indicates the systems tolerance, performance range, error rate, and accuracy. 7.6 System Documentation All design and test documentation should be finalized and entered in the library for future reference. The library is the central location for maintenance of the new system. The format, organization, and language of each documentation should be in line with system standards.

39

Data Migration for Standard Browseable Representation

7.7. TEST CASES Module: Login Filename: form1.vb Test Valid Login Input User Id, Password Recvd Output Login Success Act Output Login Success Desc Test Passed! Control Transferred to Menu

Invalid Login

User Id, Password

Login Failed

Login Failed

Test Passed! Try Again

Invalid Login

Null, Null

Login Failed

Login Failed

Test Passed! Min 5 chars Try Again

Fig.7.1

40

Data Migration for Standard Browseable Representation

Module: Access to xml Filename: access2xml.vb Test Case Access to XML Input Dbname, path and Tablename Actual Output Success Obtained Output Success Desc Test Passed. XML generated & redirected to web server. Access to XML Dbname, path and Tablename Fig.7.2 Module: Oracle to xml Filename: oracle2xml.vb Test Case Input Actual Output Success Obtained Output Success Desc Test Passed. XML generated & redirected to web server. Failed Failed Status updated. Test Passed. Invalid or incomplete data. Status updated. Try again. Fig.7.3 Failed Failed Status updated. Test Passed. Invalid or incomplete data. Status updated. Try again.

Oracle to XML Servername, DSN, user id, password and Tablename Oracle to XML Servername, DSN, user id, password and Tablename

Module: Sqlserver to xml Filename: sqlserver2xml.vb 41

Data Migration for Standard Browseable Representation

Test Case Sql Server to XML

Input Servername, DBname, user id, password

Actual Output Success

Obtained Output Success

Desc Test Passed. XML generated & redirected to web server. Status updated. Test Passed. Invalid or incomplete data. Status updated. Try again.

Sql Server to XML

and Tablename Servername, Failed DBname, user id, password and Tablename Fig.7.4

Failed

Module: Xls to xml Filename: xls2xml.vb Test Case XLS to XML Input XLS filename and sheet number XLS to XML XLS filename and sheet number Fig.7.5 Failed Failed Actual Output Success Obtained Output Success Desc Test Passed. XML generated & redirected to web server. Status updated. Test Passed. File not found or invalid data. Status updated. Try again.

Module: Text to xml Filename: text2xml.vb Test Case Input Actual 42 Obtained Desc

Data Migration for Standard Browseable Representation

Text to XML

Text filename

Output Success

Output Success

Test Passed. XML generated & redirected to web server. Status updated. Test Passed. File not found or invalid data. Status updated. Try again.

Text to XML

Text filename

Failed

Failed

Fig.7.6

43

Data Migration for Standard Browseable Representation

8. SCREEN SHOTS
8.1 Admin Login

Fig.8.1 Welcome screen

Fig.8.2 Admin login page

44

Data Migration for Standard Browseable Representation

Fig.8.3 Admin menu page

45

Data Migration for Standard Browseable Representation

Fig.8.4 Staff detail page

46

Data Migration for Standard Browseable Representation

Fig.8.5 Staff maintenance page

47

Data Migration for Standard Browseable Representation

Fig.8.6 Staff maintenance page

48

Data Migration for Standard Browseable Representation

Fig.8.7 deletion of staff detail

49

Data Migration for Standard Browseable Representation

8.2 Staff Login

Fig.8.8 Staff login page

50

Data Migration for Standard Browseable Representation

Fig.8.9 Welcome page

51

Data Migration for Standard Browseable Representation

Fig.8.10 Change password page

52

Data Migration for Standard Browseable Representation

8.3.Text File

Fig.8.11 conversion requestor

53

Data Migration for Standard Browseable Representation

Fig.8.12 entering data in the requestor

54

Data Migration for Standard Browseable Representation

8.4.Excel File

Fig.8.13 converting from excel to XML

55

Data Migration for Standard Browseable Representation

Fig.8.14 successful submission of the request

56

Data Migration for Standard Browseable Representation

8.5.Access File

Fig.8.15 Converting from access to XML

57

Data Migration for Standard Browseable Representation

8.6.SQL Database

Fig.8.16 Converting from SQL to XML

58

Data Migration for Standard Browseable Representation

Fig.8.17 successful submission of the request

59

Data Migration for Standard Browseable Representation

8.7.Oracle Database

Fig.8.18 Conversion from oracle to XML

60

Data Migration for Standard Browseable Representation

8.8.Processing Requests

Fig.8.19 view converted xml files

61

Data Migration for Standard Browseable Representation

8.9.View requests Admin

Fig.8.20 view requests as admin

62

Data Migration for Standard Browseable Representation

8.10.Text2Xml Created

Fig.8.21 text to xml converted

63

Data Migration for Standard Browseable Representation

Fig.8.22 XML request handler

64

Data Migration for Standard Browseable Representation

Fig.8.23 view converted XML files

65

Data Migration for Standard Browseable Representation

Fig.8.24 View as an xml

66

Data Migration for Standard Browseable Representation

Fig.8.25 excel to XML conversion failed

67

Data Migration for Standard Browseable Representation

Fig.8.26 Request handler

68

Data Migration for Standard Browseable Representation

Fig.8.27 view converted XML files

69

Data Migration for Standard Browseable Representation

8.11.Excel2Xml File Created

Fig.8.28 Excel to XML file created

70

Data Migration for Standard Browseable Representation

8.12.Access2Xml File Created

Fig.8.29 Access to XML file created

71

Data Migration for Standard Browseable Representation

Fig.8.30 view converted xml files

72

Data Migration for Standard Browseable Representation

8.13.SQL2Xml File Created

Fig.8.31 successful conversion of an SQL file to XML

73

Data Migration for Standard Browseable Representation

Fig.8.32 view the converted file

74

Data Migration for Standard Browseable Representation

8.14.Oracle2Xml Created

Fig.8.33 successful conversion of oracle to XML

75

Data Migration for Standard Browseable Representation

Fig.8.34 XML request handler

76

Data Migration for Standard Browseable Representation

8.15.Xml Files Created

Fig.8.35 view all files created

77

Data Migration for Standard Browseable Representation

Fig.8.36 view the XML form of data

78

Data Migration for Standard Browseable Representation

8.16.Reset Password

Fig.8.37 Password reset screen

79

Data Migration for Standard Browseable Representation

Fig.8.38 User manual

80

Data Migration for Standard Browseable Representation

9. CONCLUSION

The application proposes a standard format in XML to represent data that can be previewed across any browser. The format of the text that are used as inputs are databases such as Sql-Server, Oracle and access. Inputs from Excel are used to migrate data and make it available on the web. Hence at the receivers end the system need not have associated softwares. Also text that is delimited can be converted to XML at runtime. The system enhances the facility as the source of data for databases can also be remote systems in case of Sqlserver and Oracle. The system provides graphical windows interface to accept inputs from the user on the data source. These inputs are validated before establishing connection to the data source. Without knowing the origin or the contents of the data within, the application converts the data to an internet standard representation browsable format. The created XML files are transferred to the IIS server for making it available readily to the internet users. These files are stored in virtual directory and has a URL assigned

81

Data Migration for Standard Browseable Representation

10. FUTURE ENHANCEMENTS /RECOMMENDATIONS

Conversion of data from the XML format to any other format is possible. We make the XML data downloadable. Minimizing the involvement of the administrator in data conversion is possible. Visibility of what kind of data is present in the remote databases is also possible in the future enhancements.

82

Data Migration for Standard Browseable Representation

11. BIBLIOGRAPHY
David Chappell, Understanding .NET, (2nd Edition) Jesse Liberty and Alex Horovitz, Programming .NET 3.5 Fergal Grimes, Microsoft .NET for Programmers Imar spaanjaars, Beginning ASP.NET 3.5: In C# and VB (Programmer to Programmer) Matthew MacDonald, Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional (Beginning from Novice to Professional), (Second Edition) David S. Platt, Introducing Microsoft .NET (Pro-Developer) Stephen Walther, ASP.NET 3.5 Unleash Websites: www.w3schools.com msdn.microsoft.com visualbasic.about.com www.learnvisualstudio.net www.learnthenet.com

83

Data Migration for Standard Browseable Representation

84

Vous aimerez peut-être aussi