manipulasi DBMS dari CMD part- 1
Summary
TLDRThis tutorial walks through how to access and manage MySQL databases using Command Prompt (CMD). It covers the basic steps such as navigating directories, accessing MySQL, and performing common SQL operations. Users will learn how to create, drop, and select databases, as well as create and manipulate tables using commands like `CREATE`, `SHOW`, `ALTER`, and `DROP`. The video also explains how to add, delete, and update columns in tables, and troubleshoot common SQL errors, providing a clear and practical guide for beginners learning to interact with MySQL databases.
Takeaways
- 😀 The script introduces how to access ex-PP (Examinations PP) via the Command Prompt (CMD).
- 😀 It explains the use of the 'cd' command in CMD to navigate between directories and locate important files.
- 😀 The 'dir' command is used to display the list of files and directories in the current location.
- 😀 MySQL is introduced as a tool to manage databases using commands like 'show databases' to display all available databases.
- 😀 To create a new database in MySQL, the 'CREATE DATABASE' command is used, followed by the database name.
- 😀 The 'DROP DATABASE' command is used to delete a database, but once deleted, the database cannot be recovered.
- 😀 The 'CREATE TABLE' command is demonstrated to create a table within a database, specifying columns and data types.
- 😀 Primary keys are explained as a means to ensure that certain fields, like ID, cannot be left empty in the table.
- 😀 The 'ALTER TABLE' command is used to add new columns to an existing table, with examples of how to add a 'alamat' (address) column.
- 😀 The 'DROP COLUMN' command is shown to delete a column from a table, demonstrating how to remove unnecessary fields.
- 😀 Various MySQL commands such as 'SHOW TABLES' and 'SELECT' are mentioned as tools for viewing and manipulating table data.
Q & A
What is the purpose of the tutorial in this video?
-The tutorial explains how to access and manage MySQL databases using the Command Prompt (CMD), including basic commands like creating and deleting databases, creating tables, and manipulating data.
What is the first command used to access MySQL from CMD?
-The first command used to access MySQL from CMD is `mysql -u root -p`, which logs the user into MySQL as the root user and prompts for a password.
What does the `SHOW DATABASES;` command do in MySQL?
-`SHOW DATABASES;` is used to display a list of all databases available in the MySQL system.
How can a new database be created in MySQL?
-A new database can be created using the `CREATE DATABASE` command. For example, `CREATE DATABASE aplikasi_latihan;` creates a database named 'aplikasi_latihan'.
What is the `DROP DATABASE` command used for?
-`DROP DATABASE` is used to permanently delete a database. For example, `DROP DATABASE aplikasi_latihan;` will remove the 'aplikasi_latihan' database.
How do you create a new table in a database?
-A new table can be created using the `CREATE TABLE` command. For example, the command `CREATE TABLE pengguna (ID INT, nama VARCHAR(255), email VARCHAR(100), nomor_hp VARCHAR(15), PRIMARY KEY (ID));` creates a table called 'pengguna'.
What is the significance of the `PRIMARY KEY` in a table?
-The `PRIMARY KEY` is used to uniquely identify each record in a table. It ensures that the column(s) containing the primary key will not contain duplicate or NULL values.
What does the `SHOW TABLES;` command do?
-`SHOW TABLES;` is used to display all the tables present in the current selected database.
How can a column be added to an existing table?
-A column can be added to an existing table using the `ALTER TABLE` command. For example, `ALTER TABLE pengguna ADD COLUMN alamat TEXT;` adds a new column called 'alamat' to the 'pengguna' table.
What is the function of the `DROP COLUMN` command?
-The `DROP COLUMN` command is used to delete a column from an existing table. For example, `ALTER TABLE pengguna DROP COLUMN alamat;` removes the 'alamat' column from the 'pengguna' table.
Outlines
Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.
Mejorar ahoraMindmap
Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.
Mejorar ahoraKeywords
Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.
Mejorar ahoraHighlights
Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.
Mejorar ahoraTranscripts
Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.
Mejorar ahora5.0 / 5 (0 votes)