楼主: easyfree

[精华] 培训: 001 Lesson 1-15 -- 2001/11/20最新补充: Lesson 14-15

[复制链接]
论坛徽章:
25
ITPUB元老
日期:2005-02-28 12:57:00管理团队成员
日期:2011-05-07 01:45:082012新春纪念徽章
日期:2012-02-13 15:11:182012新春纪念徽章
日期:2012-02-13 15:11:182012新春纪念徽章
日期:2012-02-13 15:11:182012新春纪念徽章
日期:2012-02-13 15:11:182012新春纪念徽章
日期:2012-02-13 15:11:18马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14
31#
 楼主| 发表于 2001-11-20 18:35 | 只看该作者

Lesson 14-15

[php]
Lession14        Creating Views

* CREATE [OR REPLACE] [FORCE|NOFORCE] VIEW view [(alias[, alias]...)] AS subquery [WITH CHECK OPTION [CONSTRAINT constraint]] [WITH READ ONLY]
  FORCE                creates the view regardless of whether the base tables exist or not. 创建时若基表不存在,则提示:警告: 创建的视图带有编译错误,但可以创建,以后基表建立后,该视图可以直接使用;
  NOFORCE        creates the view only if the base tables exist. This is the default. 缺省
  WITH CHECK OPTION        specifies that only rows accessible to the view may be inserted or updated. 不能插入或修改不符合建立视图条件的表记录
  constraint        is the name assigned to the CHECK OPTION constraint.
  WITH READ ONLY        ensures that no DML operations can be performed on this view. 限制任何对view的DML操作
* CeateViewAsSelect 注意7和8i的一个区别是:8i以前的版本不允许使用order by (而目前OCP考试是以7为准的)
* 对视图进行DML操作的限制
        不能删除记录:存在组函数、GROUP BY子句、DISTINCT
        不能修改记录:列上使用了函数、有ROWNUM类的伪列
        不能插入记录:表中的NOT NULL列没有在视图中选取
* You can query USER_UPDATABLE_COLUMNS to see whether the columns in a join view are updatable.
* Any UPDATE, INSERT, or DELETE statement on a join view can modify only one underlying base table. If at least one column in the subquery join has a unique index, then it may be possible to modify one base table in a join view.
* Only the creator or a user with the DROP ANY VIEW privilege can remove a view.
-----------------------------------------------
Lession15        Creating Indexes

* Reference the column that has an index in the predicate WHERE clause without modifying the indexed column with a function or expression.
* The fastest way to access any particular row is by referencing its ROWID.
* Rule-based optimization is when the Oracle7 Server decides when it is appropriate to use an index based on its internal rules. The Server identifies the columns that are indexed and the index types.
* The cost-based optimization method uses statistics about tables along with information about available indexes to select an execution plan or the SQL statements.
* An index does not have to be in the same tablespace as the associated table. Furthermore, performance of queries that use an index can be improved by storing an index and its table in different tablespaces located on different disk drives because both the index and the table data can be retrieved in parallel.
* Primary keys can be a combination of up to 16 column values.
* The order of the columns in a concatenated index is important. The Server reads the columns left to right when choosing the efficiency for he index look up.
* To create an index in your schema, you must have CREATE INDEX privileges.
* When to Create a Index
        The column is used frequently in the WHERE clause or in a join condition.
        The column contains a wide range of values.
        The column contains a large number of null values.
        Two or more columns are frequently used together in a WHERE clause or join condition.
        The table is large and most queries are expected to retrieve less than 2–4% of the rows.
* When to Not Create a Index
        The table is small.
        The columns are not often used as a condition in the query.
        Most queries are expected to retrieve more than 2–4% of the rows.
        The table is updated frequently.
* To optimize joins, you can create an index on the FOREIGN KEY column, which will speed up the search to match rows to the PRIMARY KEY column.
* The optimizer does not use an index if the WHERE clause contains the IS NULL expression.
* In order to drop an index, you must be the owner of the index or have the DROP ANY INDEX privilege.
* If drop a table, indexes and constraints would be automatically dropped, but views and sequences remain.
* USER_INDEXES / USER_IND_COLUMNS

? B+ tree的原理? The Oracle7 Server uses a balanced B*tree index structure. This is a binary,
self-balancing search structure to equalize access times to any row. It is an efficient
method of ensuring that access to any specified value will take approximately the
same time whether the row is at the beginning, middle, or end of the table.
Each index that the Oracle7 Server builds consists of a number of pages (or branches)
of storage arranged in a tree. Each page (or branch) holds a series of key values and
pointers to pages (or branches) lower in the structure until eventually the key values
indicate the location of the data itself. The location identifier at the database level is
called a ROWID.
[/php]

使用道具 举报

回复
论坛徽章:
3
ITPUB元老
日期:2005-02-28 12:57:00授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34
32#
发表于 2001-11-22 15:30 | 只看该作者
我手头上的1Z0-001的资料都是讲oracle7的,8I考试中就是这些吗?是从smiling.com.cn上下载的,其它几门是讲8i,但不知道为何这一本只讲7呢,我下载的版本是否正确?

使用道具 举报

回复
论坛徽章:
3
ITPUB元老
日期:2005-02-28 12:57:00授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34
33#
发表于 2001-11-22 15:32 | 只看该作者
本来不想考的,但看看书之后,思路真的清晰了不少,还是考一个吧,easyfree,辛苦了

使用道具 举报

回复
论坛徽章:
25
ITPUB元老
日期:2005-02-28 12:57:00管理团队成员
日期:2011-05-07 01:45:082012新春纪念徽章
日期:2012-02-13 15:11:182012新春纪念徽章
日期:2012-02-13 15:11:182012新春纪念徽章
日期:2012-02-13 15:11:182012新春纪念徽章
日期:2012-02-13 15:11:182012新春纪念徽章
日期:2012-02-13 15:11:18马上有车
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14
34#
 楼主| 发表于 2001-11-23 14:59 | 只看该作者
最初由 抑剑 发布
[B]我手头上的1Z0-001的资料都是讲oracle7的,8I考试中就是这些吗?是从smiling.com.cn上下载的,其它几门是讲8i,但不知道为何这一本只讲7呢,我下载的版本是否正确? [/B]



原来smiling上的版本确实是7的,不过也够用了

8的版本我有, 你可以看看置顶的资料的帖子, 我上传了8的ppt

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表