[Python] PostgreSQL ์ฐ๋ํ๊ธฐ
ํ์ด์ฌ์์ postgresql์ ์ฐ๊ฒฐํด์ ์์ ๋ฐ ํ์ ๋ฑ์ ์ํํ ์ ์๊ฒ ํด๋ณด์.
๋น์ฐํ ํ์ด์ฌ๊ณผ postgreSQL์ด ๊น๋ ค์์ด์ผ ํ๋ค.
์์ผ๋ฉด ๊น๋๋ก ํ๋ค.
https://www.python.org/downloads/
https://blog.naver.com/sssang97/221798954518
๊ฐ์ฅ ๋จผ์ ํด์ผํ ๊ฑด... ๋น์ฐํ postgres ์ฐ๋์ ์ฌ์ฉํ ์ฐ๋์ฉ ๋ชจ๋์ ์ค์นํ๋ ๊ฒ์ด๋ค.
์ด๋ฆ์ psycopg2๋ค.

๊ทธ๋ฆฌ๊ณ postgres์๋ ํ ์คํธ์ฉ db์ ํ ์ด๋ธ, ๋ด์ฉ๋ฌผ์ ๋ง๋ค์ด๋๋ค.
postgres๋ mysql๊ณผ ๋ค๋ฅด๊ฒ ์์กด์ฑ ์ด์๊ฐ ์๋ ๊ฒ ๊ฐ๋ค.
๊ทธ๋ผ ์ด์ ์ฝ๋๋ฅผ ์์ฑํด๋ณด์.
๋จผ์ ๋ฐฉ๊ธ ๊น ๋ชจ๋์ ํฌํจํ๋ค.

๋ฐ์ดํฐ๋ฒ ์ด์ค์ ์ฐ๊ฒฐ์ ์ ๋ชจ๋ ๋ด์ connect๋ผ๋ ํจ์๋ก ์ํํ ์ ์๋๋ฐ,
์ด๊ฑด ๋ฌธ์์ด๋ก ์ฐ๊ฒฐ์ ํ์ํ ์ ๋ณด๋ฅผ ์ ๋ฌ๋ฐ๊ณ ์ฐ๊ฒฐ์ ๊ด๋ฆฌํ๋ ๊ฐ์ฒด๋ฅผ ๋ฐํํ๋ค.

์ ๊ทธ๋ผ ์ด์ , ์ ์ฐ๊ฒฐ์์ ์ปค์๋ฅผ ๋ฝ์๋ด๊ณ , ๊ทธ๊ฑธ๋ก ์ฐ์ฐ์ ์ํํ๋ฉด ๋๋ค.

๊ทธ๋ผ ๊ธฐ๋ํ ๋๋ก ์ ๋์ํ ๊ฒ์ด๋ค.

์ด ๋ชจ๋๋ mysql ๋ชจ๋ ๋ฑ๊ณผ ๋ง์ฐฌ๊ฐ์ง๋ก ํ์ด์ฌ์ DB API๋ฅผ ์ถฉ์คํ๊ฒ ๋ฐ๋ฅธ๋ค. ์ฐ๋ ๋ฒ์ ๊ฑฐ์ ๋๊ฐ๋ค๋ ๋ง์ด๋ค.
๋ ์์ธํ ๊ธฐ๋ฅ์ด๋ ์ธํฐํ์ด์ค๋ค์ ํ์ด์ฌ์ ํ์ค db api๋ค์ ๋ค๋ฃฌ ๋ฌธ์๋ ํฌ์คํธ ๋ฑ์ ์ฐธ์กฐํ๋ฉด ๋๋ค.
https://www.firebirdsql.org/file/documentation/drivers_documentation/python/3.3.0/Python-DB-API-2.0.html
https://www.python.org/dev/peps/pep-0249/
์ฐธ์กฐ
https://www.tutorialspoint.com/python/python_database_access.htm