Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learn SQL using MySQL in One Day and Learn It Well

You're reading from  Learn SQL using MySQL in One Day and Learn It Well

Product type Book
Published in Apr 2024
Publisher Packt
ISBN-13 9781836205678
Pages 121 pages
Edition 1st Edition
Languages
Author (1):
Jamie Chan Jamie Chan
Profile icon Jamie Chan

Creating the Database

 

The first thing that we need to learn is to create a database.

 

A database is a collection of related tables, queries and views etc.

 

You can think of it as being similar to an Excel workbook. An Excel workbook contains related worksheets and charts while a database contains related tables, queries and other objects (such as views and stored routines).

 

To create a database in MySQL, we use the CREATE DATABASE keywords. A keyword is a word that has a predefined meaning in SQL. In other words, if you want to create a database, you have to type CREATE DATABASE, you cannot be creative and type other words like MAKE DATABASE or CREATE COLLECTION etc.

 

Keywords are generally not case sensitive in SQL. Hence, you can also write create database or CREATE database. However, the common practice is to use uppercase for keywords. That’s the convention that we’ll be following in this book. For all the syntaxes presented...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}