Administrator
|
Hi,
Since the database for Flask and Owlready2 will be used by the same process, I think it is possible to use the same database, in theory. However, you need to synchronize the access to the database if there are several process (depending on the underlying web server).
Nevrtheles, I recommend to use to separate database. Since there are no shared table/data, there is no interest in having a single database, except that it needs 2 files instead of one. In addition, Owlready synchronize the database write access automatically when you use the "with ontology:..." blocks, so process synchronization should be Ok for that database. For the other database, it is up to you (or SQLAlchemy) to d the synchronization.
Also notice that Owlready can advantageously replace an ORM like SQLAlchemy. In particular, performance are often better with Owlready, due to optimization of the quadstore.
Jiba
|