|
-
Jan 10th, 2008, 05:06 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] mysql vs microsoft sql
How close is the syntax's between these two?
I coded lots of mysql and it all went well...
now I need to code for a microsoft sql enterprise or something...
so using php or vb.net, how close is the syntac? How long do you think it would take someone who knows mysql to learn the MS sql syntax?
Last edited by Zeratulsdomain; Jan 14th, 2008 at 02:26 PM.
-
Jan 10th, 2008, 05:10 PM
#2
Re: mysql vs microsoft sql
Pretty close. There's plenty of online documentation for both types anyway.
Not very long I suspect.
-
Jan 10th, 2008, 05:51 PM
#3
Re: mysql vs microsoft sql
MS SQL is fairly primitive... not a whole ton of functionality for the everyday task. It has one loop (WHILE), and very few string functions... but the basic syntax is pretty easy.
-
Jan 10th, 2008, 07:52 PM
#4
Re: mysql vs microsoft sql
 Originally Posted by timeshifter
MS SQL is fairly primitive... not a whole ton of functionality for the everyday task. It has one loop (WHILE), and very few string functions... but the basic syntax is pretty easy.
Really - are you joking?
Do you code in MS SQL professionally? Commercially?
-
Jan 10th, 2008, 08:19 PM
#5
Hyperactive Member
Re: mysql vs microsoft sql
My monkey wearing the fedora points and laughs at you.
-
Jan 11th, 2008, 05:11 AM
#6
Re: mysql vs microsoft sql
Moved To General Developer And Removed Nonsense Posts
-
Jan 11th, 2008, 05:15 AM
#7
Thread Starter
Hyperactive Member
Re: mysql vs microsoft sql
Well it all seems complicated. With mysql I just put in the host, username and password in MySQL query browser and I could connect to a GUI and send sequel commands easily (and it was also very easy in php, and also doable in vb.net).
Now I dont even know how to connect to this MS SQL db...
In addition the following sites seems have different syntax http://www.functionx.com/sqlserver/
Anyone have any good site to recommend?
Last edited by Zeratulsdomain; Jan 11th, 2008 at 05:39 AM.
-
Jan 11th, 2008, 06:23 AM
#8
Re: mysql vs microsoft sql
If you are using any version of MS SQL 2005 - especially EXPRESS - then download Management Studio from MS. There is a FREE EXPRESS version.
http://www.microsoft.com/downloads/d...displaylang=en
This tool does exactly what you just said - enter a server name, un/pw combo and you are managing that server. You can open query windows and type in SQL queries to execute against the server.
You can talk to the DB/server from visual studio - but I would personally recommend against that.
We do all our queries through stored procedures - each one developed in a query window and saved as .SQL text files. Stored in SOURCE SAFE for tracking.
I've probably written 2000 sprocs in the past 6 years - some having a single query and some having thousands of lines of query and logic flow code.
I'm sure there are many differences in concepts, syntax, datatypes - and other areas - from mySql.
Feel free to ask questions and I'm sure we can help you out.
Good luck.
-
Jan 11th, 2008, 01:37 PM
#9
Thread Starter
Hyperactive Member
Re: mysql vs microsoft sql
tnx for the reply.
yeah I downloaded Management Studio yesterday, couldnt install it till today for some reason. I can now connect and was able to issue basic queries so far.
You can talk to the DB/server from visual studio - but I would personally recommend against that.
I couldnt even connect the database. I am using the free express version right now, not sure if that has something to do with it. The only other time I did DB stuff in vb.net I was also using a local mdf DB.
Problem I am having right now is that I cannot add a foreign key... Nothing seems to work (I dont need any constraints, just need the FK to work).
Also I might use some stored procedures, but I might not need to because I wont have that many complex queries.
Also will this work with PHP or am I stuck using Visual Basic.net (all I have is express on these machines)?
Also on a side note.... I have a table that can be linked to itself (sometimes the record needs to be linked to other records of the same table). My solution: Added a extra field (bool), if that field is set to true then I know that item is linked to other item(s). From there I have a other table containing the PK of the record and the PK of the other linked record. Both those two items make the PK of that table. From there I can have a item linked to multiple items. Is that the best solution? Seems like it would work, but I never did anything like this and id like to get a opinion.
This is sort of my fist time designing one of these databases on my own and its also definitely my first time using t-SQL.
-
Jan 11th, 2008, 01:37 PM
#10
Thread Starter
Hyperactive Member
Re: mysql vs microsoft sql
tnx for the reply.
yeah I downloaded Management Studio yesterday, couldnt install it till today for some reason. I can now connect and was able to issue basic queries so far.
You can talk to the DB/server from visual studio - but I would personally recommend against that.
I couldnt even connect the database. I am using the free vb.net 2008 express version right now, not sure if that has something to do with it. The only other time I did DB stuff in vb.net I was using the full version while using a local mdf DB.
Problem I am having right now is that I cannot add a foreign key... Nothing seems to work (I dont need any constraints, just need the FK to work).
Also I might use some stored procedures, but I might not need to because I wont have that many complex queries.
Also will this work with PHP or am I stuck using Visual Basic.net (all I have is express on these machines)?
Also on a side note.... I have a table that can be linked to itself (sometimes the record needs to be linked to other records of the same table). My solution: Added a extra field (bool), if that field is set to true then I know that item is linked to other item(s). From there I have a other table containing the PK of the record and the PK of the other linked record. Both those two items make the PK of that table. From there I can have a item linked to multiple items. Is that the best solution? Seems like it would work, but I never did anything like this and id like to get a opinion. (edit: and there is also another field in that table that can either be leased or purchased, so I used a bool to identifiy that then have two seperate tables... Is that right? (edit2: exclusive subtype entity))... I am still in design, this is my second day working on this.
This is sort of my fist time designing one of these databases on my own and its also definitely my first time using t-SQL.
Last edited by Zeratulsdomain; Jan 11th, 2008 at 01:44 PM.
-
Jan 11th, 2008, 01:45 PM
#11
Re: mysql vs microsoft sql
If you are having a problem connecting, post a question in either the database section or the VB.NET section. Connecting to a backend database is really pretty simple.
As far as the platform is concerned, if PHP allows you connect, and run SQL queries, and I'm pretty certain it does, there is no reason you can't use that.
-
Jan 11th, 2008, 01:50 PM
#12
Thread Starter
Hyperactive Member
Re: mysql vs microsoft sql
well I can connect right now, just not with vb.net....
but that doesnt matter... I probably wont be that far for another week if not longer (even got to write a business proposal and have it accepted).
The big problem right now is the foreign key problem...
-
Jan 11th, 2008, 01:56 PM
#13
Re: mysql vs microsoft sql
What happens when you try to add the Foreign Key?
-
Jan 11th, 2008, 02:01 PM
#14
Thread Starter
Hyperactive Member
Re: mysql vs microsoft sql
well I was getting errors, but only because I didnt know what I was doing... :P
I was simple not declaring the field and but trying to reference it :P I always have problem with foreign key stuff, just figured it was a MS SQL problem. That was a hour wasted
-
Jan 11th, 2008, 02:10 PM
#15
Re: mysql vs microsoft sql
Oh, so you are saying that you figured it out, and do have your keys setup, right?
-
Jan 11th, 2008, 02:18 PM
#16
Thread Starter
Hyperactive Member
Re: mysql vs microsoft sql
yeah its all working, so far I only put up two tables (more as a test, because the schema could change)... but I am still worried I am not designing this as efficiant as possible.... hence my previous qusetion about the design...
I will need to present this before I really start... but I do know the people I am presenting it to do not have any big database experience so I really need to focus on the efficiancy myself.
-
Jan 11th, 2008, 02:25 PM
#17
Re: mysql vs microsoft sql
 Originally Posted by Zeratulsdomain
Also on a side note.... I have a table that can be linked to itself (sometimes the record needs to be linked to other records of the same table). My solution: Added a extra field (bool), if that field is set to true then I know that item is linked to other item(s). From there I have a other table containing the PK of the record and the PK of the other linked record. Both those two items make the PK of that table. From there I can have a item linked to multiple items. Is that the best solution? Seems like it would work, but I never did anything like this and id like to get a opinion.
This thread is getting multi-topic - and you will not get people to look this far down...
At any rate - it would be nice to have "real data" describing this.
You might want to start another post in the DB forum with just that - real data and ask us about the design of the table.
I've got some ideas I can share with you...
-
Jan 14th, 2008, 12:57 PM
#18
Thread Starter
Hyperactive Member
Re: mysql vs microsoft sql
I made this new thread on that subject BTW: http://vbforums.com/showthread.php?t=504281
also marking this subject as resolved (edit: nm cant)
-
Jan 14th, 2008, 01:12 PM
#19
Re: mysql vs microsoft sql
To mark this thread resolved you either EDIT the first post or using the thread tools dropdown up top
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|