MySQL Database Fundamentals

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/21

flashcard set

Earn XP

Description and Tags

Flashcards for reviewing MySQL database concepts, including database creation, table management, primary and foreign keys, and data import techniques.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

22 Terms

1
New cards

Schema vs. Database in MySQL

In MySQL, the terms 'schema' and 'database' are interchangeable.

2
New cards

Two Ways to Interact with MySQL Workbench

Using built-in wizards or writing SQL statements directly.

3
New cards

Creating a Database in MySQL Workbench Using Wizard

Click the new schema button, enter the database name, and apply the SQL statement generated by the workbench.

4
New cards

Creating a Database Manually with SQL

Use the CREATE DATABASE statement.

5
New cards

Setting a Default Schema

Ensures that SQL statements apply automatically to the selected database.

6
New cards

Creating a Table in MySQL Workbench Graphically

Right-click on 'tables', select 'create table', and define columns with names, data types, and constraints.

7
New cards

PK Meaning

Stands for primary key; ensures that every row has a unique value in this column.

8
New cards

Not Null Constraint

Specifies that a column cannot contain null values (i.e., it cannot be empty).

9
New cards

Unique Constraint

Ensures that all values in a column are unique.

10
New cards

Auto Increment

Tells MySQL to automatically generate a unique, incrementing value for a column.

11
New cards

Creating a Table with SQL

Use the CREATE TABLE statement, defining each column with its name, data type, and constraints.

12
New cards

Modifying Table Structure

Use the ALTER TABLE statement to add, rename, or change columns.

13
New cards

Importance of Primary Keys

Used to uniquely identify each row in a table and to establish relationships with other tables.

14
New cards

Foreign Key Definition

A primary key of one table that is linked in a different table.

15
New cards

Value of Primary and Foreign Keys

Essential for keeping a database normalized and maintaining data integrity.

16
New cards

Database Models

Contain all structural information about a database. Includes: tables, views, functions, and relationships between the tables but no data.

17
New cards

Reverse Engineering

Using MySQL Workbench to create a database model from an existing database.

18
New cards

EER Diagram

Stands for entity relationship diagram, a visual representation of tables and their relationships within a database.

19
New cards

Bulk Data Loading

Use the Table Data Import Wizard to load data from a file (e.g., CSV) into a table or load files containing SQL statements.

20
New cards

Data Import Wizard

Tool in MySQL Workbench to automatically load bulk data from files.

21
New cards

Loading SQL Files

Execute all commands in a file containing SQL statements to rapidly create database structures and insert data.

22
New cards

Data Order Import Importance

Must import data that the foreign key refers to before you can add data to a foreign key column otherwise there will be a foreign key constraint error.