Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
14 views

Python 2 - P6-2 - Database & Postgresql

The document discusses how to create a database and tables in PostgreSQL to store customer account and transactional data for a bank. It explains that developers would need to set up PostgreSQL, create databases and tables, and add customer data to the tables. This would allow the bank to store thousands of customer accounts, their information, transactions, and run queries to obtain information like accounts with balances over 100 million or customers living in Hanoi.

Uploaded by

Tuấn Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Python 2 - P6-2 - Database & Postgresql

The document discusses how to create a database and tables in PostgreSQL to store customer account and transactional data for a bank. It explains that developers would need to set up PostgreSQL, create databases and tables, and add customer data to the tables. This would allow the bank to store thousands of customer accounts, their information, transactions, and run queries to obtain information like accounts with balances over 100 million or customers living in Hanoi.

Uploaded by

Tuấn Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

PYTHON 2

TS. NGUYỄN HOÀNG LONG


BỘ MÔN TIN HỌC TRẮC ĐỊA
0916666384
nguyenhoanglong@humg.edu.vn
BANK

10 triệu

= 20
10 triệu
LongBIDVACCOUNT
ISSUES

What will the devopers have to do if


the Bank have thousands of
customers’ accounts

What will the devopers have to do if


the Bank wants to store and manage
their customers’ information

What will the devopers have to do if


the Bank want to know which
accounts have more than 100 million
ISSUES

What will the devopers have to do if


the Bank want to know the total of
money in their Bank

What will the devopers have to do if


the Bank wants to know the number
of their customer living in Hanoi

What will the devopers have to do if


the Bank wants to know ….
DATABASE
• A database is an organized
collection of structured
information, or data, typically
stored electronically in a computer
system.
• A database is usually controlled by
a database management system
(DBMS).
POSTGRESQL
• PostgreSQL is a powerful, open source
object-relational database system.
• It has more than 15 years of active
development and a proven architecture that
has earned it a strong reputation for
reliability, data integrity, and correctness.
• PostgreSQL runs on all major operating
systems, including Linux, UNIX and
Windows.
DOWNLOAD POSTGRESQL
INSTALL POSTGRESQL
SETUP PASSWORD
START POSTGRESQL
PGADMIN GUI
CREATE NEW SERVER
CREATE NEW SERVER
CREATE NEW SERVER
CREATE NEW SERVER
CREATE A NEW DATABASE
CREATE DATABASE
CREATE DATABASE
DATA TABLE
• Tables are database objects that contain all the data
in a database. STT Mã sinh viên Họ và tên SV Ngày sinh SĐT

• In tables, data is logically organized in a row-and- 1 1821050756 Phạm Thế 14/08/2000 0868799158
2 1821050183 Nguyễn Tiến 27/08/2000 0376421411
column format similar to a spreadsheet. 3 1821050538 Nguyễn Tiến 10/10/2000
4 1821050467 Lê Tiến 12/09/2000 0987864852
• Each row represents a unique record, and each 5 1821050942 Cao Văn 16/09/2000 0338811658
column represents a field in the record 6 1821050479 Nguyễn Thị Mỹ 26/03/2000 0335366382
7 1821050714 Nguyễn Minh 27/06/2000 0967488027
• A table has a specified number of columns, but can
have any number of rows
• Users can Create, Read, Update and Delete
(CRUD) data in data table.
CREATE NEW TABLE
CREATE NEW TABLE
CREATE NEW TABLE
CREATE NEW TABLE
ADD DATA INTO TABLE
ADD DATA INTO TABLE

You might also like