oracle 知识点问答

1.数据模型有那些分类 ?Oracle 属于那种数据类型.
    4lei
    层次
网状
关系
面向对象
   关系型

2.视图中存储的是什么?如何删除视图?
      一组sql语句。drop view 视图名 。    

3.索引有那些类型?如何创建索引?
      唯一索引  :必须满足唯一约束。
      组合索引  
      函数索引
    create unique index ix_e on emp(字段);
    提高查询的效率,降低修改的效率。   

4.Oracle中文件 包括 那些种类?
    数据文件
    控制文件
    日志文件  

5.oracle中数据类型有那些?如何创建表格?修改表格中的列
     char
     varchar2
    number
    date
    clob
    blob
   
   create table 表名称 (
    列名称 数据类型,。。。

   update table
DDL
   alter table 表名称  add 列名称 数据类型
    alter table 表名称 drop column 列名称
    alter table 表名称 rename column jiu to xin
    alter table 表mingc modify 列名称 数据类型  
    


6.ER图的关系,有哪些?范式有那些?分别说明下?
     实体关系图
     1:1
     1:n n:1
     n:m
   1nf:每一列不可分割
   2nf:  每行只记录一件事情,每行加主键
   3nf:  每列完全依赖于主键,  

7.常见约束的种类有那些?分别说明?
  not  null --创建表格
  default --创建表格
  check
  primary key
  foriegn key
  unique
 
 alter table 表ming add constraint 约束名称  约束 (列 ) 条件

8.查询的运算符有那些?分别说明?
     = > < >= <= <> !=   between and  in   % _     and or not  
      

9.连接查询有哪些?请分别说明。
      inner join:
      left join:
      right join:
      cross join:     

  select
from  t1
inner join t2
on t1.条件 t2.

  inner join t1 t2 同时满足条件的数据显示出来
  left join  t1表中的数据全部显示出来,t2表中满足条件的显示,不满足的显示null
  right join t2中的数据全部显示出来,t1满足显示,不满足显示为null
  cross join 两个表的乘积
 
    minus
     intersect
    union
    union all

10.序列中的伪列?创建序列的参数?
      rownum  rowid ;
      nextval ,currval
    create sequence sq_
    start with nu1
    increment by nu2
    maxvalue
    cycle|nocycle
    cache nu3
         

11.plSQL 的流程控制有那些?分别说明?
        顺序
        选择:
    if  then
    end if;
    if  then
    else
    end if;
    if  then
    elsif then
    else
    end if;
   
   case
     when 条件  then
    end  case;
    case 变量
    when  值1 then
   end  case;
        循环:
          


12.常见的系统异常有那些?  plsql
     转换异常
     没有找到值
     返回值太多
     除数为0
     违反唯一约束
   exception
    when 异常名称 then
      

13.存储过程在的参数类型有几种?默认是什么? 存储过程和函数的区别?
      in  
      out
     in out
   默认是 in
    
  使用范围:
      存储过程 plsql 中 ,cmd命令行
      函数 只能在plsql中,可以在selct 后面   
  返回值:
      存储过程可以有多个,也以没有
      函数只能有一个,必须有。  
   
14.聚合函数有那些?
      sum
      avg
      max
      min
      count    

15.事物的特点有哪些?
      
      原子性:修改的操作不可以再拆分。
      一致性:结果保存一致,同成功或同时失败
      隔离性:事物之间不影响
      持久性:发生改变后,永久变更。

16.常见的角色有哪些?
       connect
       dba
       resource
   grant 权限,角色 to 用户
   revoke  权限,角色 from 用户    
    

原文地址:https://www.cnblogs.com/ws1313123/p/6424764.html