본문 바로가기

Back-end & Server/Django

[Django] DB서버 연결

728x90
반응형

Django는 여러 데이터베이스 서버를 지원하며 공식적으로 PostgreSQL, MySQL, Oracle 및 SQLite를 지원함

  • PostgreSQL : postgresql_psycopg2 패키지가 필요
 

PostgreSQL driver for Python — Psycopg

© Copyright 2010—2021 by Daniele Varrazzo (at gmail), The Psycopg Team.

www.psycopg.org

 

 

PostgreSQL

The world's most advanced open source database.

www.postgresql.org

 

  • MySQL(or MariaDB) : MySQL-python 패키지가 필요
 

mysqlclient

Python interface to MySQL

pypi.org

 

  • Oracle : cx_Oracle 사본이 필요함
 

cx_Oracle - Python Interface for Oracle Database

Features Easily installed from PyPI. Support for Python 3.6 and higher. Older versions of cx_Oracle may be used with previous Python releases. Support for Oracle Client 11.2, 12, 18, 19 and 21. Oracle's standard cross-version interoperability, allows easy

oracle.github.io

 

  • SQLite : 따로 설치가 필요하지 않음
 

Django

The web framework for perfectionists with deadlines.

docs.djangoproject.com

 

  • 비공식적인 다른 회사의 DB 서버를 사용하는 경우 : 각 회사의 공식 문서를 참조 
 

Django

The web framework for perfectionists with deadlines.

docs.djangoproject.com

728x90
반응형

'Back-end & Server > Django' 카테고리의 다른 글

[Django] 보안  (0) 2023.02.06
[Django] 미들웨어(Middleware)  (0) 2023.02.06
[Django] 캐시 프레임워크  (0) 2023.02.04
[Django] 비 HTML 콘텐츠와 세션  (0) 2023.02.01
[Django] 배포  (0) 2023.01.31