Web app secondary database

  1. 7 months ago

    Hello guys

    I have a web app that uses PostgreSQL as main database.
    I need a secondary database, with information like country names, airports codes, zip codes, etc., that will be used only for reading.

    The expectation is around 200 - 300 concurrent users.

    I would like to know if SQLite can be used for this secondary read-only database.

    Thanks

  2. Louis D

    21 Nov 2018 Pre-Release Testers, Xojo Pro Montreal, QC, Canada
    Edited 7 months ago

    First, I would suggest yhat you simply add tables in your primary database to support the econdary data. Now, to your question:

    • Yes, you an use a secondary database. SQlite may be suitable, it depends largely on how you plan to access it.
    • If the secondary database data is a) static and b) relatively limited in size, you could read it once per launch or per session, store it in arrays or classes that you would then reference throughout the program. Arrays would be properties of the app or of the session. I use this strategy with some static data in my own apps. The memory usage penalty is proportional to the size of the static data.
    • With 200 to 300 concurrent users, consider balancing the load among multiple instances of your application. In this case, I would surely consider also my suggestion to place the secondary database tables in the primary database if you can. There are a few good threads about this topic. @John J provided a lot of good information on the subject.

or Sign Up to reply!