0

I want to know that if multi-users try to access same database for insert or retrieve data via my python program, do they all need to install PostgreSQL in their computers? How this process works?

2
  • 1
    Normally a database is hosted on a single server and accessible to multiple users on the network. If your GUI interface is webbased, they likely need nothing. Otherwise you just give them your program (and the needed privileges for your database server). Commented Mar 15, 2016 at 23:03
  • How is your python program communicating with the postgresql database? Commented Mar 16, 2016 at 0:02

2 Answers 2

2

If the database is located on another server, then no, clients don't have to install postgresql. They will need to install a postgresql adapter, like psycopg, so that python can communicate with the database, and most applications choose to use some type of ORM, like sqlalchemy, on top of the database adapter to make communication with the database more object-oriented and pythonic.

Sign up to request clarification or add additional context in comments.

3 Comments

I won't use another server. I want to use postgresql server. But one more thing confuses my mind. How this different computers can work with the same database. I know that computers must connect with the server and database must in the server. Which python code that i'll write for the program , can achieve this? Which way the computers connect the same database at postgre server via python program? I can not imagine and understand this part. Sorry but i really did not find this answer and i need to ask people like you.
Actually I know how to use sqlite3 but i use it for only local things and this thing is very different to me. I now searching ORM thing. hope understand
Both the python libraries I referenced in the answer allow you to provide a host and port number to connect to the database. If the database is on another machine, you just use that host and port number.
2

If you use psycopg2, it already comes with lipq DLL, the library used to communicate with PostgreSQL through TCP.

Actually, psycopg2 is a wrapper for libpq: http://initd.org/psycopg/docs/

Therefore, you won't need to install PostgreSQL server binaries in the client workstations.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.