PHP 的哪些数据库扩展(mysqli、PDO 等)最适合企业级应用程序?

发布于 2024-08-12 18:20:03 字数 151 浏览 6 评论 0原文

PHP 的哪些数据库扩展(mysqli、PDO 等)最适合企业级应用程序? 我想到的重要功能是:

  1. 积极维护
  2. 大量文档和示例。
  3. 可能是Mysql人自己认可的。
  4. 强大的
  5. 可扩展性

What DB extension PHP has (mysqli, PDO etc) is the best for enterprise level application?
The important features that comes to my mind are:

  1. under active maintenance
  2. A lot of documentation and examples.
  3. Probably endorsed by the Mysql people themselves.
  4. Robust
  5. scalable

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

软的没边 2024-08-19 18:20:03

<代码>1。积极维护

mysqli 和 PDO。如果你最终使用一个框架,它可能会使用 mysqli。

<代码>2。很多文档和示例。

mysqli 和 PDO。

<代码>3。可能是 Mysql 人自己认可的。

mysqli。参见 http://dev.mysql.com/doc/refman /5.0/en/apis-php.html

4.健壮

如果我必须指出 1 个 PHP 扩展来回答“哪一个最常用并且有最多的人检查它的错误?”这个问题,我将不得不投票给 mysqli。如果您对稳健有不同的定义,则必须详细说明。

<代码>5。可扩展

这取决于您所说的可扩展的含义。在 mysqli 与 PDO 的较量中,mysqli 拥有最严格的代码库,因此更具可扩展性,因为代码更轻。 YMMV。肛门。

但是如果您想要一些可以帮助您扩展的东西(例如在几个 mysql 服务器之间分配负载),您将需要一些东西来包装 mysqli/PDO,因为 mysqli/PDO/任何级别都不会为您执行此操作。

1. under active maintenance

mysqli and PDO. if you end up using a framework, it will probably be using mysqli anyway.

2. A lot of documentation and examples.

mysqli and PDO.

3. Probably endorsed by the Mysql people themselves.

mysqli. see http://dev.mysql.com/doc/refman/5.0/en/apis-php.html

4. Robust

if i had to point to 1 single PHP extension that answers the question "which one is used most often and has the most number of people scrutinizing it for bugs?", i would have to vote for mysqli. if you have a different definition of robust, you'll have to elaborate.

5. scalable

it depends what you mean by scalable. in the mysqli vs. PDO shootout, mysqli has the tightest codebase and is therefore more scalable simply because the code is lighter. YMMV. IANAL.

but if you want something that helps you to scale (such as distributing load across a couple of mysql servers) you'll need something to wrap mysqli/PDO because nothing at the mysqli/PDO/whatever level will do this for you.

嘿咻 2024-08-19 18:20:03

真正的企业应用不仅需要数据库扩展,还需要 ORM。我听说过 Doctrine,但不能告诉你它是否稳定,因为我没有使用过它。

我查看了它提供的功能,似乎这个项目已经存在了一段时间,因为它支持延迟加载、多对多关系、继承,这些是大多数新 ORM 不具备的功能有。

Real enterprise applications require not only a database extension, but ORM. I've heard sth about Doctrine, but can't tell you if it's stable, because I haven't used it.

I've looked at the features that it offers and it seems that this project is there for a while, because it has support for lazy loading, many-to-many relationships, inheritance, which are features that most of new ORMs don't have.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文