0

Hello I am creating a small program on Python with the cx_oracle module which allows me to connect to my Oracle database on my Computer. However I would like to send it to a friend and therefore I would like him to be able to handle the same database as me. So I thought of an embeddable database (a bit like a file on SQLite) but with Oracle I did not find such a possibility. I would like to know if there is a way to do it with Oracle or if I am forced to connect to a local database.

2
  • You can easily create an Oracle Cloud database (for no cost, if you decide that the free tier works for you). You and your friend can connect to it. See oracle.com/database/technologies/appdev/python/… Commented Jan 8, 2022 at 23:27
  • Oracle have no embedding options. You need either different DBMS with embedded version or use central DB server (your local/hosted/cloud) with Oracle software installed. But why do you need Oracle for your app? It it too heavy for local app Commented Jan 16, 2022 at 15:16

1 Answer 1

1

First of all, you can export and import Oracle databases, which would help you a lot at the initial sharing. However, if you share your database with a friend and both of you are working on the same database but with different copies, then the two databases will eventually diverge from each other, with ever greater impact. So, you will need to consider your options carefully:

Using a central server

You could use a central server (which could be a remote server or even your computer if you apply port forwarding), ensure that both you and your friend are connected to that database and then both your and his changes will automatically be applied to the same database, without copies.

Versioned dumps

You could use a versioning tool, like git to store the versions of your database dump/structure/data and both you and your friend could use this, maybe storing the versions in a central repositories, so you would not need to send and communicate your database changes again and again. This would ensure schema and data synchronization, albeit you will have frequent merge conflicts and other merge-related problems.

Versioned scripts

You and your friend could write versioned scripts. This would apply on structural changes, so your and your friend's test data would diverge, but the structure would not.

Migration scripts

Some ORMs have automatically generated migration scripts and one can go forwards or backwards some levels. I do not particularly like the idea of automatically generated change scripts, but it is certainly a possible solution.

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

2 Comments

First of all thank you very much for your reply. I would like to know there would be there not a way to make the application completely autonomous (which can work even on a machine without Oracle) because if I understood correctly it is necessary that my friend already has Oracle on his machine .Secondly, if it is not possible to make the application completely autonomous, I also think of your first solution which consists of transforming your pc into a server but I have not really found how to proceed. Sorry for the inconvenience again.
@MachkourOke you cannot use Oracle on a machine where it is not installed. If you want your friend to connect to Oracle without Oracle being installed on his machine, then your friend will have to remotely connect to a central server, which can be a hosted server that you rent or it can also be your computer for now. Read about port forwarding here: portforward.com

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.