gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-29 11:47:32 25 4
gpt4 key购买 nike

我目前正在开发一个有挑战的应用程序。

我有一个收集数据的集中数据库。我有不同的组件需要访问这些数据。

现在我想选择最好的方法(或)模型来实现这一目标。

我有两个想法,各有利弊。

第一个是,

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.

另一个是,

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.

我需要专家的建议来选择最佳方法。另外,请告诉我是否还有其他方法最适合此类问题。

所以,请推荐我。

最佳答案

为了服务器负载和更好的性能,您应该记住这些事情 -1)硬件配置。2)N/W设置3)优化源码检查这些东西,如果指定的东西没有问题,则可以采用第一种方法。对于Mysql数据库的优化可以引用以下链接 - http://thesystemadministrator.net/cpanel/mysql-optimization-to-improve-server-performance-and-reduce-server-load

我不会建议第二种方法,因为创建相同架构的副本是没有值(value)的。您将需要编写一些额外的程序来更新数据。

关于php - 通过不同组件访问数据的最佳方法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34671216/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com