摘要: /* 7>. 索引: 1. 索引的数据结构: B+树 二分查找 + 平衡二叉树 2. 索引的最左匹配原则: 按照从左到右的顺序建立搜索树 (name,age,sex) 先比较name, 如果name相同则继续比较age和sex, 直到得到数据 (age,sex) 不会按照最左匹配原则 (name,s 阅读全文
posted @ 2019-05-13 16:59 lancelotxly 阅读(197) 评论(0) 推荐(0) 编辑
摘要: '''SQLAlchemy: 1. 架构和流程 2. 建表 3. 操作''' # 综述'''SQLAlchemy架构和操作流程: 1. 架构 ORM(Object Relational Mapper) Schema/Types, SQL Language, Engine(Connection Poo 阅读全文
posted @ 2019-05-13 15:44 lancelotxly 阅读(94) 评论(0) 推荐(0) 编辑
摘要: '''1. 连接数据库 config = { 'host': '127.0.0.1', 'port':3306, 'user':'root', 'password':'123456', 'db':'test' } conn = pymsql.connect(**config)2. 创建游标 curs 阅读全文
posted @ 2019-05-13 15:43 lancelotxly 阅读(146) 评论(0) 推荐(0) 编辑
摘要: /*Mysql: 1. Mysql登录: -u username -p password // 本地登录 -h server_ip -P port -u username -p password // 远程登录 2. Mysql服务器架构: API(C,JDBC,Python) 连接池 SQL接口, 阅读全文
posted @ 2019-05-13 13:26 lancelotxly 阅读(102) 评论(0) 推荐(0) 编辑