Postgres 与 Firebird

发布于 2024-08-09 07:49:46 字数 1539 浏览 3 评论 0原文

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

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

发布评论

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

评论(8

a√萤火虫的光℡ 2024-08-16 07:49:46

您必须选择像 RDBMS 这样的技术,不仅要比较功能列表,还要回答以下问题:

  • 它是否足够可靠,足以满足您的需求?
  • 它能满足您的所有需求吗?
  • 什么是观点/支持/开发/文档?

对我来说FB不是一个好的选择。我可以指出两个故事:

  • 我在表上写了约束。用户向表中添加一些字符串。一段时间后,用户尝试再添加一个字符串,但 FB 抱怨限制。怎么了?这个新字符串肯定受到限制。问题出在之前添加的最后一个字符串中!那个字符串是前段时间添加的,它是错误的,到目前为止它在数据库中,谁知道现在数据库中有多少错误数据。非常糟糕。 FB 以错误的方式实现约束。
  • 我写了一个存储过程(SP)。 FB 将其存储在 DB 中,FB 可以运行它,并且它可以工作 - 按预期选择数据。没有人警告。然后备份就完成了,没有错误。只有在恢复时,FB 才会抱怨 SP 出了问题,并且……什么……您现在没有可恢复的备份副本。

我还可以指出两三个,但这些足以让我说:不,FB 不是我的选择,它不是 RDBMS,它是一个玩具。

他们的文档也很糟糕。事实上,每个版本都没有实际的参考资料。当人们在论坛中询问:XX 版本中的完整功能列表是什么?标准答案是:从最新 Interbase 官方版本中获取列表,并从所有后续版本的“发行说明”中添加(删除)功能。

他们有奇怪的支持/发展策略。他们正在研究他们感兴趣的事情、深层次的技术问题,而不是真正对用户来说至关重要或烦人的事情。

You have to choose technology like RDBMS not (only) on comparing list of features but on answering questions like these:

  • is it reliable enough for your needs?
  • does it suit all your needs?
  • what are perspectives/support/development/documentation?

For me FB is not a good choice. I can point two stories:

  • I wrote constraint on table. Users add some strings to table. After a while user is trying to add one more string, but FB complains on constraint. What's wrong? This new string is surely under constraint. Problem is in a last string that was added before it! That string was added some time ago, it was wrong, and so far it is in DB, and who knows how many wrong data are now in DB. Very bad. FB implements constraints in a wrong manner.
  • I wrote a Stored Procedure (SP). FB stored it in DB, FB can run it, and it works - select data as expected. No one warning. Then backup is done without errors. And only on restore FB complains that something is wrong with SP and ... what ... you have no restoreable backup copy now.

I can point two or three more but these are enough for me to say: no, FB is not my choice, it's not RDBMS, it's a toy.

And they have bad documentation. In fact there is no actual references with each release. When people ask in forums: what is a full list of functions in release XX? The standard answer is: take a list from last official Interbase release and add (remove) functions from all later releases's "release notes".

And they have strange support/development strategy. They are working on what are interesting for them, on deep technical issues, not on what are really critical or annoying for users.

怪我鬧 2024-08-16 07:49:46

我已经使用 Firebird 很长时间了,建议不要以任何方式使用它。它们有许多 Postgres 没有的基本问题。不说很多,只是说他们仍然没有“alter view”命令。要更改视图,您必须删除并重新创建它以及依赖于它的所有视图。这是 FB 的众多缺陷之一。比较这些数据库引擎根本不正确。我遇到过很多情况,即使没有断电、正常工作负载等情况下,Firebird 数据库也会损坏。如果您仍然决定,请不要使用 Firebird!如果你已经选择了FB,过一段时间你就会记住我的话:)

I've been working with Firebird for a long time and recommend to NOT use it in any way. They have many fundamental problems that Postgres does not have. Not to say many, just say they don't still have 'alter view' command. To alter a view you must drop and recreate it and all views depending on it. This is one of many misfeatures of FB. It's not correct to compare these DB Engines at all. I've had many cases when Firebird database was corrupted even without power loss, with usual workloads, and so on. If you still deciding, don't use Firebird! If you already chose FB, you will remember my words some time later :)

我可以对火鸟发表评论。自第一次比较以来发生了以下变化:

多线程架构可用吗?
是(超级服务器)

实际上,经典服务器是可扩展性的首选服务器类型。从Firebird 2.5开始,还有一种称为SuperClassic的架构。我写了一篇关于差异的小文章: SuperServer、ClassicServer 还是 SuperClassic?

将交易信息存储在同一个中
文件作为数据?是(红色)

我不明白用红色写这怎么可能是一个问题。 Firebird 使用谨慎写入
确保数据库结构始终一致。

临时表?否

Firebird 2.1 中 用。 发行说明

丰富的内置功能?否

Firebird 2.1 也改进了这一点。 发行说明

多种认证方式(即
LDAP)否

虽然不支持 LDAP,但 Firebird 2.1 允许 Windows 身份验证。 发行说明

创建用户定义类型?否

我不确定作者在这里的意思,但 Firebird 永远拥有域名。

需要备份/恢复来压缩?是的
(红色)

有争议。数据库空间被重用。我发现很难想象在生产中需要缩小数据库。

在查询中使用 POSIX 正则表达式?否

支持正则表达式。 发行说明

数据库监控?否

