|
Re: Oracle--毛病篇
Good article. Some comments below:
> 2. SQLPLUS环境下命令行编辑功能微弱得可怜, 看看readline, 看看MySQL
If you use DOS sqlplus, you can delete, use arrow keys, Control-arrow keys.
> 3. SQLPLUS环境的命令行没有历史记录功能, 看看MySQL. gdb, bash
Same above
> 4. 命名规范混乱得一踏糊涂. user_tab_columns, user_con_constraints, user_tables, usre_cons_columns
What's user_con_constraints? I don't have any confusion. It goes from higher to lower level: tables -> columns -> constraints (constraints are attributes of columns). In the middle, it's abbreviated (table -> tab, column -> col, constraint -> cons). At the end, it's fully spelled out. There're exceptions such as dba_rollback_segs, not called dba_rollback_segments, as you correctly criticized in Point 15.
> 5. SQLPLUS环境的初始化文件的location的要求, 看看.bashrc, .vimrc, .netrc, .emacs, .newsrc...摸一个都比它强, 我要使用你的login.sql还非得在每一个当前目录下都弄一份, 随身携带呀? 好在这一点可以通过SQLPATH环境变量的设置来搞定.
glogin.sql is in $ORACLE_HOME/sqlplus/admin. Isn't that enough?
> 10. 在sqlplus下help set看看, 找出一个叫set severout[put] on|off的选项
注意, 它是severout, 你在sqlplus下set severout on试试,
SP2-0158: unknown SET option "severout" 了吧?
set serverout on
是的, 就一个字母而已.
编程大师说: 任何软件都有BUG.
但, 一个如此小的BUG可以让一个全球第二大的软件公司带着它走过几个版本?
Oracle8.15 Oracle8.16 Oracle8.17...难道保留错误是为了兼容性?
后记: 我终于看到Oracle9i版里对此有了改进, 略感欣慰.
I don't have any problem running "set serverout on" on 7.3.4.4, 8.0.5 and 8.1.7 database. Can you show us a screenshot? Make sure you tell us sqlplus version.
> 15. 命名
user_cons_columns;
user_constraints;
user_rollback_segs;
它真的要把segment统统缩写为segs吗? 把constraints缩写为cons? 把columns缩写为cols? 不, ORACLE的程序员们想怎么样就怎么样. 他们是觉得单词的全称太长了吗? 不见得, desc dba_users;看一下看看INITIAL_RSRC_CONSUMER_GROUP字段, 看看temporary_tablespace字段.
Abbreviation is usually done when the word is in the middle. DBA_rollback_segs (not user_rollback_segs) is an exception. Anything ending with "_privs" is also exception but we're already used to "_privs".
> 再来看看一下create table:
create table tname (col1 type,...) storage(initial .. next ..
minextents .. maxextents ..) ...;
desc user_tables;
inital_extent
next_extent
minextents
maxextents
不要问他们为什么有的用单数有的用复数, 因为他们是ORACLE. 他们想这样.
dba_tables中owner
dba_sequences中叫sequence_owner
user_tab_columns是关于一张表中列信息的, _tab_columns
user_cons_columns是关于表中字段的约束信息的, _cons_columns
Singular indicates this is for one single item; plural for multiple. Isn't that clear? Initial, next should be singular, max- or min- extents should be plural. I have no problem. You're correct, though, about the "owner" and "sequence_owner" naming confusion. |
|