Results 1 to 19 of 19

Thread: [RESOLVED] mysql vs microsoft sql

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    431

    Resolved [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.

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: mysql vs microsoft sql

    Pretty close. There's plenty of online documentation for both types anyway.

    Not very long I suspect.

  3. #3
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    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.

  4. #4
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: mysql vs microsoft sql

    Quote 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?

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  5. #5
    Hyperactive Member Arrow_Raider's Avatar
    Join Date
    Dec 2001
    Location
    AVR Lovers Club
    Posts
    423

    Re: mysql vs microsoft sql

    ms SQL > mysql
    My monkey wearing the fedora points and laughs at you.

  6. #6
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: mysql vs microsoft sql

    Moved To General Developer And Removed Nonsense Posts

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    431

    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.

  8. #8
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    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.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    431

    Re: mysql vs microsoft sql

    tnx for the reply.


    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
    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.

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    431

    Re: mysql vs microsoft sql

    tnx for the reply.


    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
    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.

  11. #11
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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.

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    431

    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...

  13. #13
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: mysql vs microsoft sql

    What happens when you try to add the Foreign Key?

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    431

    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

  15. #15
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: mysql vs microsoft sql

    Oh, so you are saying that you figured it out, and do have your keys setup, right?

  16. #16

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    431

    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.

  17. #17
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: mysql vs microsoft sql

    Quote 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...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  18. #18

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    431

    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)

  19. #19
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: mysql vs microsoft sql

    To mark this thread resolved you either EDIT the first post or using the thread tools dropdown up top

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width