database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
ㆍPostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
PostgreSQL Devel 3536 게시물 읽기
No. 3536
PostgreSQL 응용프로그램 작성하기 (III)
작성자
정재익(advance)
작성일
2001-10-18 10:11
조회수
11,005
첨부파일: node2.html (10,785bytes)

데이터베이스로 접근하기

 

번역 : 정재익

원본출처 : http://www.ca.postgresql.org/docs/momjian/writing_apps/node2.html

 

좌측의 그림은 응용 프로그램들이 어떻게 데이터베이스와 통신 하는가에 대해 설명해 놓은 것이다:

 

Libpq 는 응용프로그램이 데이터베이스와 통신할수 있도록 해 주는 POSTGRESQL 용 C 라이브러리이다. libpq 를 사용하는 방법은 상당히 단순하다:

 

o 데이터베이스로 접근하기 위하여 libpq 함수를 호출
o 연결핸들 을 받는다 (PGconn) 
o 질의를 전달한다
  . 질의를 전달할때 연결핸들을 이용한다.
  . 결과핸들을 받는다 (PGresult) 
  . 결과를 조회한다
o 만약 원한다면 추가적인 질의를 전달한다
o 데이터베이스 핸들을 닫는다.

 

Accessing the Database

 

The following figure illustrates how applications communicate to the database:

 

[Figure of top left]

 

Libpq is the POSTGRESQL C library that allows applications to communicate with the database.

Using libpq is a fairly straightforward process:

 

o Call a libpq function to connect to the database 
o Receive a connection handle (PGconn) 
o Issue a query 
  . Use the connection handle to issue a query 
  . Receive a result handle (PGresult) 
  . Access the result 
o Issue more queries if desired 
o Close the database connection 


[Top]
No.
제목
작성자
작성일
조회
4165plpython 이용하기 + full text index
김상기
2002-04-25
12156
3544PostgreSQL 응용 프로그램 작성하기 (V)
정재익
2001-10-18
13096
3537PostgreSQL 응용 프로그램 작성하기 (IV)
정재익
2001-10-18
11846
3536PostgreSQL 응용프로그램 작성하기 (III)
정재익
2001-10-18
11005
3522PostgreSQL 응용 프로그램 작성하기 (II)
정재익
2001-10-17
11234
3521PostgreSQL 응용 프로그램 작성하기 (I)
정재익
2001-10-17
13437
3513Technical Documents for PostgreSQL [1]
정재익
2001-10-16
10767
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2023 DSN, All rights reserved.
작업시간: 0.049초, 이곳 서비스는
	PostgreSQL v16.1로 자료를 관리합니다