[英]What is the best approach to access data by different components?
I am currently working on an application which has a challenge. 我目前正在开发有挑战的应用程序。
I have a centralized database with collection of data. 我有一个包含数据收集的集中式数据库。 I have different components which needs to access those data. 我有不同的组件需要访问这些数据。
Now i want to choose the best approach (or) model to achieve this. 现在,我想选择最佳方法(或)模型来实现这一目标。
I have two ideas which has its own Pros & Cons. 我有两个观点,各有千秋。
First one is, 第一个是
Hitting the centralized database to collect and process all the data which will avoid data redundancy but increase the complexity in terms of server load and performance. 击中集中式数据库以收集和处理所有数据,这将避免数据冗余,但会增加服务器负载和性能方面的复杂性。
The other one is, 另一个是
Having a separate schema (or) table for each component and allowing them to get in touch with the corresponding schema to access required data. 每个组件都有一个单独的架构(或)表,并允许它们与相应的架构联系以访问所需的数据。 It will have the data redundancy but good in terms of performance. 它具有数据冗余性,但在性能方面不错。
I need experts' advise to choose the best approach. 我需要专家的建议以选择最佳方法。 Also, let me know if any other approach is best for these kind of problems. 另外,请让我知道是否有其他方法最适合此类问题。
So, Kindly suggest me. 所以,请建议我。
For server load and better performance you should keep in mind these things- 1)H/W config. 为了服务器负载和更好的性能,您应该记住以下几点:1)H / W config。 2)N/W setup 3)Optimized source code Check with these things, if you have no problem with the specified things , you can go with the first approach. 2)N / W设置3)优化的源代码检查这些事情,如果您对指定的事情没有问题,则可以采用第一种方法。 For optimization of Mysql database you can refer the following link - http://thesystemadministrator.net/cpanel/mysql-optimization-to-improve-server-performance-and-reduce-server-load 对于Mysql数据库的优化,您可以参考以下链接-http://thesystemadministrator.net/cpanel/mysql-optimization-to-improve-server-performance-and-reduce-server-load
I won't suggest second approach because creating copy of same schema is worthless. 我不会建议第二种方法,因为创建相同模式的副本毫无用处。 You will need to write some extra Procedures to data update. 您将需要编写一些额外的过程来更新数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.