亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ch12.htm

?? Learn SQL in an easy way...
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
</FONT></PRE><H5>ANALYSIS:</H5><P>Once again, Jill tried to go around the privileges that she had been given. Naturally,Oracle caught this error and corrected her quickly.</P><H5>INPUT/OUTPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>UPDATE Bryan.SALARIES</B>  2  <B>SET SALARY = 35000</B>  3  <B>WHERE NAME = 'JOHN';</B>1 row updated.SQL&gt; <B>SELECT *</B>  2 <B> FROM Bryan.SALARIES;</B>NAME                              SALARY       AGE------------------------------ --------- ---------JACK                               35000        29JILL                               48000        42JOHN                               35000        55</FONT></PRE><H5>ANALYSIS:</H5><P>You can see now that the update works as long as Jill abides by the privilegesshe has been given.<H3><FONT COLOR="#000077">Using Views for Security Purposes</FONT></H3><P>As we mentioned on Day 10, &quot;Creating Views and Indexes,&quot; views are virtualtables that you can use to present a view of data that is different from the wayit physically exists in the database. Today you will learn more about how to useviews to implement security measures. First, however, we explain how views can simplifySQL statements.</P><P>Earlier you learned that when a user must access a table or database object thatanother user owns, that object must be referenced with a username. As you can imagine,this procedure can get wordy if you have to write writing several SQL queries ina row. More important, novice users would be required to determine the owner of atable before they could select the contents of a table, which is not something youwant all your users to do. One simple solution is shown in the following paragraph.<H4><FONT COLOR="#000077">A Solution to Qualifying a Table or View</FONT></H4><P>Assume that you are logged on as Jack, your friend from earlier examples. Youlearned that for Jack to look at the contents of the <TT>SALARIES</TT> table, hemust use the following statement:</P><H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>SELECT *</B>  2  <B>FROM Bryan.SALARIES;</B></FONT></PRE><H5><FONT SIZE="2" COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">NAME                              SALARY       AGE------------------------------ --------- ---------JACK                               35000        29JILL                               48000        42JOHN                               35000        55</FONT></PRE><P>If you were to create a view named <TT>SALARY_VIEW</TT>, a user could simply selectfrom that view.</P><H5>INPUT/OUTPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>CREATE VIEW SALARY_VIEW</B>  2  <B>AS SELECT *</B>  3 <B> FROM Bryan.SALARIES;</B>View created.SQL&gt; <B>SELECT * FROM SALARY_VIEW;</B>NAME                              SALARY       AGE------------------------------ --------- ---------JACK                               35000        29JILL                               48000        42JOHN                               35000        55</FONT></PRE><H5>ANALYSIS:</H5><P>The preceding query returned the same values as the records returned from <TT>Bryan.SALARIES</TT>.<H3><FONT COLOR="#000077">Using Synonyms in Place of Views</FONT></H3><P>SQL also provides an object known as a synonym. A synonym provides an alias fora table to simplify or minimize keystrokes when using a table in an SQL statement.There are two types of synonyms: private and public. Any user with the resource rolecan create a private synonym. On the other hand, only a user with the DBA role cancreate a public synonym.</P><P>The syntax for a public synonym follows.</P><H5>SYNTAX:</H5><PRE><FONT COLOR="#0066FF">CREATE [PUBLIC] SYNONYM [schema.]synonymFOR [schema.]object[@dblink] </FONT></PRE><P>In the preceding example, you could have issued the following command to achievethe same results:</P><H5>INPUT/OUTPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>CREATE PUBLIC SYNONYM SALARY FOR SALARIES</B></FONT></PRE><PRE><FONT COLOR="#0066FF">Synonym created.</FONT></PRE><P>Then log back on to Jack and type this:</P><H5>INPUT/OUTPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>SELECT * FROM SALARY;</B>NAME                              SALARY       AGE------------------------------ --------- ---------JACK                               35000        29JILL                               48000        42JOHN                               35000        55</FONT></PRE><H4><FONT COLOR="#000077">Using Views to Solve Security Problems</FONT></H4><P>Suppose you changed your mind about Jack and Jill and decided that neither ofthem should be able to look at the <TT>SALARIES</TT> table completely. You can useviews to change this situation and allow them to examine only their own information.</P><H5>INPUT/OUTPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>CREATE VIEW JACK_SALARY AS</B>  2  <B>SELECT * FROM BRYAN.SALARIES</B>  3  <B>WHERE NAME = 'JACK';</B>View created.</FONT></PRE><H5><FONT COLOR="#000000">INPUT/OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>CREATE VIEW JILL_SALARY AS</B>  2  <B>SELECT * FROM BRYAN.SALARIES</B>  3  <B>WHERE NAME = 'JILL';</B>View created.</FONT></PRE><H5><FONT COLOR="#000000">INPUT/OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>GRANT SELECT ON JACK_SALARY</B>  2  <B>TO JACK;</B>Grant succeeded.</FONT></PRE><H5><FONT COLOR="#000000">INPUT/OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>GRANT SELECT ON JILL_SALARY</B>  2  <B>TO JILL;</B>Grant succeeded.</FONT></PRE><H5><FONT COLOR="#000000">INPUT/OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">SQL&gt; R<B>EVOKE SELECT ON SALARIES FROM JACK;</B>Revoke succeeded.</FONT></PRE><H5><FONT COLOR="#000000">INPUT/OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>REVOKE SELECT ON SALARIES FROM JILL;</B>Revoke succeeded.</FONT></PRE><P>Now log on as Jack and test out the view you created for him.</P><H5>INPUT/OUTPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>SELECT * FROM Bryan.JACK_SALARY;</B>NAME       SALARY     AGE---------- ---------- ----Jack       35000      29</FONT></PRE><H5><FONT COLOR="#000000">INPUT/OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>SELECT * FROM PERKINS.SALARIES;</B>SELECT * FROM PERKINS.SALARIES                      *</FONT></PRE><PRE><FONT COLOR="#0066FF">ERROR at line 1:ORA-00942: table or view does not exist</FONT></PRE><P>Log out of Jack's account and test Jill's:</P><H5>INPUT/OUTPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>SELECT * FROM Bryan.JILL_SALARY;</B>NAME               SALARY        AGE------------------ ------------- ----Jill               48000         42</FONT></PRE><H5>ANALYSIS:</H5><P>You can see that access to the <TT>SALARIES</TT> table was completely controlledusing views. SQL enables you to create these views as you like and then assign permissionsto other users. This technique allows a great deal of flexibility.</P><P>The syntax to drop a synonym is</P><H5>SYNTAX:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; drop [public] synonym synonym_name;</FONT></PRE><BLOCKQUOTE>	<P><HR><FONT COLOR="#000077"><B>NOTE:</B></FONT><B> </B>By now, you should understand the	importance of keeping to a minimum the number of people with DBA roles. A user with	this access level can have complete access to all commands and operations within	the database. Note, however, that with Oracle and Sybase you must have DBA-level	access (or SA-level in Sybase) to import or export data on the database. <HR></BLOCKQUOTE><H3><FONT COLOR="#000077">Using the WITH GRANT OPTION Clause</FONT></H3><P>What do you think would happen if Jill attempted to pass her <TT>UPDATE</TT> privilegeon to Jack? At first glance you might think that Jill, because she was entrustedwith the <TT>UPDATE</TT> privilege, should be able to pass it on to other users whoare allowed that privilege. However, using the <TT>GRANT</TT> statement as you didearlier, Jill cannot pass her privileges on to others:</P><PRE><FONT COLOR="#0066FF">SQL&gt; <B>GRANT SELECT, UPDATE(SALARY) ON Bryan.SALARIES TO Jill;</B></FONT></PRE><P>Here is the syntax for the <TT>GRANT</TT> statement that was introduced earliertoday:</P><H5>SYNTAX:</H5><PRE><FONT COLOR="#0066FF">GRANT {object_priv | ALL [PRIVILEGES]} [ (column[, column]...) ][, {object_priv | ALL [PRIVILEGES]} [ (column[, column] ...) ] ] ...ON [schema.]objectTO {user | role | PUBLIC} [, {user | role | PUBLIC}] ...[WITH GRANT OPTION]</FONT></PRE><P>What you are looking for is the <TT>WITH GRANT OPTION</TT> clause at the end ofthe <TT>GRANT</TT> statement. When object privileges are granted and <TT>WITH GRANTOPTION</TT> is used, these privileges can be passed on to others. So if you wantto allow Jill to pass on this privilege to Jack, you would do the following:</P><H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>GRANT SELECT, UPDATE(SALARY)</B>  2  <B>ON Bryan.SALARIES TO JILL</B>  3  <B>WITH GRANT OPTION;</B></FONT></PRE><H5><FONT COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">Grant succeeded.</FONT></PRE><P>Jill could then log on and issue the following command:</P><H5>INPUT/OUTPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>GRANT SELECT, UPDATE(SALARY)</B>  2 <B> ON Bryan.SALARIES TO JACK;</B>Grant succeeded.</FONT></PRE><H2><FONT COLOR="#000077">Summary</FONT></H2><P>Security is an often-overlooked topic that can cause many problems if not properlythought out and administered. Fortunately, SQL provides several useful commands forimplementing security on a database.</P><P>Users are originally created using the <TT>CREATE USER</TT> command, which setsup a username and password for a user. After the user account has been set up, thisuser must be assigned to a role in order to accomplish any work. The three rolesavailable within Oracle7 are Connect, Resource, and DBA. Each role has differentlevels of access to the database, with Connect being the simplest and DBA havingaccess to everything.</P><P>The <TT>GRANT</TT> command gives a permission or privilege to a user. The <TT>REVOKE</TT>command can take that permission or privilege away from the user. The two types ofprivileges are object privileges and system privileges. The system privileges shouldbe monitored closely and should not be granted to inexperienced users. Giving inexperiencedusers access to commands allows them to (inadvertently perhaps) destroy data or databasesyou have painstakingly set up. Object privileges can be granted to give users accessto individual objects existing in the owner's database schema.</P><P>All these techniques and SQL statements provide the SQL user with a broad rangeof tools to use when setting up system security. Although we focused on the securityfeatures of Oracle7, you can apply much of this information to the database systemat your site. Just remember that no matter what product you are using, it is importantto enforce some level of database security.<H2><FONT COLOR="#000077">Q&amp;A</FONT></H2><DL>	<DD><B>Q I understand the need for security, but doesn't Oracle carry it a bit too	far?</B>	<P><B>A </B>No, especially in larger applications where there are multiple users.	Because different users will be doing different types of work in the database, you'll	want to limit what users can and can't do. Users should have only the necessary roles	and privileges they need to do their work.</P>	<P><B>Q It appears that there is a security problem when the DBA that created my	ID also knows the password. Is this true?</B></P>	<P><B>A </B>Yes it is true. The DBA creates the IDs and passwords. Therefore, users	should use the <TT>ALTER USER</TT> command to change their ID and password immediately	after receiving them.</DL><H2><FONT COLOR="#000077">Workshop</FONT></H2><P>The Workshop provides quiz questions to help solidify your understanding of thematerial covered, as well as exercises to provide you with experience in using whatyou have learned. Try to answer the quiz and exercise questions before checking theanswers in Appendix F, &quot;Answers to Quizzes and Exercises.&quot;<H3><FONT COLOR="#000077">Quiz</FONT></H3><DL>	<DD><B>1. </B>What is wrong with the following statement?</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF">SQL&gt; <B>GRANT CONNECTION TO DAVID;</B></FONT></PRE></BLOCKQUOTE><DL>	<DD><B>2. </B>True or False (and why): Dropping a user will cause all objects owned	by that user to be dropped as well.	<P><B>3.</B> What would happen if you created a table and granted select privileges	on the table to <TT>public</TT>?</P>	<P><B>4.</B> Is the following SQL statement correct?</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF">SQL&gt; <B>create user RON</B>     <B>identified by RON;</B></FONT></PRE></BLOCKQUOTE><DL>	<DD><B>5.</B> Is the following SQL statement correct?</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF">SQL&gt; <B>alter RON     identified by RON;</B></FONT></PRE></BLOCKQUOTE><DL>	<DD><B>6.</B> Is the following SQL statement correct?</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF">SQL&gt; <B>grant connect, resource to RON;</B></FONT></PRE></BLOCKQUOTE><DL>	<DD><B>7.</B> If you own a table, who can select from that table?</DL><H3><FONT COLOR="#000077">Exercise</FONT></H3><DL>	<DD><B>1.</B> Experiment with your database system's security by creating a table	and then by creating a user. Give this user various privileges and then take them	away.</DL><H1></H1><CENTER><P><HR><A HREF="../ch11/ch11.htm"><IMG SRC="../buttonart/previous.gif" WIDTH="128" HEIGHT="28"ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../ch13/ch13.htm"><IMGSRC="../buttonart/next.gif" WIDTH="128" HEIGHT="28" ALIGN="BOTTOM" ALT="Next chapter"BORDER="0"></A><A HREF="../index.htm"><IMG SRC="../buttonart/contents.gif" WIDTH="128"HEIGHT="28" ALIGN="BOTTOM" ALT="Contents" BORDER="0"></A> <BR><BR><BR><IMG SRC="../buttonart/corp.gif" WIDTH="284" HEIGHT="45" ALIGN="BOTTOM" ALT="Macmillan Computer Publishing USA"BORDER="0"></P><P>&#169; <A HREF="../copy.htm">Copyright</A>, Macmillan Computer Publishing. Allrights reserved.</CENTER></BODY></HTML>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲女与黑人做爰| 欧美草草影院在线视频| 亚洲男人的天堂网| 99精品视频在线观看| 亚洲蜜桃精久久久久久久| 色欧美片视频在线观看| 午夜精品在线视频一区| 日韩欧美中文字幕公布| 国产福利91精品| 伊人开心综合网| 欧美人体做爰大胆视频| 久久99精品国产麻豆不卡| 国产目拍亚洲精品99久久精品| 成人综合婷婷国产精品久久| 亚洲品质自拍视频网站| 日韩午夜中文字幕| 大胆欧美人体老妇| 亚洲图片欧美一区| 久久先锋资源网| 日本韩国精品在线| 激情图片小说一区| 亚洲人成精品久久久久久| 欧美一区二区三区精品| 高清国产一区二区三区| 亚洲午夜激情av| 国产亚洲综合在线| 91福利在线看| 国产精品一区在线| 亚洲韩国一区二区三区| 欧美经典一区二区| 欧美日韩成人高清| 成人久久久精品乱码一区二区三区| 亚洲电影一区二区| 欧美激情一区三区| 欧美精品v日韩精品v韩国精品v| 国产一区二区伦理| 亚洲成人综合视频| 成人免费在线播放视频| 日韩精品影音先锋| 色香蕉久久蜜桃| 国产精品1区2区3区| 五月婷婷色综合| 亚洲男人都懂的| 国产女同性恋一区二区| 日韩欧美另类在线| 欧美性感一区二区三区| 成人av资源网站| 国产乱码精品一品二品| 色哟哟在线观看一区二区三区| 在线亚洲欧美专区二区| 欧美精品自拍偷拍动漫精品| 精品午夜久久福利影院| 国产偷国产偷亚洲高清人白洁| 91麻豆精品国产无毒不卡在线观看 | 4438x成人网最大色成网站| 欧美日韩精品二区第二页| 在线播放国产精品二区一二区四区| 欧美日本国产视频| 精品久久久久一区| 中文av一区特黄| 一区二区三区免费| 婷婷中文字幕综合| 激情图片小说一区| 99这里只有精品| 欧美日韩精品一区二区天天拍小说| 欧美一区二区三区爱爱| 日本一区二区不卡视频| 一区二区三区av电影| 免费成人小视频| 粉嫩aⅴ一区二区三区四区五区| 色哟哟日韩精品| 日韩欧美国产综合一区 | 成人在线视频一区二区| 97国产精品videossex| 91精选在线观看| 国产亚洲制服色| 亚洲电影在线免费观看| 国产成人av一区二区三区在线| 99re在线精品| 欧美一区二区在线观看| 国产精品久久久久久久久免费樱桃| 亚洲综合999| 丁香网亚洲国际| 日韩一区二区高清| ...av二区三区久久精品| 免费人成在线不卡| 91首页免费视频| 欧美精品一区二区三区一线天视频 | 欧美成人精品1314www| 国产精品国产自产拍高清av| 三级欧美韩日大片在线看| 国产成人av福利| 8v天堂国产在线一区二区| 国产精品入口麻豆九色| 蜜乳av一区二区| 色88888久久久久久影院按摩| 日韩你懂的电影在线观看| 亚洲男人的天堂网| 国产成人综合自拍| 日韩午夜精品电影| 一区二区三区不卡在线观看| 国产99久久久久久免费看农村| 欧美一级理论性理论a| 一区二区三区四区在线免费观看 | 99在线精品一区二区三区| 欧美成人午夜电影| 午夜影院在线观看欧美| 91在线porny国产在线看| 久久午夜免费电影| 蜜桃久久久久久| 欧美日韩中文字幕一区| 最新久久zyz资源站| 国产真实乱子伦精品视频| 欧美丰满嫩嫩电影| 亚洲综合在线观看视频| av网站免费线看精品| 久久久噜噜噜久久中文字幕色伊伊 | 成人精品gif动图一区| 精品欧美一区二区在线观看| 天天操天天色综合| 欧美色倩网站大全免费| 亚洲欧美日韩一区二区| 成人av免费在线观看| 久久精品欧美日韩精品| 国产精品自拍av| 久久综合久久久久88| 久久精品国产精品亚洲精品| 欧美精品1区2区| 偷拍自拍另类欧美| 欧美一区二区大片| 青青青伊人色综合久久| 6080yy午夜一二三区久久| 五月天一区二区三区| 欧美日韩国产首页| 热久久久久久久| 日韩午夜激情电影| 理论片日本一区| 久久综合999| 国产麻豆成人精品| 国产精品人妖ts系列视频| 成人av电影免费在线播放| 国产精品免费视频观看| 成人免费va视频| 亚洲黄色免费电影| 欧美三级日本三级少妇99| 五月婷婷欧美视频| 精品国产一二三区| 国产成人精品午夜视频免费| 中文欧美字幕免费| 91电影在线观看| 日韩精品国产欧美| 欧美xxxxx裸体时装秀| 国产高清精品网站| 成人欧美一区二区三区在线播放| 欧美综合一区二区三区| 日韩精品欧美成人高清一区二区| 亚洲精品一区二区精华| 成人激情动漫在线观看| 一区二区不卡在线播放 | 国产日本欧洲亚洲| 97精品视频在线观看自产线路二| 一区二区免费视频| 精品国内二区三区| 99麻豆久久久国产精品免费优播| 亚洲激情一二三区| 91精品麻豆日日躁夜夜躁| 国模无码大尺度一区二区三区| 欧美国产一区二区| 在线免费观看不卡av| 日本午夜精品视频在线观看| 久久精品这里都是精品| 欧美亚洲高清一区| 精品一区中文字幕| 亚洲美女偷拍久久| 日韩欧美高清一区| 91美女福利视频| 日韩精品亚洲一区| 国产精品久线观看视频| 欧美丰满少妇xxxbbb| 成人av免费网站| 免费观看30秒视频久久| 国产精品理论片在线观看| 在线不卡中文字幕| www.欧美色图| 麻豆视频一区二区| 一区二区三区欧美激情| 久久色成人在线| 欧美图区在线视频| 国产a级毛片一区| 美女脱光内衣内裤视频久久网站| 亚洲日本在线a| 国产色91在线| 3atv一区二区三区| 色综合色狠狠天天综合色| 精品一区二区三区免费观看| 亚洲电影在线免费观看| 国产精品久久久久久久久久久免费看| 6080日韩午夜伦伦午夜伦| 91首页免费视频| 成人免费av在线|