Download Study of Proposed System - Academic Science,International Journal

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Serializability wikipedia , lookup

Microsoft Access wikipedia , lookup

IMDb wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

SQL wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Ingres (database) wikipedia , lookup

PL/SQL wikipedia , lookup

Oracle Database wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Functional Database Model wikipedia , lookup

Concurrency control wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Versant Object Database wikipedia , lookup

Database wikipedia , lookup

Relational model wikipedia , lookup

Clusterpoint wikipedia , lookup

ContactPoint wikipedia , lookup

Database model wikipedia , lookup

Transcript
Universal Graphical User Interface for Relational Database
Management System with Data Migration feature
Kushal Gevaria
Rijuta Wagh
Prof. Dharmesh Mistry
Department of Computer Engg
Dwarkadas J. Sanghvi COE
Mumbai, India
Department of Computer Engg
Dwarkadas J. Sanghvi COE
Mumbai, India
Department of Computer Engg
Dwarkadas J. Sanghvi COE
Mumbai, India
[email protected]
[email protected]
[email protected]
ABSTRACT
Universal graphical user interface is what demanded, which would
help to manage all kind of database under a single GUI. Any database
manipulation can be performed using single interface. The user need
not require any SQL knowledge to type the queries. It also includes
Data Migration feature using fuzzy expert system, which transfers
data from one database to another database. It may be required to
switch to a different database vendor or to upgrade to the latest
version of the database software to be used. A schema migration is
therefore necessary whenever there is a major database update. This
article thus includes an overview of universal GUI for RDBMS along
with the ability to migrate data from one type of database to another.
KEYWORDS
GUI; Data Migration; Expert System; Relational Database;
Database; Data Type; Relational Database Management System.
INTRODUCTION
A general-purpose DBMS is designed to allow the definition, creation,
querying, update and administration of database. Well-known DBMSs
include MySQL, PostgreSQL, Microsoft SQL Server, Oracle, Sybase
and IBM DB2. There are different data models among which RDBMS
is a common choice for the storage of information in new databases
used for financial records, manufacturing and logistical information,
personnel data, and other applications since the 1980s. Relational
databases have often replaced hierarchical databases and network
databases because they are easier to understand and use [1]. So, a
relational database is a collective set of multiple data sets organized by
tables, records and columns as well as relationship between these
database tables. RDBs use Structured Query Language (SQL), which
is a standard user application that provides an easy programming
interface for database interaction. Now the first half of the topic,
which is about Universal GUI for RDBMS, aims to achieve a single
user-friendly interface with multiple RDBMS like MySQL, Oracle,
and PostgreSQL [2]. The steps, which are to be followed to make the
GUI work efficiently, are as follows:


Select the particular database to create a table for e.g.
MySQL, Oracle or PostgreSQL
Create, rename or drop database objects like tables or
queries according to the requirements



Create other database objects for another RDBMS
accordingly using the above two steps
View complete information about existing databases and
objects in a database if asked for
Provides a SQL query analyzer for executing queries in
SQL mode [3]
Data migration is the process of transferring data between storage
types, formats, or computer systems. Now the second half of the topic
tells about the data migration technique, which is used to transfer data
and their structure from one type of RDBMS to another RDBMS in a
system correctly [8].
There are many reasons for data migration between different types of
RDBMS. Some of them are:
1. Upgrading a database or migrating to new software
2. When the parallel systems in the two companies need to be
merged into one
3. Migration to or from hardware platform [7]
There are 3 main steps to accomplish data migration:

Merge the systems from the two companies into a
brand new one

Migrate one of the systems to the other one

Leave the systems as they are but create a
common view on top of them
This process uses source and target databases that are defined here:
Source database – database of source RDBMS, from which data is
migrated
Target database – database of target RDBMS, into which data is
migrated. The general process to transfer database from one type of
RDBMS to another is performed with the help of ETL (Extract,
Transform and Load). Currently, the ETL uses a cleaning step as a
separate step [7]. The sequence is then Extract-Clean-Transform-Load
and the steps are as followed –
1. Retrieve all the required data from the source RDBMS. This
includes several ways like update notification, incremental
extract and full extract
2. Clean the data to ensure its quality in the data warehouse for
example making identifiers unique, validate address fields,
convert null values into a standardized form
3. Apply a set of rules to transform the data from the source to
the target. This includes converting data to the same
dimension (target RDBMS) using the same units so that
they can be joined later
4.
To make the load process efficient, disable any constraints
and indexes before the load and enable them back only after
the load completes. The referential integrity should be
maintained by ECTL tool to ensure consistency [7].
Thus the main objective of the system is to enable a user to work with
different databases and tables in a RDBMS with no requirements of
SQL knowledge and also to include data migration feature with it.
STUDY OF PROPOSED SYSTEM
The steps involved in implementing the universal graphical user
interface are as followed:

Database Creation
In case of Oracle server, by clicking on the corresponding
icon, a new database can be created which can be used for
further processing

Database Login
After the creation the user can login to his/her database
thereby working with the objects in the database. If we
consider oracle, we are always automatically logged into the
default database of oracle and also we can log in to the same
as different users.

Database Rename
We can rename the database by selecting appropriate
options.

Database Drop
A function of dropping an already existing database is
provided when the GUI is connected to the oracle server

Database Profile
Two types of database profile are read profile and write
profile respectively. Read profiles are used to extract
records from the database while write profiles are used to
write profile into the database

Objects
Database objects like tables, queries and reports can be
accessed by a user, through a graphical user interface

Create Table
Once the database is selected, the user can create tables. The
user can enter the field name; select the data type from a
select list. Various options for making the fields as primary
key, unique or not null are provided. There is an option of
checking constraint on a particular field value

View Table
This option allows the user to view the contents (rows) in a
table

Execute queries
With universal GUI, the user can execute any query (select,
update, insert, alter, delete etc.) on the database by selecting
a table in which he/she has to execute the query

