Professional Documents
Culture Documents
Author: Jun Shao Project: Haiti
Author: Jun Shao Project: Haiti
wampapache
PHP
MySQL database
wampmysql
WAMP’s Menu
Management Portals
PHPmyadmin
SQLitemanager
Configuration and
Settings
Loaded Modules
Directory Access
Shortcut
WAMP’s Menu
Services
Apache
MySQL
Note:
The icon tray
reflects the status
of your server.
Haiti Migration
Architecture
Windows Server
Windows Server
Apache
IIS
SQLMySQL
Server
Perl (Replication)
Perl (Replication)
Haiti Migration
New Applications
Apache
HTTPS Setting
MySQL
DDL
DML
Data
Data Migration
Haiti Migration
DDL
For example,
MsSQL:
CREATE TABLE <TABLENAME> (
<TABLENAME>_id bigint IDENTITY (1, 1) NOT NULL
…
MySQL:
CREATE TABLE <TABLENAME> (
<TABLENAME>_id bigint NOT NULL AUTO_INCREMENT,
…
Haiti Migration
DML
For example,
MsSQL:
select top 10 * from patient;
MySQL:
select * from patient limit 0,10;
Haiti Migration
Data
MsSQL:
MySQL:
Haiti Migration
Data Migration
We use ODBC to migrate data from the
MsSQL database to the MySQL
database.
We use PHP to export data from the
MySQL database and then import the
data into the MySQL database.
Haiti Migration
MsSQL and MySQL follow the SQL-
92 standard. However, each of them
have their own extensions.
Source Common Full Name Development
Name Method
Sybase
Windows Server
Windows Server
Apache
Apache
MySQL
MySQL
Perl (Replication)
Affected Applications
PERL(Replication)
PHP
Tomcat
Affected Applications
PERL (Replication)
It uses standard sql in inserting data.
Application as unsigned)*100./..
& Business Servlets
Logic
<aggregateItems>count(*)
as 'Compte', Config Reports.xml url="jdbc:jtds:mysql://localhos
Context.xml
ceiling(cast(count(*)/$total. t:1433/(resource.database)"
*100… Jasper Jasper Library
mysql-connector-java-5.0.6-
bin.jar
MySQL database
Affected Applications
Conclusion:
Most changes of reports are based on
extension differences between MySQL
and MsSQL.
Affected Applications
Users
PHP
PHP
Monitoring and
Presentation Patient Info Evaluation Administration Authentication
Application
Layou & Business
Logic
Layout Function Utility Label
menu.php
mainbody.php Config reports.xml cphr.ini
installation
-setting.php
Function
genericsave.php DB
Defination SQL Scripts
$mysql_access = mysql_connect
followup.php
(DB_SERV, DB_USER, DB_PASS ) or
Utility backend.php backendAddon.php
Data access
die ("FATAL ERROR: Unable to
chkDate.js
connect to the database");
Label
mysql_select_db (DB_NAME,
findLabels.php
$mysql_access) or die ("FATAL
ERROR: Unable to select
MySQL database
database.");
Affected Applications
Changed reasons:
Different extension of queries.
For example,
“Top 10” in MsSQL vs. “Limit 0,10” in MySQL
“Convert” in MsSQL vs. “Cast” in MySQL
“isDate” in MsSQL vs. “Length(Date(..))” in MySQL
Different ways to connect to the database.
Different data formats.
For example,
“mm/dd/yyyy” in MsSQL vs. “yyyy-mm-dd” in MySQL
Different Error Messages
Affected Applications
Conclusion
The migration is complex since we have to
review every query. The suggestion is to
create a wrapped-up interface using standard
queries for other pages to call when they
want to visit the database.
Problem Left