数据库原理
文章平均质量分 88
数据库原理
.548
这个作者很懒,什么都没留下…
展开
-
NoSQL
每个元素都是相关产品的 ID - 图片地图。每个元素都是图片的简短描述,以及相应图片文件的 URL。- 复制和分片会给一致性带来巨大挑战 - 每个查询都应尽量减少整个集群中被访问的节点数量 - 一起被访问的数据值应位于同一节点上 - 每个查询都应尽量减少整个集群中被访问的节点数量 - 每个查询都应尽量减少整个集群中被访问的节点数量 - 每个查询都应尽量减少整个集群中被访问的节点数量 - 一起被访问的数据值应位于同一节点上。原创 2024-03-21 14:37:45 · 851 阅读 · 0 评论 -
XML Data – Semi-Structured Data XML 数据 - 半结构化数据
Well-Formed” XML Adheres to basic structural requirements • Single root element • Matched tags, proper nesting • Unique attributes within elements "格式完善的 "XML 符合基本结构要求 - 单一根元素 - 匹配的标记,适当的嵌套 - 元素内的唯一属性。- 基本结构 - / :根元素分隔符。- // : 任何子节点或自通配符。原创 2024-03-21 09:48:37 · 1341 阅读 · 0 评论 -
Introduction to Data Mining 数据挖掘
Why Data Mining? • The Explosive Growth of Data: from terabytes to petabytes — Data collection and data availability ◦ Automated data collection tools, database systems, Web, computerized society — Major sources of abundant data ◦ Business: Web, e-commerce原创 2024-03-21 08:00:00 · 1237 阅读 · 0 评论 -
Creating Database Triggers创建数据库触发程序
当针对视图发布 DML 语句时,可以使用 INSTEAD OF 子句来代替。Database Trigger Example • The Trigger Name must be unique • The Trigger Event defines when the trigger will fire relative to the DML event触发器名称必须唯一 - 触发器事件定义触发器相对于 DML 事件的触发时间。原创 2024-03-19 10:26:01 · 1118 阅读 · 0 评论 -
MySQL
• Please note that now only one row needs to be examined and the query therefore runs faster • Please also note that this table now has an index 请注意,现在只需检查一条记录,因此查询运行速度更快。- 请注意,"行 "字段为 4 - 这意味着有 4 行(客户表的所有行)需要检查 - 请注意,"可能键 "字段为 NULL - 这意味着没有定义索引。原创 2024-03-15 15:15:32 · 1431 阅读 · 1 评论 -
Database Connectivity using Python使用 Python 进行数据库连接
MySQL 数据库的默认用户名是 root - 密码 - 用户在安装 MySQL 数据库时给出的密码。- 结果集是指通过执行 SQL 查询从数据库中获取的逻辑记录集。) • PyMySQL • mysqlclient • MySQLDB • OurSQL Python 与 MySQL 的集成 Python 中共有 5 个模块可用于与 MySQL 通信• MySQL Connector Python (重点) • PyMySQL • mysqlclient • MySQLDB • OurSQL。原创 2024-03-14 09:30:00 · 1648 阅读 · 1 评论 -
File Organization & Indexing文件组织与索引
排序或顺序文件 记录根据一个或多个字段的值排序 排序字段 记录排序所依据的字段 - 排序键 用于记录排序时的文件键 - 搜索(或更新)操作 快速 因为二进制搜索是在排序记录上进行的 - 更新排序字段?- 删除操作 快速 因为搜索记录的速度很快 当然需要定期压缩文件 - 插入操作 较差 因为如果我们在正确的位置插入新记录,就需要移动文件中的所有后续记录 或者创建一个 "溢出文件",以堆的形式包含所有新记录 定期将溢出文件与主文件合并 如果创建了溢出文件,对溢出文件中记录的搜索和删除操作必须是线性的!原创 2024-03-21 14:35:47 · 307 阅读 · 0 评论 -
Query Processing 查询处理
Relation Relation – defined between two sets and is a subset of cartesian product between those two sets • e.g., FirstNameOf = (Mary, Howe), (David, Ford)关系--在两个集合之间定义,是这两个集合的卡特积子集。投影 π (Pi);原创 2024-03-13 14:53:09 · 1421 阅读 · 0 评论 -
Web-based DBMS Technology 线上数据库
- 任何用于访问数据库的 PHP 脚本都遵循以下基本步骤: - 检查和过滤来自用户的数据 建立与 MySQL 服务器的连接 选择适当的数据库 查询数据库 检索结果 将结果返回给用户 关闭数据库连接。优点: - 平台独立性 - 每台 PC 都有网络浏览器 - 廉价的图形用户界面 - 创新潜力 - 简化 - 升级和扩展更容易 - 缺点: - 维护服务器成本高 - 开发工具差 - 安全性较差(黑客等) - 可靠性较低(数据包丢失) - 无状态 没有内置的事务支持 - 扩展限制 数据大小和用户数量。原创 2024-03-13 11:22:19 · 885 阅读 · 0 评论 -
Transaction Management事务管理
Transaction Management Overview • Objectives — schedule queries from multiple simultaneous users efficiently — keep the database in a consistent state • Transaction management involves — performing “logical units of work” (definition of transactions) — con原创 2024-03-12 11:23:25 · 1011 阅读 · 1 评论 -
Data Warehousing数据仓库
What Is Data Warehousing? • Enterprise level data management — used in business intelligence (BI) • Includes copied transactional data • Used to monitor and make strategic decisions • Aggregated or summarised data • Documentation about metadata 企业级数据管理 用于汇原创 2024-03-12 08:00:00 · 931 阅读 · 1 评论 -
B+Tree 概念 优缺点 插入 搜索 删除
Search • Given an index, K to be searched — Start at the root node — Search for the pointer to follow to the lower level of the tree until a leaf node is found — Search for the key in the leaf node给定要搜索的索引 K - 从根节点开始 - 搜索指向树下层的指针,直到找到叶节点 - 搜索叶节点中的键。原创 2024-03-11 11:49:32 · 1131 阅读 · 1 评论 -
Access Control & Views 控制访问和视图
Updating Views An Important Subtlety • SQL allows a view to be updated provided the changed rows in the base tables still satisfy all of the conditions of the defining query’s WHERE clause • For example:SQL在基础表更改后仍满足定义查询后WHERE子句所有条件。原创 2024-03-11 00:00:00 · 1749 阅读 · 1 评论 -
Data Definition and Integrity Constraints 数据的定义和完整性限制
Entity Integrity - Primary Keys • Reminder: the primary key of each row in a table must be unique and non-null • Example: The primary key of the Viewing table is composed of two attributes (composite key):实体的完整性 表的每一行主键必须唯一和非空。有关标量函数Scalar Functions。原创 2024-03-09 22:46:19 · 1038 阅读 · 0 评论 -
SQL 多表连接查询
Using Table Aliases • Table aliases can help reduce amount of typing • The following is identical to the previous query:可以使用表的简称来减少字符数。外连接的左连接 以左边为主 输出左边关系以及右边与左边条件值相同的属性 如果不同则输出NULL。右连接 全连接 输出左右两边关系如果有两边条件值相同的属性则输出 如果不同输出NULL。在使用自连接时,必须将使用表的两个不同的简称。原创 2024-03-09 11:02:25 · 941 阅读 · 0 评论 -
SQL-2
SQL Aggregate Functions • We do not want to just retrieve data • We also want to summarise data • Aggregate functions compute summarization (or aggregation) of data • Aggregate functions — SUM — AVG — MIN — MAX — COUNT SQL聚合数据 通过聚合函数计算汇总数据。原创 2024-03-08 21:07:40 · 956 阅读 · 1 评论 -
SQL基础-1
]可选元素 {}必选元素 |替代 ...大于等于0。原创 2024-03-08 15:53:59 · 908 阅读 · 1 评论 -
database design的标准化
关系就是大集合的子集。Unnormalized Form (UNF) • A table that contains one or more repeating groups • To create an unnormalized table: — transform data from information source (e.g. form) into table format with columns and rows 非规范化表格 包括一个或多个重复组的表格 需要将信息源的数据转换为行列的表格。原创 2024-03-07 12:00:00 · 1896 阅读 · 0 评论 -
logical database design 逻辑设计
还可以通过创建新的表即第三个表来表示关系 两种方法都是其中一个表关系表,两个实体表通过外键链接。这是根据第二种方式对 多对多关系建模 Client和PropertyForRent之间的多对多关系直接表示为一个新表Viewing 新实体的外键来自两个参与实体的主键Primary key for the new entity includes the two foreign keys from the two participating entities(/) 要保证两种方法指向同一个表。原创 2024-03-06 11:24:12 · 865 阅读 · 0 评论 -
database design ER model 续
◦ 分公司(整体)拥有员工(部分) ◦ 组成是聚合的一种特殊形式 ISA即具体实体类型可以为抽象实体类型的子实体,HASA即整体攘括了部分。根据用户具体验证概念模型并审查数据模型。原创 2024-03-05 13:57:01 · 958 阅读 · 0 评论 -
database design 有关ER model
A rectangle labelled with the name of the entity • First letter of each word in the entity name is uppercase — e.g., PropertyForRent • Normally an entity type is named using a ‘noun’ or ‘noun phrase’实体图形化表示为标有实体名称的矩形 每个单词首字母大写 通常都为名词或名词短语。原创 2024-03-05 09:50:17 · 1020 阅读 · 0 评论