Amaliy matematika va intellektual texnologiyalar fakulteti



Download 1,55 Mb.
bet3/5
Sana04.02.2022
Hajmi1,55 Mb.
#430181
1   2   3   4   5
Bog'liq
sardor

create table users
(b
id number primary key,
name varchar2(250),
email varchar2(250),
password varchar2(250)
)

create table role
(
id number primary key,
name varchar2(250)
)

create table category
(
id number primary key,
name varchar2(250),
slug varchar2(250)
)
create table role_user
(
id number primary key,
user_id number,
role_id number,
CONSTRAINT fuser FOREIGN KEY (user_id)REFERENCES users(id),
CONSTRAINT frole FOREIGN KEY (role_id)REFERENCES role(id)
)

create table product
(
id number primary key,
name varchar2(250),
price number,
quantity number,
discount number,
description varchar2(250),
image varchar2(250),
images varchar2(250),
status NUMBER(1) DEFAULT 0,
slug varchar2(250),
category_id number,
CONSTRAINT fk_category FOREIGN KEY (category_id)REFERENCES category(id)
)

create table wishlist
(
id number primary key,
user_id number,
product_id number,
CONSTRAINT fk_user FOREIGN KEY (user_id)REFERENCES users(id),
CONSTRAINT fk_product FOREIGN KEY (product_id)REFERENCES product(id)
)

create table cart
(
id number primary key,
user_id number,
product_id number,
quantity number,
price number,
status NUMBER(1) DEFAULT 0,
CONSTRAINT fkk_user FOREIGN KEY (user_id)REFERENCES users(id),
CONSTRAINT fkk_product FOREIGN KEY (product_id)REFERENCES product(id)
)

create table orders
(
id number primary key,
all_price number,
start_date date,
end_date date,
delivery_price number,
status NUMBER DEFAULT 0,
payment_type varchar2(100),
user_id number,
first_name varchar2(250),
last_name varchar2(250),
phone varchar2(30),
address varchar2(300),
CONSTRAINT fkkuser FOREIGN KEY (user_id)REFERENCES users(id)
)

create table orderdetail
(
id number primary key,
user_id number,
product_id number,
order_id number,
quantity number,
price number,
r_status NUMBER(1) DEFAULT 0,
CONSTRAINT fkk_userss FOREIGN KEY (user_id)REFERENCES users(id),
CONSTRAINT fk_products FOREIGN KEY (product_id)REFERENCES product(id),
CONSTRAINT fk_orders FOREIGN KEY (order_id)REFERENCES orders(id)
)
create table review
(
id number primary key,
user_id number,
rating number,
comments varchar2(250),
order_detail_id number,
CONSTRAINT fk_uuser FOREIGN KEY (user_id)REFERENCES users(id),
CONSTRAINT fk_order_detail_id FOREIGN KEY (order_detail_id)REFERENCES orderdetail(id)
)

Download 1,55 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5




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

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish