zoukankan      html  css  js  c++  java
  • user and schema(转)

    “A schema is a collection of database objects. A schema is owned by a database user and has the same name as that user. 

    Schema objects are the logical structures that directly refer to the database’s data. Schema objects include structures like tables, 

    views, and indexes.(There is no relationship between a tablespace and a schema. Objects in the same schema can be in different tablespaces, 

    and a tablespace can hold objects from different schemas.)”
      官方文档里面说得比较明白,schema是数据对象的集合,包括像表、视图、索引、同义词等等都可以说是schema的对象。但不够生动,网上有篇文章里面

    把schema和user的关系用一个形象的比喻阐述得非常透彻,引用如下:
      “user即Oracle中的用户,和所有系统的中用户概念类似,用户所持有的是系统的权限及资源;而schema所涵盖的是各种对象,它包含了表、函数、

    包等等对象的“所在地”,并不包括对他们的权限控制。好比一个房子,里面放满了家具,对这些家具有支配权的是房子的主人(user),而不是房子(schema)。

    你可以也是一个房子的主人(user),拥有自己的房子(schema).可以通过alter session的方式进入别人的房子。如果你没有特别指定的话,你所做的操作都是针对

    你当前所在房子中的东西。至于你是否有权限使用(select)、搬动(update)或者拿走(delete)这些家具就看这个房子的主人有没有给你这样的权限了,或者你是

    整个大厦(DB)的老大(DBA)。alter session set schema可以用来代替synonyms。如果你想调用其他schema的对象(有权限的前提下),但并没有建synonym,

    同时又不想把其他 schema名字放入代码中,就可以首先使用alter session set schema=<其他schema名字>。”

  • 相关阅读:
    Ubuntu Linux下的Wireshark使用drcom_2011.lua分析drcom协议
    Keil提示premature end of file错误 无法生成HEX文件
    Linux和win7(win10)双系统时间错误问题 时间相差8小时
    Wireshark使用drcom_2011.lua插件协助分析drcom协议
    Keil报错failed to execute 'd:KeilC51BINC51.EXE'
    第一篇博文
    LG 7078 贪吃蛇
    LG 1791 人员雇佣
    洛谷 2698 Flowerpot
    HDU 5965 扫雷
  • 原文地址:https://www.cnblogs.com/lzh1120/p/2000076.html
Copyright © 2011-2022 走看看