Flask入门教程Flask 项目里使用 Bootstrap 4 的步骤。 第 4 章:静态文件 34 第 5 章:数据库 大部分程序都需要保存数据,所以不可避免要使用数据库。用来操作数据库的数据 库管理系统(DBMS)有很多选择,对于不同类型的程序,不同的使用场景,都会 有不同的选择。在这个教程中,我们选择了属于关系型数据库管理系统 (RDBMS)的 SQLite,它基于文件,不需要单独启动数据库服务器,适合在开发 'sqlite:////' + os.path. join(app.root_path, 'data.db') 注意 这个配置变量的最后一个单词是 URI,而不是 URL。 对于这个变量值,不同的 DBMS 有不同的格式,对于 SQLite 来说,这个值的格式 如下: sqlite:////数据库文件的绝对地址 数据库文件一般放到项目根目录即可, app.root_path 返回程序实例所在模块的 Flask-SQLAlchemy" $ git push 提示 你可以在 GitHub 上查看本书示例程序的对应 commit:4d2442a。 进阶提示 在生产环境,你可以更换更合适的 DBMS,因为 SQLAlchemy 支持多种 SQL 数据库引擎,通常只需要改动非常少的代码。 我们的程序只有一个用户,所以没有将 User 表和 Movie 表建立关联。访问 Flask-SQLAlchemy0 码力 | 127 页 | 7.62 MB | 1 年前3
Hyperledger Fabric 1.4.8 DocumentationThe diagram also shows the consequences of this deployment choice. The database management system (DBMS) creates different world state databases for the papers and bonds chaincodes and the smart contracts chaincode containers and DBMS all are logically different processes. The peer and all its chaincode containers are always in physically separate operating system processes, but the DBMS can be configured to to be embedded or separate, depending on its type. For LevelDB, the DBMS is wholly contained within the peer, but for CouchDB, it is a separate operating system process. It’s important to remember that0 码力 | 699 页 | 9.02 MB | 1 年前3
Hyperledger Fabric 1.4.9 DocumentationThe diagram also shows the consequences of this deployment choice. The database management system (DBMS) creates different world state databases for the papers and bonds chaincodes and the smart contracts chaincode containers and DBMS all are logically different processes. The peer and all its chaincode containers are always in physically separate operating system processes, but the DBMS can be configured to to be embedded or separate, depending on its type. For LevelDB, the DBMS is wholly contained within the peer, but for CouchDB, it is a separate operating system process. It’s important to remember that0 码力 | 483 页 | 7.48 MB | 1 年前3
Hyperledger Fabric 1.4.9 DocumentationThe diagram also shows the consequences of this deployment choice. The database management system (DBMS) creates different world state databases for the papers and bonds chaincodes and the smart contracts chaincode containers and DBMS all are logically different processes. The peer and all its chaincode containers are always in physically separate operating system processes, but the DBMS can be configured to to be embedded or separate, depending on its type. For LevelDB, the DBMS is wholly contained within the peer, but for CouchDB, it is a separate operating system process. It’s important to remember that0 码力 | 701 页 | 9.02 MB | 1 年前3
Hyperledger Fabric 1.4 DocumentationThe diagram also shows the consequences of this deployment choice. The database management system (DBMS) creates different world state databases for the papers and bonds chaincodes and the smart contracts chaincode containers and DBMS all are logically different processes. The peer and all its chaincode containers are always in physically separate operating system processes, but the DBMS can be configured to to be embedded or separate, depending on its type. For LevelDB, the DBMS is wholly contained within the peer, but for CouchDB, it is a separate operating system process. It’s important to remember that0 码力 | 483 页 | 7.48 MB | 1 年前3
Hyperledger Fabric 1.4.8 DocumentationThe diagram also shows the consequences of this deployment choice. The database management system (DBMS) creates different world state databases for the papers and bonds chaincodes and the smart contracts chaincode containers and DBMS all are logically different processes. The peer and all its chaincode containers are always in physically separate operating system processes, but the DBMS can be configured to to be embedded or separate, depending on its type. For LevelDB, the DBMS is wholly contained within the peer, but for CouchDB, it is a separate operating system process. It’s important to remember that0 码力 | 483 页 | 7.48 MB | 1 年前3
Hyperledger Fabric 1.4 DocumentationThe diagram also shows the consequences of this deployment choice. The database management system (DBMS) creates different world state databases for the papers and bonds chaincodes and the smart contracts chaincode containers and DBMS all are logically different processes. The peer and all its chaincode containers are always in physically separate operating system processes, but the DBMS can be configured to to be embedded or separate, depending on its type. For LevelDB, the DBMS is wholly contained within the peer, but for CouchDB, it is a separate operating system process. It’s important to remember that0 码力 | 701 页 | 9.02 MB | 1 年前3
Hyperledger Fabric 1.4 Documentation
The diagram also shows the consequences of this deployment choice. The database management system (DBMS) creates different world state databases for the papers and bonds chaincodes and the smart contracts chaincode containers and DBMS all are logically different processes. The peer and all its chaincode containers are always in physically separate operating system processes, but the DBMS can be configured to to be embedded or separate, depending on its type. For LevelDB, the DBMS is wholly contained within the peer, but for CouchDB, it is a separate operating system process. It’s important to remember that0 码力 | 678 页 | 10.02 MB | 1 年前3
Hyperledger Fabric 1.4 Documentation
The diagram also shows the consequences of this deployment choice. The database management system (DBMS) creates different world state databases for the papers and bonds chaincodes and the smart contracts chaincode containers and DBMS all are logically different processes. The peer and all its chaincode containers are always in physically separate operating system processes, but the DBMS can be configured to to be embedded or separate, depending on its type. For LevelDB, the DBMS is wholly contained within the peer, but for CouchDB, it is a separate operating system process. It’s important to remember that0 码力 | 461 页 | 7.37 MB | 1 年前3
Hyperledger Fabric 2.0.1 DocumentationThe diagram also shows the consequences of this deployment choice. The database management system (DBMS) creates different world state databases for the papers and bonds chaincodes and the smart contracts chaincode containers and DBMS all are logically different processes. The peer and all its chaincode containers are always in physically separate operating system processes, but the DBMS can be configured to to be embedded or separate, depending on its type. For LevelDB, the DBMS is wholly contained within the peer, but for CouchDB, it is a separate operating system process. It’s important to remember that0 码力 | 760 页 | 10.21 MB | 1 年前3
共 92 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10













