Each AnyLogic model has a built-in, fully integrated database for reading input data and writing simulation output. You can use it to import data from MS Excel spreadsheets or various types of databases and store it in an easily accessible form, log all model activities and statistics, and export the database with the model.
The built-in database supports import from the following data sources:
- Microsoft Excel,
- Microsoft Access,
- Microsoft SQL Server,
- PostgreSQL,
- Oracle,
- MySQL,
- MariaDB.
If you need to access other types of databases, or interact with some external databases, you can use connectivity tools of AnyLogic, which are designed to interact with external data sources.
To access an external database, add the Database element from the Connectivity palette to your model and use it to connect to a real database.
Once the database connection is established, you can interact with the connected database using the following elements available in the Connectivity palette.
- Query — Writes queries and retrieves data from the database. Uses the retrieved data to create agent populations and collections.
- Insert — Inserts rows into the database table.
- Update — Updates records in database tables.
- Key Value Table — Maps keys and values specified in a database table.
-
How can we improve this article?
-