SQL query analyzer
It allows creating queries and other SQL scripts and
executing them against SQL server databases. A separate
workspace is provided where the user can type and execute
the query
Data Migration –
As said earlier, Data migration is the process of transferring
data between storage types, formats, or computer systems. It is a key
consideration for any system implementation, upgrade, or
consolidation [8].
The data migration process includes two major phases. The first phase
includes identification, elicitation and collation of entities, which are
performed accordingly. In the second phase the data migration process
between source entities and destination entities are carried out. Now,
tools for data migration between various types of RDBMS allows
migration of database tables as well as their data, but the major
disadvantage is the inability of some tools to migrate foreign keys that
are also the part of database relations [8]. Other major disadvantage is
that it is impossible to change the data types of the target database
attributes. The above task is not possible for any database specialist.
Formulating this problem the main goal is to reduce or eliminate the
disadvantages of the existing tools. This task can be completed with
the help of the expert system, which is suitable for certain data types
for the attributes of the target database tables [4].
The steps, which are involved to explain the data migration process is
show below diagrammatically –
Figure 1 - Steps for Data Migration
The main steps of the methodology are as follows –
1.
Specification of the source and target RDBMS
Most essential part of data migration is to know about the
source database and retrieve its data. There are even
different versions of the same RDBMS, which has to be
taken care of. Best possible way to achieve this is to connect
the source database and load the metadata of the database
that contains the required information. This process comes
under phase one of the data migration technique [5].
2.
Loading the logical structure of the source database
Logical structure of the database means the database tables,
their attributes and the relations between the database tables
(foreign key, primary key etc.) First part of the loading
includes loading of the properties of each database tables
like table name, attributes, data types as well as size of the
tables. Latter part of the loading includes identification of all
relationships between different tables in the source database
to implement them in the target database as well.
3.
Data types identification by expert system
Expert system plays an important role in the identification
of data types used in source database and thus implement
them in target database using all possible alternatives and
relations. Expert system needs the information about the
source RDBMS, the target RDBMS as well as the attributes
of the source database [5]. After finding all possible
alternatives, the best possible data type is selected for target
RDBMS [4].
4.
Creation of target database in the RDBMS
An SQL dump file is created that contains SQL commands
for creating database tables, attributes and relationships
based on the source database. File includes functions like
SQL CREATE, SQL ALTER, and SQL INSERT. After
generating SQL dump file, target database is created.
SYSTEM DESIGN
Figure 2 - System Architecture
Employee
emp_id – int(10)
department_id – int(10)
first_name – varchar(50)
last_name – varchar(50)
mobile_no – varchar(20)
Department
id – int(10)
name – varchar(50)
manager_id – int(10)
location – varchar(50)
Therefore the relation found is as follows:
Employee
department_id
Department
id
The user can select the required database system such as Oracle, MS
access, MS SQL server. After selecting the database system, the user
can perform DML or DDL commands. There is a query execution
unit, which will execute the query, and all the necessary changes will
be updated in the databases. The result is then provided to the user by
the query execution unit [6].
Now, the data migration part includes RDBMS of source database as
MySQL and target database as Oracle.
Step 1: Specification of the source and target RDBMS
Source RDBMS selected is MySQL 5.0.
Target RDBMS selected is Oracle 11g.
Step 2: Loading the logical structure of the source database
Using predefined methods in java.sql or JDBC driver, loading of the
logical structure of the database is done [6]. For example loading of
some of the table attributes which are as follows:
Figure 3 - User Design Interface
Step 3: Data types identification by expert system
Using fuzzy logic in expert system, different alternatives for a
particular data type can be determined for target database. For
example, consider a data type VARCHAR in source database [4]. The
available options for this data type in Oracle are as follows:
Source
RDBMS
MySQL
MySQL
MySQL
MySQL
MySQL
Source
Data_Type
varchar
varchar
varchar
varchar
varchar
Target
Data_Type
varchar2
nvarchar2
char
long
blob
Rate
0.99
0.99
0.97
0.05
0.03
manipulation. Thus, this system is beneficial for users having
no knowledge of SQL. The system can be made adaptive by
adding enhanced features for handling nested queries, sub
queries etc. It also provides data migration feature, which
includes an expert system for decision support during the
migration process. The data types to be selected are provided
by the expert system, which takes attributes of source, and
target databases as inputs. Choosing the most suitable data
type, the database specialist finally creates a target database
needed. Expert system knowledge can be extended to the
migration of more and more types of databases.
REFERENCES
[1]
[2]
Step 4: Creation of target database in the RDBMS
[3]
SQL dump file is created for target database table, which is then
included in Oracle [3]. SQL dump file created for department table in
Oracle is as follows:
[4]
CREATE TABLE Department {
id int(10) not null,
name varchar2(50) null,
manager_id int(10) not null,
location varchar2(50) null,
};
[5]
[6]
[7]
CONCLUSION
The system aims to develop a single user-friendly interface for
different types of databases in RDBMS, which allows data
[8]
Silberschatz Korth, Sudarshan,” Database System Concepts”,
Fourth Edition, Foxit PDF.
Carlos Eduardo Rojas,”Microsoft SQL Server 2000
Programming by Example”, Que Publication.
Yu C.T and C.C. Chang, “Distributed Query Processing”, ACM
Computing Surveys, Vol. 16 ,Issue 4, pp 399-433, December
1984.
Bartoš J. Walek B., Smolka P., Procházka J., Klimeš C., Fuzzy
modeling tools for information system testing, 17th International
Conference on Soft Computing Mendel 2011, Brno, 2011, pp.
154-161.
Harrington L. Jan., Relational database design and
implementation, Elsevier Inc., 2009.
Hammer, M. and McLeod, D. 1981. Database Description with
DM: A Semantic Database Model. ACM Transactions on
Database Systems- TODS, Vol.6, No.3, 351-386.
Elmasri, R. and Navathe, S. B. 2004. Fundamentals of Database
Systems, Pearson Education, ISBN 0-321- 12226-7, Fourth
Edition. Data migration definition and features [Online]. Available:
https://en.wikipedia.org/wiki/Data_migration.