Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Операції з екземпляром бази даних | Управління RDS
Вступ до Хмарних Обчислень

book
Операції з екземпляром бази даних

This will be a short chapter where I'll show you that even the simplest SQL commands work perfectly fine with a cloud database. Let's, for example, create two tables that will store user phone numbers and a table that will store descriptions of various products.

To do this, open our MySQL Workbench, connect to our cloud database, and create a database for our tutorial:

Here’s the command to create a database:

sql
CREATE DATABASE CodefinityGuideDatabase
sql
CREATE DATABASE CodefinityGuideDatabase

Щоб створити таблицю product_descriptions:

sql
CREATE TABLE product_descriptions (
product_id INT AUTO_INCREMENT PRIMARY KEY,
product_name VARCHAR(255) NOT NULL,
description TEXT
);

Також давайте вставимо деякі випадкові дані в ці таблиці, щоб вони не були порожніми.

user_phones:

sql
INSERT INTO user_phones (user_name, phone_number) VALUES
('John Doe', '+1234567890'),
('Jane Smith', '+0987654321');

product_descriptions:

sql
INSERT INTO product_descriptions (product_name, description) VALUES
('Smartphone', 'High-end smartphone with a large screen and advanced camera.'),
('Laptop', 'Portable computer suitable for personal and professional use.');

Thus, we've created a database and two tables in our cloud database. Now, anyone can connect to this database and retrieve the necessary data, or insert new data, and so on.

Let's check if everything is done correctly and retrieve all the information from the user_phones and product_descriptions tables:

Thus, we've created a database and two tables in our cloud database. Now, anyone can connect to this database and retrieve the necessary data, or insert new data, and so on.

Let's check if everything is done correctly and retrieve all the information from the user_phones and product_descriptions tables:

Thus, we've created a database and two tables in our cloud database. Now, anyone can connect to this database and retrieve the necessary data, or insert new data, and so on.

Let's check if everything is done correctly and retrieve all the information from the user_phones and product_descriptions tables:

And the second one:

We created the necessary database and also created and populated two tables in this database. We did this in order to connect to these databases from our EC2 instance in the next chapter, see that the data is stored in the cloud, and retrieve this data from the EC2 instance.

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 4. Розділ 4

Запитати АІ

expand
ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

some-alt