Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Differences between Access to MySQL and Microsoft SQL Server

  Asked By: Chisisi    Date: Oct 20    Category: Java    Views: 1379
  

I am wondering what is the difference in accessing from JSP a database in MySQL
vs Microsoft SQL Server.

Currently I am developing a JSP that will access MySQL for test being I have
that on my PC. Ultimately it will have to connect to Microsoft SQL Server.
Will there be much that I will have to change, or will it primarily be a
different jar that I call on or something simple to switch without changing a
bunch of code.

Share: 

 

10 Answers Found

 
Answer #1    Answered By: Scott Simmons     Answered On: Oct 20

u not mentioned the versions of MySQL / MS SQL
Server...

this is not advisible tht u r testing in one RDBMS &
implementing on the different RDBMS.

cuz there is no Views, Triggers, Stored Procedures
in MySQL as of now which is availble on SQL
Server(anyway im lookin forward for next ver MySQL5.0
for some of these...)

backup methods are bit different in these RDBMS..

then wht else is there pure ANSI-SQL... there also u
need to change  certain methods if tht method is not
availble in the same name in MS SQL Server..

& without chaning ur source code  it's not at all
possible to change between these RDBMS..

 
Answer #2    Answered By: Raju Srinivas     Answered On: Oct 20

The MySQL is version 4.1.1 I think. I just downloaded it and installed it, so
it is the latest download. As for the MS SQL Server, I do not know what version
it will be.

I guess what I am doing is trying to develop an application that will retrieve
data from a database  and display it on a screen. Then allow the user the
ability to view and or submit one or more of the displayed records to a JMS
Queue for processing by another application.

This would be a sorta proto type. Being I have not done this and do not have MS
SQL Server installed on my machine, I needed something to develop against. I
was hoping that once I was done I would be able to change  some stuff and be able
to apply what I did in MySQL to MS SQL Server.

Hopefully I will not have to change too much. I am sure that the main processes
will be similar and I am sure I will have to switch  the files that allow me to
connect to each of the respective SQL's.

I was going to use JSP for this. Would you recommend something else?

 
Answer #3    Answered By: Neil Turner     Answered On: Oct 20

it's ok, no problems. im not saying tht u can't
change between these two RDBMS. Even i had experience
of changing  between these two, but in my case i have
changed my system from MS SQL Server to MySQL

there i had difficulties like,

1. I have used Views, Triggers, Stored Procedures a
lot in my system so i have no option other than making
it in pure java while changing it from SQL Server to
MySQL.

2. In SQL commands i hv used datetime functions which
is available in different format(syntax) in MySQL so
tht also i did in pure java / some of them changed to
MySQL syntax.

3. Backup & Restoring syntax also different in these
i make these changes also.

these are some of the difficulties which i faced
(which almost took 10-15 sleepless nights frm me to do
all the changes req),

but hope for the best in ur case...

 
Answer #4    Answered By: Katrina Edwards     Answered On: Oct 20

Would there be a better solution to what I want to do?

 
Answer #5    Answered By: Eddie Austin     Answered On: Oct 20

Simple, Install MSSQLSERVER in ur machine first & thn
start developing  ur application. Eventhough im joking
it has some serious meanings, cuz im again&again
telling MySQL has no Views,Triggers,Stored
Procedures,etc., so dont try to develope ur app in
MySQL & thn to upgrade it to MS SQL Server.

But still i suggest MySQL is the best one for small
scale business, reliable, fast & ofcourse not much
licensing problems.

 
Answer #6    Answered By: Antonio Dunn     Answered On: Oct 20

u can try PostGreSQL
www.postgresql.org
with pgadmin interface
www.pgadmin.org

 
Answer #7    Answered By: Holly Brown     Answered On: Oct 20

if I understood your OP correctly, then you're developing  some
software under MySQL which you will migrate to MS SQL Server, right?

If this is the case, then I am confident you won't have many problems
as long as you stick to all ANSI SQL constructs that MySQL offers. As
you currently can't use views and triggers, you don't use them
anyway, right? So just make sure that all your SQL statements run on
SQL Server correctly, one by one. No matter whether your SQL
statements are executed as is or by means of a cursor: if they work
without any modifications on MS SQL Server in a SQL window, then
chances are quite high you can transfer the app without hassle.

The only things (as far as I know, I haven't tried it) you'll have to
observe in this case is that you have to switch  to a different JDBC
driver and that the connection information must be correct, of
course. Despite that only observe the rule above: only use ANSI SQL
constructs, nothing specific to MySQL, then you'll be on the safe
side.

...Of course the last sentence applies to SQL Server only, not to
Access, but as you wrote you won't try Access; good thing. :-)

Should you be unsure whether your SQL statements are ANSI conformant
or not: either go to some SQL-specific Yahoo! group or post them
here, then we can examine them. But I know that this completely off-
topic for this list, so my apologies for this unwise proposal.

 
Answer #8    Answered By: Maliha Malik     Answered On: Oct 20

Thanks, if I had MSSQLSERVER then I would use it but cannot afford it right now
on my own.

 
Answer #9    Answered By: Edward Jones     Answered On: Oct 20

connecting to ms-sql server  doesn't require one to
include any jar  file.
in class.forname parameter you specify the
jdbc.odbc.JdbcOdbcDriver which is specified in
java.sql.*;
and u have to configure your dsn there

as it connects to odbc layer first so no need of
changing any codes.

 
Answer #10    Answered By: Lewis Welch     Answered On: Oct 20

Sql server  ans mysql  r two different databases.....
thats it....

 




Tagged: