博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
0xDBE:初步了解
阅读量:2511 次
发布时间:2019-05-11

本文共 10527 字,大约阅读时间需要 35 分钟。

0xDBE is a new database administration tool that aims to make things right in an otherwise extremely barren landscape. Sure, there are , but they all regularly underperform – either on the stability, or the features front.

0xDBE是一种新的数据库管理工具,旨在使本来就非常贫瘠的环境变得正确。 当然,还有 ,但是它们在稳定性或功能方面总是表现不佳。

0xDBE is Jetbrains’ attempt to make it right. Don’t let the name confuse you – it’s not final. DBE stands for “Database Environment” and 0x is just a jab at a hexadecimal representation of the same. In this post, I’ll have a look at the EAP version – please note that everything is still subject to change, and Jetbrains is still collecting feedback and feature requests (already over 400 in the !) before they publish the first official release.

0xDBE是Jetbrains的正确尝试。 不要让这个名字使您感到困惑-这不是最终的。 DBE代表“数据库环境”,而0x只是以十六进制表示形式的戳号。 在这篇文章中,我将介绍EAP版本-请注意,所有内容仍可能会发生变化,并且Jetbrains在发布第一个正式版本之前仍在收集反馈和功能请求(在已超过400个!)释放。

Note that I’ll be approaching this tool as a Workbench / PhpMyAdmin convert and as such may not be entirely objective in the matter. The point of a first impressions post, however, isn’t to be objective anyway. I’ll be performing some very rudimentary tasks with the tool and in a way comparing them to the main competitor – Workbench. Note also that the EAP I’ll be testing in this case is version 138.551.

请注意,我将以Workbench / PhpMyAdmin转换的方式使用此工具,因此这可能不是完全客观的。 但是,第一印象发布的重点并不是客观的。 我将使用该工具执行一些非常基本的任务,并将它们与主要竞争对手Workbench进行比较。 还要注意,在这种情况下我要测试的EAP是138.551版本。

支持的数据库引擎 (Supported Database Engines)

0xDBE will support all major SQL engines in version 1 – that alone is a milestone not many DB management tools can boast. Initially, support will be limited to: MySQL, PostgreSQL, Oracle, Sybase, DB2, SQLite, SQL Server, HyperSQL, Apache Derby, ODBC and H2, while NoSQL support is planned too, for future versions.

0xDBE将支持版本1中的所有主要SQL引擎–仅这是一个里程碑,没有许多DB管理工具可以夸耀。 最初,支持仅限于:MySQL,PostgreSQL,Oracle,Sybase,DB2,SQLite,SQL Server,HyperSQL,Apache Derby,ODBC和H2,而将来的版本也计划支持NoSQL。

You can read about their features on their brilliantly laid out page, complete with animated gifs to guide you – I won’t be regurgitating their content here. Instead, I’ll try the DBE out on a sample database of mine and just see how it generally feels.

您可以在布局精美的页面上阅读有关其功能的信息,并附以动画gif来指导您-在这里我不会反驳其内容。 相反,我将在我的样本数据库中尝试DBE,然后看看它的总体感觉。

第一眼 (First look)

Running the application produces the same experience you’re used to across all JetBrains products – consistency is key for them, and all their products being based on the IntelliJ platform makes it rather easy to accomplish. Immediately, we’re asked if we’d like to import some older settings into the new app, after which we get to select a theme. Being used to the Darcula theme on PHPStorm, I choose that one, though everything is changeable afterwards.

运行该应用程序会产生与所有JetBrains产品相同的体验-一致性是它们的关键,并且所有产品均基于IntelliJ平台,因此很容易实现。 立即询问我们是否要将一些较旧的设置导入到新应用中,然后选择主题。 我习惯了PHPStorm上的Darcula主题,尽管后来一切都可以更改,但我选择了那个主题。

alt

The next step offers a selection of editor window styles, upon which I again select Darcula, when it finally presents me with a selection of preferred SQL dialects. The tool supports a wide variety of DB engines and, as such, needs to ask me for my default preference when dealing with databases – Oracle is, after all, somewhat different from MySQL, for example. You can leave this on “Generic” for autodetection and generic SQL use, but I picked MySQL in this case, as that’s the database I’m going to be using for now.

下一步提供了一些编辑器窗口样式,当我最终选择了首选SQL方言时,我再次选择了Darcula。 该工具支持各种各样的数据库引擎,因此,在处理数据库时需要询问我默认的偏好设置–例如,Oracle毕竟与MySQL有所不同。 您可以将其保留在“ Generic”(通用)上以进行自动检测和通用SQL使用,但在这种情况下,我选择了MySQL,因为这是我现在要使用的数据库。

The default data source I connect to is the Laravel Homestead default MySQL connection. As per the Homestead documentation, the username/password combination is homestead/secret, and the port I’m to connect on is 33060. Let’s give that a go.

