I recently began using Google App Maker and in order to reference multiple tables from an external MySql Database, do I have to create multiple Data Models for each table or do I have to create multiple datasources inside one Data Model and adding all the fields in it? The database has 15 tables in total.
You need to create model per table.
You can connect your existing database to App Maker (in application settings) and import tables as models (create model -> existing model). So you don't need to re-create fields.
Please be aware that as you change models in App Maker the database from application settings changes accordingly. So I would recommend use prototype database in application settings and production one in production deployment.
Related
I'm working in a big project.
so there are multiple schemas like user_db,merchant_db,bank_db,transaction_db and so on...
How I use those database in one spring project?
the transaction managers can be one. I don't want single tx managers for each database. but I want to access each database in name.
as a example,
in spring server layer,
Add Merchant
------------
{
//step1
add data into user_db>[user_table,user_login]
//step2
add data into merchant_db>[merchant_account]
}
You should consider How to config multiple database source in Spring.In Google or Spring Doc,should easy find solution way.
i have around ten to twenty databases with same structure in mysql,
and how can i load those database dynamically in django?
(there will be a table storing those databases name, which may add/delete during the programme)
edit:
the dynamically way means that while running my website, create the orm and do somethings of another database by data input by users or which stored in the database
those database are:
1)with the same structure
2)only the name of database is different
3)not define in my setting.py when the web is started
Django has a built-in feature to support multiple databases check it out here https://docs.djangoproject.com/en/3.0/topics/db/multi-db/#multiple-databases
I have an application that is supposed to be connected to many identical databases (same tables with the same columns), or even connects to a new database (also identical) that is created while running the application.
Before the user gets into the app's functionalities, he chooses (in an input for exemple or a drop down menu) an existing database then the app connects to it and shows the data in the selected database. Or the user gives the name of a new database and the app creates it and connects to it.
I am using Mysql and Spring boot to do this. And I can't find something practical on how to use variables in the application.properties file, just how to declare many datasources (something like this : https://medium.com/#paulushc/multi-database-application-with-spring-boot-777aaf5a1e4e). But I have lots of databases and I need to create other ones while the app is running.
I have two database. One is FileMaker database and another one is mysql. I want to use this database in mysql.I created odbc data base connection so that I can sync both database e.g when I maker changes in mysql database then FileMaker database should also be updated. Is this thing possible in mysql? If no then in which open source database this thing is supported?
The best way to do that with FileMaker would be to hook the MySQL database up to FileMaker via External SQL Sources (ESS).
You can create layouts in FileMaker that display the actual MySQL data, and the MySQL can be used in FileMaker scripts, calculations, etc. just like any other FileMaker data.
You can choose to simply build layouts that are based on MySQL tables, or you can create scripts in FileMaker to copy data from MySQL based layouts to actual FileMaker based layouts.
We got an application wherein multi-tenancy is implemented by having a unique database (MYSQL) for each tenant. The table structures are the same. I got a requirement to list all expiring products for each of the tenants, and I was wondering how can I incorporate all those in one data web service in WSO2? I know that I can create a query with the database prefixing the table:
eg. select DB1.products.id, DB1.products.name from DB1.products
Do I need to define a data source for each database (100+ tenants), and can I specify the database name as an input variable in the data service operation? ie. select ?.products.id, ?.products.name from ?.products
Thank you for your help.
Cheers,
Erwin
If your intention is to have a generic data service that would retrieve those tenant specific information from those database dedicated to each tenant, as I see, the most cleanest way to achieve this would be by generifying your SQL queries and making the used datasource dynamically discoverable.
Since you're using 100+ tenants(WOW that's a huge number :)) obviously you might be having 100+ databases created for those tenants too. So, you would need to create a carbon datasource with the same name in each tenant (let's say "testDS") wrapping the tenant specific database configurations such as JDBC URL, credentials, etc. Next, if you've come up with your dataservice configuring the used datasource to be the aforementioned datasource, at runtime, it would correctly pick up the appropriate tenant specific datasource as the datasource feature completely supports multi tenancy. That would prevent you from passing the database name, etc to the SQL query and make your data service configuration more clean, generic thereby making it more maintainable.