Muhammad al-xorazmiy nomidagi toshkent axborot texnologiyalari universiteti mustaqil-1-2-3-4-5


Download 131.16 Kb.
bet1/7
Sana31.01.2024
Hajmi131.16 Kb.
#1818316
  1   2   3   4   5   6   7
Bog'liq
Afzalbek (1)


O‘ZBEKISTON RESPUBLIKASI RAQAMLI TEXNOLOGIYALAR VAZIRLIGI

MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKENT AXBOROT TEXNOLOGIYALARI UNIVERSITETI


Mustaqil-1-2-3-4-5


Guruh: DBM001-1
Fan nomi: Ma’lumotlar bazasini boshqarish
Bajardi: Abdurapirov Afzalbek
Tekshirdi: Gaipnazarov Rustam Taxiritdinovich

Toshkent 2023


Mavzu :

POstgresql




Next tugmasini bosib, o`rnatishni boshlaymiz.

Bu yerda biz yuklagan postgresql 15 versiyasi ekanligi ko`rinadi. Yana next tugmasini bosamiz.

Va bizga postgresql da kerak bo`ladigan kompanentalari ko`rinadi, biz yana next tugmasini bosamiz.



Bu yerda esa biz postgresql ga kirishimiz uchun maxfiy kod qo`yamiz.


Bu yerda esa qaysi portda ishlashi keltirilgan biz yana next ni bosamiz.

Bu yerda next tugmasini bosibkeyingi jarayonga o`tishni tasdiqlaymiz.

Yana next tugmasini bosibkeyingi jarayonga o`tishni tasdiqlaymiz.

So`ngra yakuniy jarayon next tugmasini postgresql ni o`rnatish jarayoni ishga tushadi.

Bu yerda postgresql ni muvaffaqiyatli o`natilgani ko`rinib turadi.


Keyingi jarayon esa biz yuqorida ko`rgan postgresqlni pgAdmin 4 kompanentasi orqali ishlaymiz.


Biz pgAdmin 4 ga yuqoridagi parolimiz orqali kiramiz.

Bu yerda postgresql ni sever qismi keltirilgan.

Bu yerda postgresql ni sever qismi va uning qaysi versiya ekanligi keltirilgan.

Bu yerda esa postgresql ni sxemalar bo`limi keltirilgan biz bub o`lim orqali table lardan foydalanishimiz mumkin.


Development database

ProductName

ProductID

SupplierID

SupplierName








Price DECIMAL

Description

ContactPerson



Email



StockQuantity

Phone



ExpiryDate

Address



SupplierID SupplierIDnse

ProductType


Suppliers

Products


N 1
M



Orders

Warehouses
M




CustomerName

OrderID

WarehouseID


OrderDate

Location


TotalAmount DECIMAL

Capacity


ContactPerson


Phone

DeliveryAddress


WarehouseID


Email


-- Create the database
CREATE DATABASE IF NOT EXISTS LibrarySystem;
USE LibrarySystem;

-- Create the Regions table
CREATE TABLE Regions (
region_id INT PRIMARY KEY,
region_name VARCHAR(50),
location VARCHAR(100),
contact_number VARCHAR(15),
email VARCHAR(100)
);

-- Create the Libraries table
CREATE TABLE Libraries (
library_id INT PRIMARY KEY,
library_name VARCHAR(100),
region_id INT,
address VARCHAR(100),
contact_number VARCHAR(15),
email VARCHAR(100),
FOREIGN KEY (region_id) REFERENCES Regions(region_id)
);

-- Create the Books table
CREATE TABLE Books (
book_id INT PRIMARY KEY,
title VARCHAR(100),
author VARCHAR(100),
genre VARCHAR(50),
publication_year INT,
available_copies INT,
library_id INT,
FOREIGN KEY (library_id) REFERENCES Libraries(library_id)
);

-- Create the Members table
CREATE TABLE Members (
member_id INT PRIMARY KEY,
first_name VARCHAR(50),
last_name VARCHAR(50),
address VARCHAR(100),
contact_number VARCHAR(15),
email VARCHAR(100),
library_id INT,
FOREIGN KEY (library_id) REFERENCES Libraries(library_id)
);

-- Create the Loans table
CREATE TABLE Loans (
loan_id INT PRIMARY KEY,
book_id INT,
member_id INT,
loan_date DATE,
return_date DATE,
FOREIGN KEY (book_id) REFERENCES Books(book_id),
FOREIGN KEY (member_id) REFERENCES Members(member_id)
);

Download 131.16 Kb.

Do'stlaringiz bilan baham:
  1   2   3   4   5   6   7




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