是的,Firebird 2.1 支持通过系统表进行数据库监控。 Firebird 2.5 添加了对跟踪设施的支持。
我至少知道一个优秀的Firebird 数据库监控工具。 ;)

能够查询本地或远程其他服务器上的数据库。否

查询远程数据库。 发行说明

I can comment on Firebird. The following changed since the first comparison:

Multi Threaded Architecture Available?
Yes (super server)

Actually, Classic Server is the preferred server type for scalability. Starting from Firebird 2.5 there is also an architecture called SuperClassic. I wrote a small post on the differences: SuperServer, ClassicServer or SuperClassic?

Stores Transaction Information in same
file as data? Yes (in red)

I don't see how this could be a problem to be written in red. Firebird uses careful writes
to ensure the database structure is always consistent.

Temporary Tables? No

Available in Firebird 2.1. Release Notes

Rich Built in Functions? No

Firebird 2.1 also improved this. Release Notes

Multiple authentication methods(i.e.
LDAP) No

While there is no LDAP support, Firebird 2.1 allows Windows authentication. Release Notes

Create user defined types? No

I'm not sure what the author means here, but Firebird has had domains forever.

Require backup/restore to compact? Yes
(in red)

Arguable. Database space is reused. I find it hard to imagine the need to shrink a database in production.

Use POSIX Regular Expressions in queries? No

Firebird 2.5 supports regular expressions. Release Notes

Database Monitoring? No

Yes, Firebird 2.1 supports database monitoring via system tables. Firebird 2.5 adds support to trace facilities.
I know at least one excellent database monitoring tool for Firebird. ;)

Ability to query databases on other servers local or remote. No

Firebird 2.5 can query remote databases. Release Notes

空城缀染半城烟沙 2024-08-16 07:49:46

据我所知,您引用的页面的 Postgres 列中的每个“否”仍然是“否”,尽管可以通过仅授予对数据库中所有表的选择权限来有效地拥有只读数据库。然而,自 8.2 以来,有许多新功能。一些来自 8.4

  1. 窗口函数
  2. 、公用表表达式和递归查询
  3. 函数的默认参数和可变参数
  4. 并行恢复
  5. 列权限
  6. 每个数据库的区域设置

...和 ​​8.3 中的一些

  1. 全文搜索已集成到核心数据库系统中
  2. 支持 SQL/XML 标准,包括新运算符和 XML 数据类型
  3. 枚举数据类型 (ENUM)
  4. 复合数组类型
  5. 通用唯一标识符 (UUID) 数据类型
  6. 添加对 NULL 是否排序在前或最后的控制
  7. 可更新游标
  8. 现在可以基于每个函数设置服务器配置
  9. 参数 用户定义的类型现在可以具有类型修饰符

...无论 Firebird 有这些,我不知道。

AFAIK the each No in the Postgres column of the page you cited is still a No, although read-only databases can be effectively had by granting only select permissions on all tables in a database. However, there are many new features since 8.2. Some from 8.4:

  1. Windowing Functions
  2. Common Table Expressions and Recursive Queries
  3. Default and variadic parameters for functions
  4. Parallel Restore
  5. Column Permissions
  6. Per-database locale settings

...and some from 8.3:

  1. Full text search is integrated into the core database system
  2. Support for the SQL/XML standard, including new operators and an XML data type
  3. Enumerated data types (ENUM)
  4. Arrays of composite types
  5. Universally Unique Identifier (UUID) data type
  6. Add control over whether NULLs sort first or last
  7. Updatable cursors
  8. Server configuration parameters can now be set on a per-function basis
  9. User-defined types can now have type modifiers

...whether Firebird has these, I don't know.

标点 2024-08-16 07:49:46

可以进行基于文件系统的备份
是(必须停止Postmaster)

不是真的。从 8.1 开始(如果我没记错的话),可以激活 WAL 归档,然后创建基于文件系统的备份,而无需关闭任何东西。在文档中查找 PITR(时间点恢复)以获取更多信息

File System based backups possible
Yes(Postmaster must be stopped)

is not true. since 8.1 (if i remember correctly) it's possible to activate WAL archiving and then creating filesystem based backups without shutting down anything. Look for PITR (point-in-time-recovery) in the docs for more information

那请放手 2024-08-16 07:49:46

一件重要的事情是部署:

  • Firebird 在 Linux 上不能很好地使用 ext3,您应该使用 XFS 或类似的东西。
  • 据我所知,PostgreSQL仍然不能在Windows服务器上运行。

One important thing is deployment:

  • Firebird doesn't perform well with ext3 on Linux, you should use XFS or something similar.
  • As far as I know, PostgreSQL still doesn't run on Windows servers.
难理解 2024-08-16 07:49:46

对于那些使用 Firebird 的人,我建议阅读 Firebird 2.1 发行说明 了解在 Linux 上运行的旧版 Firebird 的数据库损坏问题。

简而言之,这与 Linux 中的一个错误有关。对于较旧的 Firebird,解决方法是使用 sync 选项挂载受影响的文件系统。该问题已在 FB2.1 中修复。

For those who are using Firebird, I would suggest reading the Firebird 2.1 Release Notes to understand a database corruption issue wrt to older Firebird versions running on Linux.

In short it has to do with a bug in Linux. For older Firebirds, the workaround is to mount the affected filesystem with the sync option. The problem is fixed in FB2.1.

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