Joe Wayne

I talk about technology, programming and development.

MySQL is not a database

So what is MySQL? And what is a database? 🤔

We will answer both answers in this post.

What is MySQL?

Ok, we now know what MySQL is not , it is not a database.

MySQL is a relational database management system. 🤯

Ok, now we need to define what a database management system is.

What is a Database Management System (DBMS)?

A Database Management System (DBMS) is software designed to store, retrieve, define, and manage data or data structure in a database.

Data in a DBMS is stored in database objects called tables. A table is a collection of related data entries and consists of columns and rows.

Users of this system are given tools to perform various types of operations on table structures or data.

A DBMS functions primarily as an interface between the end user and the database, simultaneously managing the data and the database structure in order to facilitate data organization and manipulation.

Some examples of DBMS include MySQL , PostgreSQL, Microsoft Access, SQL Server, and Oracle.

What is a database?

A database is an organized collection of data, typically stored electronically in a digital system in tabular form.

In this post we are only considering relational databases, but there is another category of databases, called non-relational databases, such as MongoDB , you can better understand the difference between relational and non-relational databases here.

A database is usually controlled by a database management system (DBMS). Together, the data, the DBMS, and associated applications are referred to as a database system , often shortened to just database.

Top 10 Databases to Use in 2021. MySQL, Oracle, PostgreSQL, Microsoft… | by  Md Kamaruzzaman | Towards Data Science

Data, within the most common types of databases in operation today, is typically modeled in rows and columns in a series of tables to make data processing and querying efficient.

Data can then be easily retrieved, managed, modified, updated, controlled, and organized. Most databases use SQL to write and query data.

What is the difference between a database and an Excel spreadsheet?

Databases and Excel spreadsheets are both convenient ways to store information. The main differences between the two are:

  • How data is stored and handled
  • Who can access the data
  • How much data can be stored

Spreadsheets were originally created for one user, or a small number of users who did not need to do a large amount of manipulation on the data.

Databases, on the other hand, were developed to contain much larger collections of information. Databases allow multiple users to simultaneously manage and query data quickly and securely, using more complex logic and language.

What is SQL?

SQL ( Structured Query Language ) or in good Portuguese, Structured Query Language, is the standard language for querying and manipulating relational databases.

Yes, SQL is a programming language . It offers loops, logical directives, variables, and so on.

But instead of being a programming language for building websites, applications, or software, SQL is a language focused on storing, retrieving, and manipulating data in databases.

Here are some examples of SQL commands:

SELECT * FROM table_name WHERE column_name= '...' ;
 CREATE  TABLE table_name (COLUMN_NAME DATATYPES[,....]);  
 ALTER  TABLE table_name ADD column_name COLUMN -definition; 
 DROP  TABLE table_name;  
 TRUNCATE  TABLE table_name;  

What can you do with SQL?

  • SQL can execute queries against a database
  • SQL can retrieve data from a database
  • SQL can insert records into a database
  • SQL can update records in a database
  • SQL can delete records from a database
  • SQL can create new databases
  • SQL can create new tables in a database
  • SQL can set permissions on tables, procedures, and views

How do SQL and DBMS relate to each other?

DBMS is a database management system. And SQL is the language used to communicate with data in a DBMS.

Or, to put it in simple terms:

DBMS is a book and SQL is the language being used in the book. Want to read or write in the book? Use SQL.

MySQL Workbench

MySQL Workbench is a visual database design tool that integrates SQL database development, administration, design, creation, and maintenance into a single integrated development environment (IDE) for the MySQL database system.

MySQL Workbench provides a set of tools to improve the performance of MySQL applications, provides a visual platform to manage MySQL environments and gain better visibility into databases, and also offers visual tools to create, execute, and optimize SQL queries.

Connecting the parts

To understand how all these pieces connect, take a look at the image below.

XYZ CODE: Identify the components required to connect to a database using  the DriverManager class including the JDBC URL

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *