Hello, list:
I am looking to understand the implications of using ATTACH with databases with
different read-write permissions.
I have a scenario where I need to access a large database (approx. 512MB) that
resides in a read-only filesystem. There is also a small read-write database
with the same schema that resides in a read-write filesystem. The read-only
database provides the base data used in my scenario, with infrequent data
updates stored in the read-write database.
Currently I open these two databases in separate connections and the code that
maintains the connections is responsible for presenting a unified view of the
data to its clients. For example, this means that the code has to merge query
results from the read-only and read-write databases, etc. I realize that this
setup is inelegant (and likely suboptimal) and have been looking to use the
ATTACH command to create a unified view of the data in SQL rather than C++.
I am wondering then whether there are any particular gotchas related to
attaching read-only and read-write databases that I should be aware of. I am
looking at one of the following ATTACH scenarios:
1. Open the read-only database as main and ATTACH the read-write
database. This is my preferred solution.
2. Open the read-write database as main and ATTACH the read-only
database.
3. A third alternative?
A few google queries pointed to messages suggesting problems in scenario (1).
Because I did not find a definitive answer and because my own testing using
sqlite 3.6.13 did not reveal any problems, I am posting this question.
Thank you for any insights.
Bill
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users