View Full Version : Replacing mySQL with SQL server 08
Fai
1st February 2009, 12:05
Hi all
I just created an e-commerce website with a company and the website is based on php and mySQL. I was wondering if it is possible to transfer mySQL to SQL server and link PHP to SQL server 08 too.
1- Will this affect the website settings and database created in it???
2- Would you recommend on working on mySQL rather than SQL server.
thank you
Cromulent
1st February 2009, 12:21
Hi all
I just created an e-commerce website with a company and the website is based on php and mySQL. I was wondering if it is possible to transfer mySQL to SQL server and link PHP to SQL server 08 too.
1- Will this affect the website settings and database created in it???
2- Would you recommend on working on mySQL rather than SQL server.
thank you
You would need to do a significant amount of programming to do it, so unless you can do it yourself you would either need to pay someone else to do it or stick with MySQL.
MySQL is fine though, and cheaper :).
ken_uk
1st February 2009, 12:31
If the system is working fine, Is there a reason to want the change?
Fai
1st February 2009, 12:37
I was wondering of changing since im more accustomed to sql server and easy for me to develop things. i haven't worked before on mysql services.
FireFleur
1st February 2009, 15:06
Well convert it over, but there will probably be some difficulties.
Normally you have to know both environments fairly well to do a conversion, but it is not too hard.
I would say stick with MySQL and just learn how that works, but I know some like SQLServer.
A lot of it is going to come down to how they developed the database, and if they stored all the setup code outside the database.
Personally, I keep all SQL and functions outside the database, and have a system for including new structures or completely removing the database and then refreshing with a complete rebuild. If that style is being used, then you just have to go through the code and workout out the incompatibile code.
I also tend to use standard APIs, which I then run another custom API over the top, for the glue code or application server, this allows me to concentrate on any core changes, and have it apply across the codebase with minimal alteration. It is also wise to do this for security purposes.
If the PHP though was sending raw MySQL style instructions then it will be very messy.
stugster
1st February 2009, 16:07
I would say stick with MySQL and just learn how that works, but I know some like SQLServer.
I'm with this as a solution. If you already know MS SQL, it's not going to be that difficult learning mySQL. Just learn mySQL :)
Fai
1st February 2009, 16:11
I see from all your replies that you are a bit encouraging me to go for working with mySQL and learn it. Anyone of you really gives it high ranking to fully working on an e-commerce website costed me £3800.
I'm thinking for later if i want to expand the network and database. That's what is worrying me in synchronizing databases and other security issues such as thread attacks
FireFleur
1st February 2009, 20:21
Not heard of thread attacks, you had me googling that, and I know how to code threaded applications in C :)
I think you mean SQL Injection, but I could be corrected, that problem is across all databases because it is not a database problem it is an API problem, and the security settings you choose.
Now, I use Postgresql, I am a database snob, I have used pretty much all of them out there, and PostgreSQL is the best for me, but I still wouldn't advise you jump ship to that one.
What you probably should have done was spec. SQLServer in the first place, but now you are here, unless you really know what you are doing you are probably going to spend the same amount of time it took to develop to put this into SQL Server. I cannot be 100% sure, as I haven't seen the code.
But, you should also remember this is just advice, and you can install what you damn well please on your systems, if your heart is set on SQLServer go for it, it might just be the thing that gnaws away everytime you have a problem and could cause longer downtime, or other problems, computers are logical but humans are irrational :)
MySQL is a good database though, not as sweet as PostgreSQL IMO, but that's just me :)
FireFleur
1st February 2009, 20:25
Threads can create what are known as race conditions, where you cannot be sure what a result will be given the same input, but that is a coding problem solved generally by using locks.
Interconnect IT
2nd February 2009, 08:39
Whether you can move depends on the underlying application. When I worked on the development of PeopleSoft Financials for French Public Sector (snappy title huh?) we had to write SQL code that was compatible with all major and one minor database system. So at the very least that was Sybase, SQL Server, Oracle and something small I can't remember.
Mostly it wasn't a challenge - most queries were the same throughout. Each DB has its limitations. I remember when SQL Server couldn't handle joins involving more than 16 tables. mySQL 4 was pretty limited in many ways, but 5 seems fairly robust. I doubt it's as good as SQL Server, but most simple jobs don't require anything so heavy.
So conversion could be easy... or it could be hard. Personally I wouldn't bother unless you've got massive traffic. A site you paid £3.8k for isn't a massive undertaking, but may use significant amounts of open source code that's dependent on certain technologies - so conversion costs could massively outstrip original development costs. If it's £3.8k of scratch built code, however, then there won't be that much of it and a change could be easy.
OCM Networks
2nd February 2009, 13:14
I think you also need to consider the license position. Microsoft make SQL very expensive to implement for websites ( if database goes over certain size )
consultant
2nd February 2009, 16:29
I am not a sql techie, but my first though is why? If you have paid the dosh for a website that works - whatever you experience, why would you want to go routing around and fiddling with the DB. If it doesnt do what you want or briefed, you are better getting the developer to do the job right!
LittlestHobbo23
4th February 2009, 07:07
It may be cheaper for you to learn mysql than sqlserver, however as you've just bought the site and db how sure can you be that the original owners implimented security best practisces?
First question are you safe from sql injections as mysql didn't used to support stored procedures (i believe it does now though?).
I guess first off you'd need to script off the mysql schema, import the data and then change all the php calls and hook up with an odbc driver.
Definatly try some of the more standard security attacks on your site and see how it fairs.