MySQL: Schema & Model Explained - Self-Learning Guide

In summary, "model" is a feature in MySQL Workbench used for visually designing a database and generating the SQL queries to create it. "Schema" refers to the database itself, which can have multiple databases running on one MySQL server. Some people prefer to use pen and paper to model and write the queries themselves instead of using Workbench.
  • #1
chingkui
181
2
Hi, I am self learning MySQL, I am a bit confuse with the terminology, can someone explain a little bit what is schema and model? And how they are usually used? Thanks.
 
Technology news on Phys.org
  • #2
Short answer:

"Model" is a feature of MySQL Workbench, not really the database software itself. You use it to model out a database like you would on pen and paper. Once you've modeled a database, there's a menu option somewhere (I haven't used Workbench in a while :)) that automatically creates and executes the SQL queries to actually create the database/schema on the database server. Personally, I find Workbench to be confusing and clunky, and just model on pen and paper then write the queries myself.

"Schemas" are what most other database software calls "databases." It's the database that's actually running on the server that you query. One MySQL server can run multiple databases if you wish.
 

1. What is MySQL?

MySQL is an open-source relational database management system (RDBMS) that is used to store and manage large amounts of data. It is one of the most popular database systems and is commonly used in web applications.

2. What is a schema in MySQL?

A schema in MySQL is a logical collection of database objects, such as tables, views, and stored procedures. It defines the structure and organization of the data stored in a database.

3. How do you create a schema in MySQL?

To create a schema in MySQL, you can use the "CREATE SCHEMA" command followed by the name of the schema. For example: CREATE SCHEMA mydatabase;

4. What is a database model in MySQL?

A database model in MySQL is a visual representation of the database structure, including the tables, columns, and relationships between them. It helps to plan and design a database before it is created.

5. How can I learn more about MySQL schemas and models?

There are many resources available to learn more about MySQL schemas and models, including online tutorials, books, and documentation from MySQL. You can also practice creating and managing schemas and models on your own using a MySQL database server.

Similar threads

  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
21
Views
2K
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
21
Views
524
  • Programming and Computer Science
Replies
10
Views
1K
  • Programming and Computer Science
Replies
1
Views
2K
  • Programming and Computer Science
Replies
16
Views
2K
  • Programming and Computer Science
Replies
2
Views
25K
Replies
6
Views
6K
Back
Top