Enter password: Welcome to the Mysql monitor. Commands end with; or \g


Download 1.38 Mb.
bet1/4
Sana16.06.2023
Hajmi1.38 Mb.
#1490311
  1   2   3   4
Bog'liq
restaran


Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.1.51-community MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.


This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| shop |
| test |
+--------------------+
4 rows in set (0.00 sec)

mysql> create database restaran;


Query OK, 1 row affected (0.00 sec)

mysql> show databases;


+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| restaran |
| shop |
| test |
+--------------------+
5 rows in set (0.00 sec)

mysql> use restaran;


Database changed
mysql> create table menyu
-> ( m_id int(7) primary key,
-> menyu_identifikatori varchar(25) not null,
-> food_id int(7) not null,
-> tafsilotlari varchar(25) not null);
Query OK, 0 rows affected (0.01 sec)

mysql> show tables;


+--------------------+
| Tables_in_restaran |
+--------------------+
| menyu |
+--------------------+
1 row in set (0.00 sec)

mysql> desc menyu;


+----------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------------+-------------+------+-----+---------+-------+
| m_id | int(7) | NO | PRI | NULL | |
| menyu_identifikatori | varchar(25) | NO | | NULL | |
| food_id | int(7) | NO | | NULL | |
| tafsilotlari | varchar(25) | NO | | NULL | |
+----------------------+-------------+------+-----+---------+-------+
4 rows in set (0.01 sec)
mysql> create table tranzaksiya_xisoboti
-> ( tx_id int(7) primary key,
-> tranzaksiya_data date not null,
-> ekipaj_id int(7) not null,
-> mijoz_id int(7) not null,
-> muyurtma_identifikatsiyasi varchar(25) not null,
-> hisobot_sana date not null);
Query OK, 0 rows affected (0.01 sec)

mysql> desc tranzaksiya_xisoboti;


+----------------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------------------+-------------+------+-----+---------+-------+
| tx_id | int(7) | NO | PRI | NULL | |
| tranzaksiya_data | date | NO | | NULL | |
| ekipaj_id | int(7) | NO | | NULL | |
| mijoz_id | int(7) | NO | | NULL | |
| muyurtma_identifikatsiyasi | varchar(25) | NO | | NULL | |
| hisobot_sana | date | NO | | NULL | |
+----------------------------+-------------+------+-----+---------+-------+
6 rows in set (0.01 sec)

mysql> create table buyurtma_tafsilotlari


-> ( bt_id int(7) primary key,
-> ekipaj_id int(7) not null,
-> mijoz_id int(7) not null,
-> food_id int(7) not null,
-> sana date not null,
-> xolat int(7) not null);
Query OK, 0 rows affected (0.01 sec)

mysql> desc buyurtma_tafsilotlari;


+-----------+--------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------+------+-----+---------+-------+
| bt_id | int(7) | NO | PRI | NULL | |
| ekipaj_id | int(7) | NO | | NULL | |
| mijoz_id | int(7) | NO | | NULL | |
| food_id | int(7) | NO | | NULL | |
| sana | date | NO | | NULL | |
| xolat | int(7) | NO | | NULL | |
+-----------+--------+------+-----+---------+-------+
6 rows in set (0.01 sec)
mysql> create table ekipaj
-> (e_id int(7) primary key,
-> nomi varchar(25) not null,
-> aloqa int(7) not null,
-> manzil varchar(25) not null,
-> foydalanuvchi_nomi varchar(25) not null,
-> parol int(7) not null);
Query OK, 0 rows affected (0.01 sec)

mysql> desc ekipaj;


+--------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------------+-------------+------+-----+---------+-------+
| e_id | int(7) | NO | PRI | NULL | |
| nomi | varchar(25) | NO | | NULL | |
| aloqa | int(7) | NO | | NULL | |
| manzil | varchar(25) | NO | | NULL | |
| foydalanuvchi_nomi | varchar(25) | NO | | NULL | |
| parol | int(7) | NO | | NULL | |
+--------------------+-------------+------+-----+---------+-------+
6 rows in set (0.01 sec)

mysql> create table tolov


-> (t_id int(7) primary key,
-> maxsus_id int(7) not null,
-> buyurtma_identifikatori varchar(25) not null,
-> yetkazib_beruvchi_id int(7) not null,
-> miqdori int(7) not null,
-> sanasi date not null);
Query OK, 0 rows affected (0.01 sec)

mysql> desc tolov;


+-------------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------------+-------------+------+-----+---------+-------+
| t_id | int(7) | NO | PRI | NULL | |
| maxsus_id | int(7) | NO | | NULL | |
| buyurtma_identifikatori | varchar(25) | NO | | NULL | |
| yetkazib_beruvchi_id | int(7) | NO | | NULL | |
| miqdori | int(7) | NO | | NULL | |
| sanasi | date | NO | | NULL | |
+-------------------------+-------------+------+-----+---------+-------+
6 rows in set (0.01 sec)

mysql> create table oziq_ovqat_malumotlari


-> (oo_id int(7) primary key,
-> narxi int(7) not null,
-> xolati varchar(25) not null,
-> nomi varchar(25) not null);
Query OK, 0 rows affected (0.01 sec)

mysql> desc oziq_ovqat_malumotlari;


+--------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+-------------+------+-----+---------+-------+
| oo_id | int(7) | NO | PRI | NULL | |
| narxi | int(7) | NO | | NULL | |
| xolati | varchar(25) | NO | | NULL | |
| nomi | varchar(25) | NO | | NULL | |
+--------+-------------+------+-----+---------+-------+
4 rows in set (0.01 sec)

mysql> create table mijoz


-> (m_id int(7) primary key,
-> nomi varchar(25) not null,
-> aloqa int(7) not null,
-> manzil varchar(25) not null,
-> foydalanuvchi_nomi varchar(25) not null,
-> parol int(7) not null);
Query OK, 0 rows affected (0.01 sec)

mysql> desc mijoz;


+--------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------------+-------------+------+-----+---------+-------+
| m_id | int(7) | NO | PRI | NULL | |
| nomi | varchar(25) | NO | | NULL | |
| aloqa | int(7) | NO | | NULL | |
| manzil | varchar(25) | NO | | NULL | |
| foydalanuvchi_nomi | varchar(25) | NO | | NULL | |
| parol | int(7) | NO | | NULL | |
+--------------------+-------------+------+-----+---------+-------+
6 rows in set (0.01 sec)

mysql> create table yetkazib_berish


-> (yb_id int(7) primary key,
-> sanasi date not null,
-> buyurtma_id int(7) not null);
Query OK, 0 rows affected (0.01 sec)

mysql> desc yetkazib_berish;


+-------------+--------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------+------+-----+---------+-------+
| yb_id | int(7) | NO | PRI | NULL | |
| sanasi | date | NO | | NULL | |
| buyurtma_id | int(7) | NO | | NULL | |
+-------------+--------+------+-----+---------+-------+
3 rows in set (0.01 sec)

mysql> show tables;


+------------------------+
| Tables_in_restaran |
+------------------------+
| buyurtma_tafsilotlari |
| ekipaj |
| menyu |
| mijoz |
| oziq_ovqat_malumotlari |
| tolov |
| tranzaksiya_xisoboti |
| yetkazib_berish |
+------------------------+
8 rows in set (0.00 sec)

mysql>


Download 1.38 Mb.

Do'stlaringiz bilan baham:
  1   2   3   4




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling