Tech You Database🀞



This content originally appeared on DEV Community and was authored by Farhad Rahimi Klie

** What is Database ? **
database is the storage or base of data you can store your important documents, or others things in single and digital place that is called Database.
** Example **
You Run the Restaurant ok. in Restaurant you have a employees list with full information right. and orders list, and payments details. you already write it on your phone, excel sheet, or Notebook right. so you can reduce your work and save and store your all Employees data, orders data and payments all data in one Place and That Place Called Database. I’m Right or Not ?.

** How Use Database ? **
if you want to use database in very effective and optimal way then this Article is for You.
So let’s get Started ->

Going Step by Step 🚶‍♂ 🚶‍♀
1 – first of all you should pick a one DBMS(Database Management System) for Storing and managing your data like(MySQL, PostgreSQL, MongoDB, Oracle, Cassandra Apache, SQLite).
2 – next Download it from there Official Websites.
3 – then simpily install like a game install.
4 – and use it (create database, create tables, store data inside your database).

for Example you pick MySQL 🐬 ok.
link of MySQL database Download MySQL Database here.

MySQL Installation
Image description
Image descriptionImage description

** Create Database **

create database restaurant;

** Create Tables **

CREATE TABLE restaurant (
  id INT PRIMARY KEY,
  employee_name VARCHAR(100),
  employee_salary DOUBLE,
  age INT
);

** Insert Data into restaurant table**

INSERT INTO restaurant (id, employee_name, employee_salary, age) VALUES
(1, 'Ali Reza', 3500.50, 29),
(2, 'Sara Ahmadi', 4200.00, 34),
(3, 'Reza Moradi', 3800.75, 31),
(4, 'Mina Hosseini', 4000.00, 27),
(5, 'Omid Karimi', 3600.25, 30);

** Update data **

UPDATE restaurant
SET employee_salary = 4000.00
WHERE id = 3;

Delete Data

DELETE FROM restaurant
WHERE id = 5;

So This is the main part of Database Usage hope you enjoy it.

Pov : My English isn’t perfect yet, but that won’t stop me. I’m learning every day, and I will master it soon!


This content originally appeared on DEV Community and was authored by Farhad Rahimi Klie