需要比较 firebird 中的 blob

发布于 2024-08-25 06:34:08 字数 227 浏览 7 评论 0原文

我需要检查数据库中 blob 的内容(是的,复数,但一次一个问题)。

在一个数据库中,我有大约 900 张尺寸可能不同的图像。我需要检查应用程序中内置的版本控制系统是否确实正确地将图像数据从以前的版本复制到新版本的记录。

如何整体比较值,这样我就不必一次挑选一个记录并使用 FlameRobin 或 Firebird Maestro 打开 blob 并直观地比较这些图像?

感谢您的任何帮助。

I need to check on the contents of blobs in my databases (yes, plural, but one problem at a time).

In one database, I have about 900 images of potentially varying sizes. I need to check to see if the versioning system that's built into our application is actually correctly replicating the image data from the previous version to the new version of a record.

How do I compare values en masse so I don't have to pick through each record one at a time and open up the blob using FlameRobin or Firebird Maestro and visually compare these images?

Thanks for any assistance.

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

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

发布评论

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

评论(2

娇纵 2024-09-01 06:34:08

您可以通过两种方式处理此问题:

  1. 创建某种为每个图像返回唯一值的函数,将其存储在不同的列中并比较这些值,
  2. 获得一个“外部函数库”(也称为“用户定义函数库”)包括“blob 比较”函数:在您的服务器上安装该库,在数据库中声明该函数并使用它。

You can handle this in two ways:

  1. create some kind of function that returns a unique value for each image, store it in a different column and compare these values
  2. get an "external function library" (also called "User Defined Function library") that includes a "blob compare" function: install the library at your server, declare the function in your database and use it.
dawn曙光 2024-09-01 06:34:08

尝试对每个 bolb 进行哈希(如 md5)并查看它们是否相同。

SELECT
    oldTable.PK
    FROM oldTable
        LEFT OUTER JOIN newTable ON oldTable.PK=newTable.PK
    WHERE MD5(oldTable.blob_column)!=MD5(newTable.blob_column)

try to do a hash (like md5) on each bolb and see if they are the same.

SELECT
    oldTable.PK
    FROM oldTable
        LEFT OUTER JOIN newTable ON oldTable.PK=newTable.PK
    WHERE MD5(oldTable.blob_column)!=MD5(newTable.blob_column)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文