sqlite gui_通过使用sqlite数据库和gui回答与业务相关的问题来开始使用sql

这篇博客介绍如何通过SQLite数据库和GUI工具开始学习SQL,以解决实际业务问题。内容涉及从翻译的文章中获取灵感,指导读者如何利用SQLite GUI进行SQL操作。
摘要由CSDN通过智能技术生成

sqlite gui

Solving problems is one of the best ways to learn and reinforce new concepts. In this case, we’ll be applying the most common clauses of the Structured Query Language (SQL), using a relational database (i.e. SQLite), and a graphical user interface (GUI) such as TablePlus to solve business-related questions.

解决问题是学习和强化新概念的最佳方法之一。 在这种情况下,我们将使用关系数据库(即SQLite)和图形用户界面(GUI)(如TablePlus)来应用结构化查询语言(SQL)的最常见子句,以解决与业务相关的问题。

Before we get started, there are a couple of housekeeping items we need to address.

在开始之前,我们需要解决几个内务处理项目。

  1. Download the sample SQLite database.

    下载示例SQLite数据库。
  2. Install TablePlus or another compatible GUI.

    安装TablePlus或另一个兼容的GUI。

Download a sample SQLite database

下载示例SQLite数据库

The database we’ll be using is a sample from the SQLite tutorial website.

我们将使用的数据库是SQLite教程网站中的示例。

Image for post
This is a visual schema of the sample database.
这是示例数据库的可视模式。

By taking a closer look at the schema, a blueprint of the construction of a database, we are able to gain a visual sense of what a database contains. SQLite is an example of a relational database, and we can see relations by observing the connections formed between the keys of different tables. I’ll explain this in a little more detail later on, however for now, the most important thing is to grasp some visual understanding of what the database is comprised of (i.e. Tables that hold varying columns of different data types and relationships between tables.).

通过仔细查看架构(数据库构建的蓝图),我们可以直观地了解数据库包含的内容。 SQLite是关系数据库的一个示例,我们可以通过观察不同表的键之间形成的连接来查看关系。 我将在稍后更详细地解释这一点,但是现在,最重要的是要对数据库的组成有一些直观的了解(即,表包含不同数据类型的不同列以及表之间的关系。 )。

The download of the sample database I’ll be using can be found here. About halfway through, you should find a link for downloading the sample SQLite database. Click it when you’ve found it.

我将使用的示例数据库的下载可在此处找到。 大约过了一半,您应该找到下载示例SQLite数据库的链接。 找到它后,单击它。

Image for post

After downloading the database, you’ll notice that it’s in a ZIP format. If you don’t already have a preferred software for unzipping a file, 7-zip is a free service recommended by the SQLite Tutorial website.

下载数据库后,您会注意到它为ZIP格式。 如果您还没有首选的软件来解压缩文件,则7-zip是SQLite教程网站推荐的免费服务。

Once you’ve unzipped the file, it’s helpful to move it to a place that’s easy to access. For example, I chose to move the unzipped file to my desktop.

解压缩文件后,将其移动到易于访问的位置很有帮助。 例如,我选择将解压缩的文件移动到桌面上。

Install TablePlus or another compatible GUI

安装TablePlus或其他兼容的GUI

From here we need the assistance of a program that will help us open and connect to the SQLite database. I’ve chosen to use TablePlus, a modern GUI tool for relational databases. TablePlus is available for download on both Windows and Mac devices, and offers a free tier with plenty of functionality for our purposes. After downloading and opening TablePlus on your device, a window with the below information should appear.

从这里开始,我们需要一个程序的帮助,该程序将帮助我们打开并连接到SQLite数据库。 我选择使用TablePlus ,这是一种用于关系数据库的现代GUI工具。 TablePlus可在Windows和Mac设备上下载,并提供免费层,其中包含用于我们目的的大量功能。 在设备上下载并打开TablePlus后,将出现一个包含以下信息的窗口。

(Note: There may be some slight design differences between the Mac and Windows TablePlus applications. I happen to be using a Windows device.)

(注意:Mac和Windows TablePlus应用程序之间可能会有一些细微的设计差异。我恰好在使用Windows设备。)

Image for post

