SQL and MySQL

chrstrbrts

Senior member
Aug 12, 2014
522
3
81
Hi,

I think that I understand the difference between SQL and MySQL:

SQL is the language that is used to communicate with a relational database while MySQL is a type of relational database.

But, how do I create a relational database in the first place?

Does SQL have some "create" functions that you can use to create a new database?

Thanks.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I think most relational DBs now support some version of the ANSI SQL standard, along with their own proprietary extensions. I think creating a database is one of those proprietary areas.

Whichever DBMS you choose, the most introductory tutorial will lead you through database creation and simple tables, etc.
 

h4rm0ny

Member
Apr 23, 2015
32
0
0
Hi,

I think that I understand the difference between SQL and MySQL:

SQL is the language that is used to communicate with a relational database while MySQL is a type of relational database.

But, how do I create a relational database in the first place?

Does SQL have some "create" functions that you can use to create a new database?

Thanks.

This is correct. SQL is a language. Many different database systems use it. MySQL simply happens to have it in its name, that is all. To get started, you want to pick a type of database (such as MySQL) and download it and install it. You'll then have the software running and you can start creating your own databases. I'll be honest, it's slightly easier to get up and running on Linux than on Windows, but either is fine. Just don't get frustrated if you spend an hour trying to work out why it wont connect or refuses your password or something - that's not uncommon. Just follow the instructions and the odd web search and you'll be fine.


Postgres vs. MySQL has a long history. I will say up front that I consider Postgres to be the superior database system. But that does not mean you should or should not start with it.

It used to be that Postgres had far more enterprise (pro) features than MySQL and was far more rigorously tested for bugs. However, it did not run as quickly as MySQL and therefore MySQL achieved a lot of popularity as the "cheap and cheerful" way to do simple and fast web applications. It was also a great deal easier to learn because it was more forgiving of ignorance. This led to a certain degree of database snobbery from Postgres users toward MySQL. I know, because I had that snobbery too. And it was deserved - MySQL was kludgy and couldn't keep pace with its own development.

Skip forward some years and both systems have addressed their short-comings. MySQL has added a lot of more professional features and Postgres has long since sorted out its performance problems and is now just as fast.

Postgres remains the better system in terms of features and stability. However, it is undoubtedly harder to learn. This is not necessarily a bad thing. If you start with Postgres you will learn the "right" way to do things. If you start with MySQL you will pick up a lot of shortcuts and never even realize they are shortcuts (auto-increment fields are an obvious example). Consider it the difference between learning to drive a car that is automatic, and learning in a car that has a gear stick. Both can be good, the latter gives you more control and a better understanding of what the car is actually doing. The former will get you out on the road sooner.

Either way, you should be able to find some introductory tutorials online with a bit of searching that will take you through creating a database, tables in it and adding some data / selecting results.

Before you do that, look up "Normalization". It is vital to understanding how to put a database together. You'll see a bunch of terms such as "1st normal form" that might put you off at first. Just skip over anything that you struggle with or seems unfriendly - it's actually pretty simple once it clicks. But it's important because without understanding normalization you will design bad databases and searching it wont seem intuitive until you do.

I hope that helps.

H.
 
Last edited:

h4rm0ny

Member
Apr 23, 2015
32
0
0
MySQL is best for 90% of cases.

I would dispute that. If you were to phrase it as "you don't need Postgres for 90% of cases", then I would agree. But assuming someone has equal knowledge of both MySQL and Postgres, I don't see why one wouldn't use Postgres for those cases, either.
 

El_Capitan

Junior Member
Mar 3, 2010
2
0
0
If you understand SQL from one vendor, you'll understand it from another. I started out with MSSQL databases, but now have to work with both MSSQL and Oracle databases. Pretty good career path, a lot of companies look for quality DBA's. I have to turn down DBA positions left and right, and that's not even what I do, lol.
 

Oyeve

Lifer
Oct 18, 1999
21,995
854
126
If you understand SQL from one vendor, you'll understand it from another. I started out with MSSQL databases, but now have to work with both MSSQL and Oracle databases. Pretty good career path, a lot of companies look for quality DBA's. I have to turn down DBA positions left and right, and that's not even what I do, lol.

QFT. I was hired as an IT manager 3 years ago. They new SQL DBs was not my thing and they were cool with that. 2 years ago the DB took a dump. I took a crash mysql course (google the issue) forced myself to quickly learn mysql (not that hard) was successful in fixing it and bam, review time came and got 20k increase. And I am still not a DBA.
 

slugg

Diamond Member
Feb 17, 2002
4,723
78
91
Hi,

I think that I understand the difference between SQL and MySQL:

SQL is the language that is used to communicate with a relational database while MySQL is a type of relational database.

But, how do I create a relational database in the first place?

Does SQL have some "create" functions that you can use to create a new database?

Thanks.

Conceptually, I think you get it. I'll just nitpick some details, so you can learn.

SQL, as you said it: you got it. No problem there.

Here's where there's a blurry line. MySQL is not a type of database. Actually, the type of database you're dealing with is a relational database. There are other types, like graph databases, document, and so on.

MySQL is a particular implementation of a relational database. In general industry jargon, we would call this a vendor.

Just like cars and trucks are two types of automobiles, a Ford Fiesta and a Mazda 2 are two particular implementations of cars, which are a type of automobile.
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
Hi,

I think that I understand the difference between SQL and MySQL:

SQL is the language that is used to communicate with a relational database while MySQL is a type of relational database.

But, how do I create a relational database in the first place?

Does SQL have some "create" functions that you can use to create a new database?

Thanks.
SQL is the language standard used to communicate with SQL databases. Each is different, but they are variations of the same basic thing. MySQL is a SQL database management system, which hosts and services said SQL databases. To even attempt to be compliant with any version of the SQL standard, relational is optional, however. SQL does not require the use of sets, nor named columns (though usuall you use named columns anyway), which are backbones of a relational database. RDBMS is an industry misnomer, just like Big Data (big data really means applying a schema after the fact, not whether the data set is large or small).

And, yes: CREATE DATABASE mydb;
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |