简体   繁体   English

通过不同组件访问数据的最佳方法是什么?

[英]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.

相关问题 什么是使用php在不同类中使用相同功能的最佳方法是什么 - what is the best approach to use same functions in different classes using php 使用 PHP/MySQL 导出大型 CSV 数据的最佳方法是什么? - What is the best approach to export large CSV data using PHP/MySQL? php网站中使用ajax从API获取数据的最佳方法是什么? - What is the best approach in php website to grab data from an API with ajax? 反应js组件和laravel刀片可以在一个项目中工作吗? 如果没有,最好的方法是什么? - can react js components and laravel blade work in one single project? if not, what's the best approach? 提取标签的最佳方法是什么 - What is the best approach to extract a tag 地理定位的最佳方法是什么? - What is the best approach to geo targeting? 比较文字:什么是最好的方法 - Comparing text: what is the best approach 什么是存储不同类型产品数据的正确方法 - What is the right approach for storing different types of product data 将refresh_token交换为access_token的最佳方法是什么? (Google API) - What is the best approach to exchange refresh_token to access_token ? (Google API) TCPDF:在一个 MultiCell 中使用不同字体样式的最佳方法是什么? - TCPDF: What is the best approach for having different font-styles in one MultiCell?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM