[数据库原理]【英文版】Chapter05
chap05 查询和视图

打开数据库,用命令来创建视图:
OPEN DATABASE 数据库名 CREATE SQL VIEW 视图文件名 AS SQL-SELECT
语句
20
视图的使用
利用视图更新源表数据
可在视图设计器的更新条件页面中进行如下设置 来实现对源表数据的更新:
set<fieldname>=<expression> 插入表记录命令:Insert into <tablename> (字段名列表)Values(值列表) 删除表记录命令:Delete From <tablename>
[where<条件表达式>]
22
5.3 SQL命令小结
非SQL命令
建表命令:Create 修改表命令:Modify Structure 修改表记录命令:Replace 插入表记录命令:Append 删除表记录命令:Delete
VFP程序设计教程
南京理工大学紫金学院 计算机系
Chapter05 查询和视图
2
5.1 查询的创建和使用
查询的概念 查询的创建
3
查询的概念
查询:就是向一个数据库发出检索信息的请求, 从中提取符合特定条件的记录。
查询文件:保存实现查询的SELECT-SQL命令的 文件。查询文件保存时,系统自动给出扩展 名.qpr;查询被运行后,系统还会生成一个编 译后的查询文件,扩展名为.qpx。
设置查询结果的排序依据
排序决定查询输出结果中记录显示的顺序。单击排序 依据 → 从选定字段框选中字段 → 选择升序或降序 → 单击添加。
7
查询的创建
设置查询结果的分组依据
Chapter05 Sliding Bearings 机械零件设计英文PPT全套教案

Another unit of dynamic viscosity poise (P) is the cgs unit of viscosity and is in dyne-seconds per square centimeter (dyns/cm2).
cylindrical members sliding in annular sleeves,
disks sliding on mating disks.
Fig.5.1 Various types of sliding bearings
5.4 Sliding Bearing Materials
Schematic sketch showing relative position change of shaft in the sleeve, starting from rest and increasing to steady-state rotating speed
dp dx y
Reynolds Equation
Chapter 5 Sliding Bearings
5.1 Types of Bearings 5.2 Uses and Characteristics of Sliding Bearings 5.3 Potential Failure Modes
reciprocating, rotating or oscillating
Basic objectives of the design
To choose the bearing diameter and length, specify the surface roughness and clearance requirements between journal and sleeve, and determine acceptable lubricant properties and flow rates that will assure support of specified design loads and minimize frictional drag.
ArcGis Chapter05

第五章基于GIS的空间可达性测量及其在医疗服务中的应用可达性(或便捷度)是指从给定地点到其他地方工作、购物、娱乐或就医的方便程度。
可达性的重要性不言而喻。
资源或服务设施都是稀缺的,资源有效配置的决定性因素是消费者的可达性。
资源或服务设施的空间分布并不均衡,需要周密的规划布局以满足人们的需求。
弱势群体(比如低收入和少数民族集聚区)常常因为经济困难或交通方式短缺而不能得到某些服务或者丧失许多机会。
可达性已经成为一个社会公平问题,要达到社会平等就要求政府部门制定适宜的规划和有效的公共政策。
可达性决定于供需分布以及二者在空间上的联系,是区位分析的经典问题,也很适合用GIS 来解决。
本章重点阐述用GIS方法测量空间可达性。
第5.1节概述可达性相关概念,接下来用两种GIS方法来测量空间可达性:第5.2节介绍移动搜索法第5.3节介绍引力法。
第5.4节应用上述两种方法来测量芝加哥地区家庭医师的可达性。
第5.5节是讨论和结论。
5.1可达性问题可达性可以根据两种尺度(显性与隐性、空间与非空间)的不同组合而划分成四种类型:显性空间可达性、显性非空间可达性、隐性空间可达性、隐性非空间可达性(Khan, 1992)。
显性可达性是指对服务的实际消费,而隐性可达性是指对服务消费的可能性。
显性可达性可以通过消费者使用该服务设施的程度和满意度来体现,这可以通过调查得到。
研究者关注隐性可达性的更多研究成果是规划师和决策者用于评价现有服务系统以及谋求改进服务的策略。
空间可达性的着重于研究联系供需点之间的距离屏障或克服屏障的媒介,而非空间可达性重点在非地理性的要素(Joseph and Phillips, 1984)。
非空间可达性由许多人口结构和社会经济因素决定。
在一项关于就业便捷度的研究中,本书作者(Wang, 2001b)研究了种族、性别、工资、家庭结构、教育水平及住房情况等因素对上班族通勤时间及就业方便程度的影响。
在另一项关于医疗服务便捷度的研究中,王法辉和罗卫(Wang and Luo, 2005)将非空间变量分为如下几7778类:人口结构,如年龄、性别、种族等;社会经济因素,如贫困人口、女性主导家庭、住宅状况及收入水平等;居住环境类,如住房拥挤程度、缺乏基本公共设施的住宅单元数等;教育服务水平,如未获得中学教育的人数、英语交流障碍等;交通方便性,如无私车的家庭数等等。
曼昆英文版《经济学原理》05-弹性及其应用

Computing the Price Elasticity of Demand
(100 - 50)
Price
ED
(100 50)/2 (4.00 5.00)/2
(4.00 - 5.00)
$5
4 Demand
67 percent -3 - 22 percent
Demand is price elastic
Example: If the price of an ice cream cone increases from $2.00 to $2.20 and the amount you buy falls from 10 to 8 cones the your elasticity of demand, using the midpoint formula, would be calculated as:
0 50 100 Quantity
Ranges of Elasticity
Perfectly Inelastic Quantity demanded does not respond to price changes. Perfectly Elastic Quantity demanded changes infinitely with any change in price. Unit Elastic Quantity demanded changes by the same percentage as the price.
demand with greater precision.
Price Elasticity of Demand
Price elasticity of demand is the
Chapter05_数组和广义表_数据结构(C语言版)_严蔚敏_配套ppt课件

M
1 1 2 3 3 4
1 5 3 1 2 4
3 7 -1 -1 -2 2
N
1 1 2 3 4 5
1 3 3 2 4 1
3 -1 -2 -1 2 7
行列下 标调换
1 5 3 1 2 4
1 1 2 3 3 4
3 7 -1 -1 -2 2
按行下 标排序
法1:
按照矩阵M的列序进行转置,即按三元组A的 第二个字段值(列下标)由小到大的顺序进行转置。 为了找到M中每一列中所有的非零元素,需要对其 三元组表a.data从第一行起整个扫描一遍,由于 a.data是以M的行序为主序来存放每个非零元素 的,对于M中具有相同列下标的非零元来讲,先扫 描到的非零元的行下标一定小于后扫描到的非零元 的行下标,由此得到的恰是b.data应有的顺序。
• 压缩的含义
– 为多个值相同的元素只分配一个存贮空间; – 零元素不分配或少分配存贮空间。
• 特殊矩阵:元素值相同或零元素分布有 一定规律的矩阵。 • 稀疏矩阵:元素值相同或零元素分布没 有规律的矩阵。 • 特殊矩阵的压缩存贮实际是将二维数组 的数据元素压缩到一维数组上。
特殊矩阵的压缩存储
特殊矩阵: 非零元在矩阵中的分布有一定规则
常用的稀疏矩阵的存储方法
三元组表示法 顺序存储 行逻辑联接的顺序表 带辅助行向量的二元组表示法 伪地址表示法 带行指针向量的单链表示法 链接存储 散列存储 行列表示法(十字链表) 多链表示法(正交表)
顺序存储
1、三元组表示法 用一个线性表来表示稀疏矩阵,线性表的每个 结点对应稀疏矩阵的一个非零元素。其中包括三个 域,分别为该元素的行下标、列下标和值。结点间 的先后顺序按矩阵的行优先顺序排列(跳过零元 素),将线性表用顺序的方法存储在连续的存储区 里。
数据库英文版第六版课后答案 (28)

1. Naming of attributes: this is a key aspect of a good design. One approach to design ensures that no two attributes share a name by accident; thus, if ID appears as an attribute of person, it should not appear as an attribute of
51
52 Chapter 7 Del
another relation, unless it references the ID of person. When natural joins are used in queries, this approach avoids accidental equation of attributes to some extent, although not always; for example, students and instructors share attributes ID and name (presumably inherited from a generalization person), so a query that joins the student and instructor relations would equate the respective attribute names.
2. Primary keys: one approach to design creates identifier values for every entity, which are internal to the system and not normally made visible to end users. These internal values are often declared in SQL as auto increment, meaning that whenever a tuple is inserted to the relation, a unique value is given to the attribute automatically. In contrast, the alternative approach, which we have used in this book, avoids creating artificial internal identifiers, and instead uses externally visible attributes as primary key values wherever possible. As an example, in any university employees and students have externally visible identifiers. These could be used as the primary keys, or alternatively, the application can create identifiers that are not externally visible, and use them as the value for the primary key. As another example, the section table, which has the combination of (course id, section id, semester, year) as primary key, could instead have a section identifier that is unique across all sections as primary key, with the course id, section id, semester, year as non-primary key attributes. The difference would be that the relations that refer to section, namely teaches and takes, would have a single unique section id attribute as a foreign key referring to section, and would not need to store course id, section id, semester, and year.
Bodie2eChapter05 Household Saving and Investment Decisions 英文版PPT金融学(第二版) 教学课件

fund H um anC ap C apital
300000 200000 100000 0 35 -100000 Age
12
45
55
65
75
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall
The Inter-temporal Budget Constraint
– The analysis becomes progressively more complex as we make the assumptions more realistic.
• What if you don’t know your date of death., returns are risky, et cetera?
8 Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall
Maintain the same level of consumption spending
– Assume that your level of real consumption is C
– $30,000*0.75 = $22,500/year – using your calculator compute the present value of the retirement funds as an regular annuity
n=15, i = 3, FV=0, PMT=-22,500 -> PV=268,604
Chapter 5: Household Saving and Investment Decisions
复旦大学-计算机基础(全英文)--Chapter05PPT课件

051200 WEP, WPA, and PSK are examples of WiFi networks.
051300 Public key encryption uses a public key to encrypt messages, but a private key is required to decrypt messages.
Answer A for True and B for False
051000 A wireless infrastructure network uses a centralized broadcasting device, such as a wireless access point or router.
Metropolitan Area Network (MAN) – public high-speed network with range of about 50 miles
Wide Area Network (WAN) – consists of several smaller networks
9
5 Network Devices
Each connection point on a network is referred to as a node To connect to a LAN, a computer requires network circuitry,
8
5 LAN Standards
LAN technologies are standardized by the Institute of Electrical and Electronics Engineers (IEEE) Project 802 – Local Network Standards – IEEE 802.3 – ARCnet – Token Ring – FDDI – Ethernet
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
11
12
3
SELECT Statement
SELECT [DISTINCT | ALL] {* | [columnExpression [AS newName]] [,...] } FROM TableName [alias] [, ...] [WHERE condition] [GROUP BY columnList] [HAVING condition] [ORDER BY columnList]
6
History of SQL
In late 1970s, ORACLE appeared and was probably first commercial RDBMS based on SQL. In 1987, ANSI and ISO published an initial standard for SQL. In 1989, ISO published an addendum that defined an ‘Integrity Enhancement Feature’. In 1992, first major revision to ISO standard occurred, referred to as SQL2 or SQL/92. In 1999, SQL3 was released with support for objectoriented data management.
5
History of SQL
In 1974, D. Chamberlin (IBM San Jose Laboratory) defined language called ‘Structured English Query Language’ (SEQUEL). A revised version, SEQUEL/2, was defined in 1976 but name was subsequently changed to SQL for legal reasons. Still pronounced ‘see-quel’, though official pronunciation is ‘S-Q-L’. IBM subsequently produced a prototype DBMS called System R, based on SEQUEL/2. Roots of SQL, however, are in SQUARE (Specifying Queries as Relational Expressions), which predates System R project.
9
10
Writing SQL Commands
Use extended form of BNF notation: - Upper-case letters represent reserved words.
- Lower-case letters represent user-defined words. - | indicates a choice among alternatives. - Curly braces indicate a required element. - Square brackets indicate an optional element. - … indicates optional repetition (0 or more).
3
Objectives of SQL
SQL (Structured Query Language) is a transformoriented language with 2 major components: – A DDL for defining database structure. – A DML for retrieving and updating data. Until SQL3, SQL did not contain flow of control commands. These had to be implemented using a programming or job-control language, or interactively by the decisions of user. SQL is relatively easy to learn: – it is non-procedural - you specify what information you require, rather than how to get it; – it is essentially free-format.
Importance of SQL
SQL has become part of application architectures such as IBM’s Systems Application Architecture. It is strategic choice of many large and influential organizations (e.g., X/OPEN consortium for UNIX standards). SQL is Federal Information Processing Standard (FIPS) to which conformance is required for all sales of databases to American Government. SQL is used in other standards and even influences development of other standards as a definitional tool. Examples include: – ISO’s Information Resource Directory System (IRDS) Standard – Remote Data Access (RDA) Standard.
Chapter 5 - Objectives
Purpose and importance of SQL. How to retrieve data from database using SELECT and: – Use compound WHERE conditions. – Sort query results using ORDER BY. – Use aggregate functions. – Group data using GROUP BY and HAVING. – Use subqueries. – Join tables together. – Perform set operations (UNION, INTERSECT, EXCEPT). How to update database using INSERT, UPDATE, and DELETE.
Can be used by range of users including DBAs, management personnel, application developers, and other types of end users. An ISO standard now exists for SQL, making it both the formal and de facto standard language for relational databases.
Literals
Literals are constants used in SQL statements. All non-numeric literals must be enclosed in single quotes (e.g. ‘London’). All numeric literals must not be enclosed in quotes (e.g. 650.00).
SELECT Statement
FROM WHERE GROUP BY HAVING SELECT ORDER BY Specifies table(s) to be used. Filters rows subject to some condition. Forms groups of rows with same column value. Filters groups subject to some condition. Specifies which columns are to appear in output. Specifies the order of the output.
4
1
Objectives of SQL
Consists of standard English words:
1) CREATE TABLE Staff(staffNo VARCHAR(5), lName VARCHAR(15), salary DECIMAL(7,2)); 2) INSERT INTO Staff VALUES (‘SG16’, ‘Brown’, 8300); 3) SELECT staffNo, lName, salary FROM Staff WHERE salary > 10000;
7 82Wrຫໍສະໝຸດ ting SQL Commands
SQL statement consists of reserved words and userdefined words.
–
Writing SQL Commands
Most components of an SQL statement are case insensitive, except for literal character data. More readable with indentation and lineation: – Each clause should begin on a new line. – Start of a clause should line up with start of other clauses. – If clause has several parts, should each appear on a separate line and be indented under start of clause.