I need to create a web application that will work in many shops and every operation in every store (add, modify , Delete) ...) The store's main office needs to always be updated in the central database to keep an eye on the updated information on each store ... Note that I am using Oracle DB as server side And using Java Yes i What is the proper approach to do this? Should be done by a database configuration? Or is it a server engine that will update both the store and the central database?
There are so many approaches that you can take it to work as far as I I understand that you will have a local database on each store that will store the list available on that particular store. And all this information will be collected on the central database located in the main office or central warehouse. And you have to write a stock management tool. If this is what you want, then one of the architectures you can use can be similar to the following.
The product
table has the following structure in store
and product
tables in a central database:
product (id, name, category, value, store_id, ...)
store_id
store
A foreign key is a referenced id
column. This will enable you to collect data from all the stores in a table. Then in your stock management application's GUI you can filter the store products only for each store by the store store.
To make the local and central database synchronized, you create a physical view in the local database. According to,
A physical scene is a replication of a target master from a point in time. The master can either have a master view of a master on a master table or physical scene on the master site.
Physical visualization is often used for data replication purposes, because unlike normal view it creates a copy of the data in the local database, by default, the view is not refreshed after creation. , So you have to write a job from the central database to update it with new values (for example, when the central stock changes). But physical ideas also get support for automatic refresh
A physical view V_Products
is created as follows
Viewed view with content Make as select * user.products@maindb WHERE store_id =?
Where ?
indicates the respective store_id (that is related to the ID of the store that you make the view), maindb
SID's central database and more information of the user is available in the official document and prepared the content. has gone.
The local database can be connected to the central database which
has two physical database servers which allows a customer to use it as a logical database.
To increase the performance of your selection in the product
table in the central database, store_id
- among other things, this local database Will synchronize data faster than data in
No comments:
Post a Comment