我连接的默认数据源是Laravel Homestead默认MySQL连接。 根据Homestead文档,用户名/密码组合为homestead / secret,我要连接的端口为33060。让我们开始吧。

车手 (Drivers)

When you enter the “New Data Source” menu and select “MySQL”, you’ll be able to enter the connection parameters, but you won’t be able to initiate the connection. This is because the MySQL drivers aren’t installed into 0xDBE yet – in order to keep things light and fast, the tool is stripped of unnecessary drivers until they’re needed. Installing them is as simple as clicking a download link next to the “Missing Drivers” warning:

当您进入“新数据源”菜单并选择“ MySQL”时,您将能够输入连接参数,但是将无法启动连接。 这是因为尚未将MySQL驱动程序安装到0xDBE中-为了使工作更轻松,更快捷,该工具去除了不必要的驱动程序,直到需要它们为止。 安装它们非常简单,只需单击“缺少驱动程序”警告旁边的下载链接:

alt

This allows 0xDBE to be faster than the competition from the get-go. By preventing – not reducing – bloat, they made sure you’re only using what you absolutely need, while at the same time allowing you to easily grab the necessary add-ons with a single click.

这使0xDBE的速度比起步阶段的竞争对手要快。 通过防止(而不是减少)膨胀,他们确保您仅使用了绝对需要的东西,同时使您可以通过单击轻松获取必要的附件。

创建一个数据库 (Creating a DB)

Having verified the connection parameters, I’m returned to the main window after clicking OK, and am given the list of databases that exist on the VM. Disappointingly, I have no option to create a new schema via the left sidebar and am left with using the editor to do so.

验证了连接参数后,单击“确定”后,我将返回主窗口,并获得虚拟机上存在的数据库列表。 令人失望的是,我没有选择通过左侧边栏创建新模式的方法,只能使用编辑器来完成。

alt

JetBrains says there’s a lot to still improve on this front, and adding this option is definitely in the pipeline. Some other common but currently missing features include user management and permissions, but all are planned.

JetBrains表示,在这方面还有很多需要改进的地方,并且添加此选项肯定还在进行中。 其他一些常见但当前缺少的功能包括用户管理和权限,但所有功能都是计划中的。

Already we’re noticing some super fast auto-completion for SQL commands – nothing we aren’t used to from other JetBrains tools. Comparing the auto-completion speed with Workbench, 0xDBE leaves it miles behind. We’ll see how it performs on an actual populated database, though.

我们已经注意到SQL命令具有一些超快速的自动完成功能,这是其他JetBrains工具所不具备的。 将自动完成速度与Workbench进行比较,0xDBE使其落后了几英里。 不过,我们将看到它如何在实际填充的数据库中执行。

建立表格 (Creating a Table)

alt

The table creation dialog was disappointing. While it’s quite nice to see the query forming before me, it lacked the common options like “unsigned”, “auto increment” and others that are present in, for example, Workbench:

表创建对话框令人失望。 虽然很高兴看到查询在我面前形成,但它缺少诸如“无符号”,“自动递增”之类的通用选项以及例如Workbench中存在的其他选项:

alt

These features are absent right now due to the genericness of the tool – in an effort to support as many engines as possible, it had to reduce the features to the lowest common denominator. Once 0xDBE can successfully derive the table’s context from the underlying data source, these features will be added.

由于该工具的通用性,这些功能目前不存在-为了尽可能多地支持引擎,它不得不将这些功能降低到最低的公分母。 一旦0xDBE可以从基础数据源成功获取表的上下文,则将添加这些功能。

Sadly, there’s no visual model builder like in Workbench either – the instability and outdatedness of that app aside, the model builder is one of the most useful database design tools I had ever come across and I use it fairly regularly. However, JetBrains did say they intend to ship some visual tools with 1.0, and others with later versions – so they’re definitely on the roadmap.

不幸的是,在Workbench中也没有像这样的可视化模型构建器–除了该应用程序的不稳定和过时之外,模型构建器是我遇到过的最有用的数据库设计工具之一,我经常使用它。 但是,JetBrains确实表示他们打算附带1.0的一些可视化工具,以及其他带有更高版本的可视化工具–因此,它们肯定在发展路线图上。

在真实的数据库上测试 (Testing on a real DB)

In order to properly test the functionality of the IDE, I decided to import an old discarded database backup I found lying around from my days at the old job. Unzipped, it comes down to a decent 1.3GB, which should be enough for a decent use case.

为了正确测试IDE的功能,我决定导入一个旧的废弃数据库备份,该备份是我在旧工作中发现的。 解压缩后,它降到了不错的1.3GB,足以满足不错的用例。