If you’re using TablePlus for the first time, your window should look just like the above. You’ll see that there aren’t any preexisting connections which is to be expected. That’s all about to change though. 😃

如果您是第一次使用TablePlus,则窗口应与上面的一样。 您会看到没有任何预先存在的连接是可以预期的。 但这一切都会改变。 😃

We now have our two primary housekeeping items complete.

现在,我们完成了两个主要的客房整理项目。

✔ Downloaded SQLite database.

✔下载SQLite数据库。

✔ Installed compatible GUI (i.e. TablePlus).

✔安装了兼容的GUI(即TablePlus)。

Connect the SQLite database using TablePlus

使用TablePlus连接SQLite数据库

Given that the database is SQLite, we’ll want to select the SQLite option when creating a new connection within TablePlus.

鉴于数据库是SQLite,在TablePlus中创建新连接时,我们将要选择SQLite选项。

Image for post
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
非常好用的SQLiteSpy 1.8.16 免费正式版(内附有一做好的DB,大家可以马上看下效果)。网上看到的,整理了下,共享给大家! 希望有用! SQLiteSpy是一个快速和紧凑的图形用户界面的SQLite数据库管理软件。它可以读取sqlite3文件并执行SQL。图形用户界面使得它很容易分析和操纵sqlite3的数据库。 注意:SQLiteSpy是免费供个人和教育用途,SQLiteSpy主要特点: 1、数据库一览:树状显示所有的架构,包括表,列,索引和触发器在数据库中包含的项目。按F5更新架构树,双击一个表或视图来显示它的数据,使用常用的命令的上下文菜单。 2、网格单元格编辑:表格单元格中编辑,显示一个表通过树状架构,选择一个单元格,然后按F2键调用编辑器。然后修改并确认您的更改写回到表里。 3、数据类型显示:本机的SQL数据类型显示不同的背景颜色来帮助检测类型错误。类型错误可能会导致性能下降或错误的SELECT结果集,防止NULL值与空字符串混淆。 4、完全的Unicode: SQLiteSpy具有完全支持SQLite的Unicode的能力。数据显示和输入是完全实现为Unicode,包括SQL命令。 5、多个SQL编辑:现代标签是用来编辑和显示的查询语句和结果比较容易多个SQL查询。 SQL查询执行输入或加载到SQL他们编辑。然后按F9键运行该查询,或Ctrl + F9来运行当前行或选择只。 6、时间测量: SQL执行的时间会自动测量和显示,以帮助优化查询。 7、正则表达式:在SQL关键字regexp是支持,并增加了完整的Perl的正则表达式语法5.10 SQLiteSpy。的实施,实现了利用DIRegEx库。 8、数学SQL函数:下面的SQL函数可用数学除了SQLite的默认:ACOS(), ASIN(), ATAN(), ATAN(), ATAN2(), CEIL(), CEILING(), COS(), COT(), DEGREES(), EXP(), FLOOR(), LN(), LOG(), LOG(), LOG2(), LOG10(), MOD(), PI(), POW(), RADIANS(), SIGN(), SIN(), SQRT(), TAN(), TRUNCATE(). 9、数据压缩:压缩的SQL函数()适用的zlib的紧缩到任何文本或BLOB值。 10、紧凑型结果储存:使用内部数据存储机制,以达到最佳的兼容SQLite的原生数据类型。因此,SQLiteSpy使用远低于其它的SQLite管理内存和更有效地处理大量的表。 11、内建的SQLite引擎: SQLiteSpy已建成一个单一的应用程序文件与SQLite数据库引擎可执行文件。不需要部署任何DLL文件,这使得SQLiteSpy更易于部署。 12、加密支持: SQLiteSpy可以阅读和修改加密的数据库文件由DISQLite3产生。 DISQLite3实现了自己的母语AES加密。这为不符合商业SQLite的加密扩展(SSE)的或任何其他第三方的实施提供兼容。 13、易安装和卸载:要运行SQLiteSpy,只需解压SQLiteSpy.exe文件到任何目录和执行文件。不需要安装。刚开始时,该程序创建一个文件SQLiteSpy.db3(1 sqlite3的数据库)来存储的和设置。它不写任何其他文件或注册表。卸载一样只是简单的删除两个文件:应用程序的可执行文件和数据库文件。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值