gpt4 book ai didi

python - Sqlite3 或 QtSql

转载 作者:太空宇宙 更新时间:2023-11-03 18:55:09 33 4
gpt4 key购买 nike

需要为使用 PySide 构建的桌面应用程序创建一个小型数据库。我不知道两者(sqlite3 和 QtSql)是否相似,但我倾向于 sqlite3。这是因为,嗯,它是 Pythonic 的!我想知道我是否会错过某些东西,例如性能、功能等(或者考虑到手头的项目是否有使用每一项的约定?)

我知道这个问题会被关闭,因为它可能看起来不够有建设性,对此我感到很抱歉。

最佳答案

QtSql 不像 SQLite 那样是数据库引擎,而是通过 Qt 环境访问数据库的软件。

The Qt SQLite plugin makes it possible to access SQLite databases. SQLite is an in-process database, which means that it is not necessary to have a database server. SQLite operates on a single file, which must be set as the database name when opening a connection. If the file does not exist, SQLite will try to create it. SQLite also supports in-memory databases, simply pass ":memory:" as the database name. - Source

关于python - Sqlite3 或 QtSql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17437075/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com