12-04 更新 实时
首页/ 技术栈/ 正文

Datasette 建表与数据录入(Advent 第3天)

技术栈 来源:Simon Willison 2026-12-04 07:59 1 阅读 机器翻译
Datasette 建表与数据录入(Advent 第3天)

2026年12月3日 - Link Blog

在 Datasette 中创建表和录入数据(Datasette 降临节日历第 3 天)。今天的视频涵盖在 Datasette 中创建表、插入和更新数据、修改表,以及设置外键和多对多关系。视频还演示了一项新功能:为表设置“标签列”(在 Datasette 1.0a47 中加入),这样当该表被纳入某个关系时,Datasette 就知道该用哪些列来对它进行概括展示。

在这个视频中,我使用了这条 uvx 命令来启动 Datasette,无需事先安装它:

uvx --pre datasette sightings.db --create --root

--pre 让我拿到最新的 Datasette alpha 版本,--create 会让它在 sightings.db 数据库尚不存在时创建该数据库,而 --root 选项会在终端里给我一个 URL,我可以用它以 root 身份登录,从而确保我拥有创建和修改表以及插入数据所需的权限。

发布于 2026年12月3日 晚上 11:59

Ladybird 的首个 alpha 版本 - 2026年11月23日

这是 Simon Willison 发布的一篇链接文章,发布于 2026年12月3日。

每月赞助我 10 美元,即可获得当月最重要的 LLM 动态精选邮件摘要。

付钱让我给你少发点!

译文由英文原文机器翻译,术语按行业惯例统一,可在文末展开原文核对。

查看英文原文(Creating tables and data entry in Datasette (Datasette Advent Day 3))

3rd December 2026 - Link Blog

Creating tables and data entry in Datasette (Datasette Advent Day 3). Today's video covers creating tables in Datasette, inserting and updating data, altering tables, and setting up foreign key and many-to-many relationships. It also features the new ability to set the "label column" for a table (added in Datasette 1.0a47), so that when that table is included in a relationship Datasette knows which columns to use to summarize it.

In this video I used this uvx command to launch Datasette without needing to first install it:

uvx --pre datasette sightings.db --create --root

The --pre gets me the latest Datasette alpha, --create causes it to create that sightings.db database if it does not yet exist, and the --root option gives me a URL in my terminal I can use to sign in as root, ensuring I have the permissions needed to create and alter tables and insert data.

Posted 3rd December 2026 at 11:59 pm

Ladybird's first alpha release - 23rd November 2026

This is a link post by Simon Willison, posted on 3rd December 2026.

Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.

Pay me to send you less!

原文为英文,正文由自动抓取并保留原文。

本文由采集器自动同步

原文发布于 Simon Willison(Creating tables and data entry in Datasette (Datasette Advent Day 3)),标题、摘要与正文由机器翻译,术语按行业惯例统一,未经人工逐句校订。

阅读原文 ↗