Unfortunately, there is no way to import an SQL backup directly through the IDE, so I had to resort to the command line.

不幸的是,无法直接通过IDE导入SQL备份,因此我不得不诉诸命令行。

Having imported the data, I tried performing some queries across FK linked tables, focusing on the tables with the most rows. What I found was that while the results appeared lightning fast, they lacked some information I would have liked to know. For example, there’s no total row count anywhere to be found – you need to do a separate COUNT to get that.

导入数据后,我尝试在FK链接表上执行一些查询,重点放在行数最多的表上。 我发现,虽然结果显示出闪电般的速度,但它们却缺少一些我想知道的信息。 例如,在任何地方都找不到总行数–您需要单独进行一次COUNT来获取该行数。

初始印象 (Initial Impression)

While the autocompletion really is lightning fast, and being able to auto-format the queries to look good is priceless, those are all mostly cosmetic features that don’t make up for the lack of functionality. Some areas in which it does stand out are ease of export – you can instantly copy any result set to an SQL, CSV, TSV, XML or JSON file, or even to an HTML table, right from the context menu. Having inline errors as you write the query is something that’s missing in all SQL editors out there, and being warned of an error before you try and execute it is a huge timesaver. There’s also the ability to rename a table column across all of its instances – from comments to foreign keys, all at once, in all usages – also an enormous time saver. The table editor is a blast and super easy to use, very intuitive when doing changes directly on the data.

尽管自动补全确实快如闪电,并且能够自动设置查询格式以使其看起来不错是无价的,但这些全都是装饰性的功能,无法弥补功能性的不足。 它在某些方面确实很突出,易于导出-您可以直接从上下文菜单中将任何结果集立即复制到SQL,CSV,TSV,XML或JSON文件,甚至复制到HTML表。 在编写查询时遇到内联错误是所有SQL编辑器中都缺少的,在尝试执行之前被警告错误是一个巨大的节省时间。 还可以一次在所有用法中重命名表列的所有实例(从注释到外键)的重命名功能,这也可以节省大量时间。 表格编辑器非常简单易用,直接在数据上进行更改时非常直观。

However, if you’re coming from tools like Workbench, this tool may not be the right choice for you – yet. It currently seems like a jack of all trades, but that implies mastery of none, and while I do see potential in this tool, I’m skeptical of the direction it’s heading in. By trying to cover too much ground, it seems to be spreading itself too thin across all SQL engines (and in the future all NoSQL engines). This looks like it might slow down progress – though JetBrains say they love a good challenge and won’t back down from the notion of fixing the SQL management landscape regardless of how intimidating it seems at first glance.

但是,如果您来自Workbench之类的工具,那么此工具可能不是您的正确选择-到目前为止。 目前看来这是千篇一律的杰作,但这意味着无所适从,尽管我确实看到了此工具的潜力,但我对它的发展方向表示怀疑。试图覆盖太多的领域,似乎是在所有SQL引擎(以及将来的所有NoSQL引擎)中分散自身的能力太弱了。 看来这可能会减慢进度–尽管JetBrains表示他们热爱挑战,并且不会固守SQL管理格局的想法,无论乍看起来有多么令人恐惧。

I won’t be using this tool just yet for my projects, but I’ll definitely be keeping an eye on it and testing all future EAPs thoroughly, at least from the MySQL and PostreSQL end. How about you? Did you give the EAP a go? What did you think?

我现在还不会在项目中使用此工具,但我一定会密切注意它,并至少从MySQL和PostreSQL端开始全面测试所有将来的EAP。 你呢? 您是否给EAP了? 你觉得呢?

翻译自:

转载地址:http://dargb.baihongyu.com/

你可能感兴趣的文章
字符串操作练习:星座、凯撒密码、99乘法表
查看>>
Java实现字符串转换十六进制MD5值
查看>>
MySQL数据库8(十七)数据库的备份还原
查看>>
tensorflow 梯度下降以及summary
查看>>
9、接口和抽象类
查看>>
timeStamp和GMT时间的转换
查看>>
探索J2ME应用:如何用GCF通信
查看>>
调用第三方接口生成短链接(三)
查看>>
Python程序的首行
查看>>
jquery ajaxform上传文件返回不提示信息的问题
查看>>
时间戳的生成处理
查看>>
“茄汁Ketchup”一词从汉语到英语的文化旅游
查看>>
java调用dll
查看>>
Maven 创建 web 项目-项目创建
查看>>
实现一个2008serve的IIS的虚拟目录(通过网络路径(UNC)的形式,共享在另外一个2008服务器上...
查看>>
数据读取
查看>>
适配器
查看>>
c#截取字符串
查看>>
VS2005中配置 ScriptManager,UpdatePanel,UpdateProgress 等AJAX控件 .
查看>>
使用logback实现http请求日志导入mongodb
查看>>