CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2015
    Posts
    175

    Learning MySQL by C++

    Hello to all,

    I'm sorry if this is not a good forum for asking this question.

    I have some knowledge on C++ and know that being familiar with MySQL will be a must soon. Now how to learn MySQL please?
    I heard that I can learn MySQL from C++ or PHP. So if I'm given an option to choose, I'll choose learning it from C++ because I know nothing about PHP.
    Now what is your advice please?
    If I want to learn MySQL from C++, what works I need to do please?
    Should I read some book for it?

    Thanks.

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Learning MySQL by C++

    Not sure what you mean by learn SQL by C++. C++ is a programming language. SQL is a database language. They don't have much to do with each other. Since you asked in a Visual C++ forum, one way to access a SQL database is through ODBC, in particular the CDatabase and CRecordset classes. You'll need to know something about relational databases to use them, but SQL is really its own thing.

  3. #3
    Join Date
    Jun 2015
    Posts
    175

    Re: Learning MySQL by C++

    Thank you for your reply.

    So I want to learn MySQL as a new language and use it some day for another language, e.g., C++ or PHP or some other language.
    So I think the first step is to start learning MySQL. Since I have some programming skills (in C++) can I straightly go and start to read a book on MySQL? If so, would you introduce me a good book on MySQL to start with?

  4. #4
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: Learning MySQL by C++

    Quote Originally Posted by tomy12
    So I think the first step is to start learning MySQL. Since I have some programming skills (in C++) can I straightly go and start to read a book on MySQL?
    You don't even need to know a programming language like C++ to learn database design, SQL, and MySQL in particular. For example, you could use graphical tools for inspecting a MySQL database and running SQL statements on that database, or you could even use the MySQL command shell.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  5. #5
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Learning MySQL by C++

    Quote Originally Posted by tomy12 View Post
    So I want to learn MySQL as a new language and use it some day for another language, e.g., C++ or PHP or some other language.
    First thing you have to understand is that MySQL is a product, but not a language. The language is SQL, or better say MySQL's dialect of standard SQL.

    There are tools supplied as a part of MySQL, as well as third party tools from MySQL community. To learn SQL language with MySQL product it's enough to go with the tools.

    But in case you are to use MySQL with C++ or PHP code, you are to reveal for yourself a world of database connectivity, specific per programming language. Moreover, there may be different technologies used for connecting to the same database product. In C++ those are typically native library from db engine vendor, ODBC, ADO/OLEDB. PHP has its own ways, and you may be sure there are more than one, like in any other language.
    Last edited by Igor Vartanov; January 27th, 2016 at 04:11 AM.
    Best regards,
    Igor

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

Featured