I have some experience in migrating (simple) MySQL/Java application to use
Cach�.

As Ram�n said exporting the schema is basically all you need. However, what
I found out was that the Java programmers had cut some corners in the
application - this might be true in many other cases too.
He had INSERT statement which looked like this:

INSERT INTO customer Values('name','other value','yet some other value')

So this did not work until the package (aka schema) was defined
(package.customer) .
Also since the programmer knew the "order of the fields" he did not to
bother to define them in the insert statement!! Obviously this cannot work
with Cach� based SQL.

The other thing was the use of ';' in the end of statements. Perhaps there
is an option in Cach� which would allow statements to end with ';' but until
these were removed, Cach� complained about "illegal delimiter", or something
like that.

The last thing is the way databases are defined and prepopulated in the
MySQL world. It looks like the programmers do this using sql scripts:

DROP TABLE IF EXISTS customer;
DROP TABLE IF EXISTS strtable;
DROP TABLE IF EXISTS log;
DROP TABLE IF EXISTS util;

CREATE TABLE customer
(
 customerid    INT  NOT NULL PRIMARY KEY,
 firstname  VARCHAR(50) NOT NULL,
.... etc...

...the populating some initial data...

...DESCRIBE strtable;

INSERT INTO strtable VALUES
(0, ''),
(1, ''),
(2, ''),...

---

So, I just wrote methods which read the initial data from text files and
store it away.

-Pasi-

"Joshua M. Andrews" <[EMAIL PROTECTED]> kirjoitti viestiss�
news:[EMAIL PROTECTED]
> Dear Group,
>
> You've all been such great help and I would like to ask one more question
if
> you don't mind.  My company currently uses PHP/MySQL for everything and
I'm
> trying to convince them to switch to CSP/Cache.  I really love the
> technology InterSystems has!
>
> Anyway, I would like to know if there are any simple ways that I can
migrate
> a database from MySQL to Cache?  Thanks for all the help ya'll!
>
> Sincerely,
>
> Joshua
>
>



Reply via email to