Advertisement
Guest User

Untitled

a guest
Aug 10th, 2018
510
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.92 KB | None | 0 0
  1. Notes:
  2.  
  3. Total mark is 100.
  4. Use Oracle 11g, 12c DB Server or Zenit Server along with Oracle SQL Developer while answering questions. If you don't have installed on your home computer, I suggest that you install it first.
  5. You can follow the documents that are on the Blackboard to install Oracle. It is located under Course Documents -> How to Documents.
  6. Answer the questions using Oracle SQL Developer.
  7. Your solutions should be saved as a word file or text file and sent to the Blackboard electronically. It is better if you have all the answers in one file with proper commenting including your student number, your name and question numbers. If you submit more than one file, you need to archive them in a ZIP or RAR file and submit only one file.
  8. Any assignment that is submitted after due date will be punished with 10 points per day. It will be marked as zero after 2 days.
  9. This is an individual assignment. You can discuss it with your friends and classmates but no more than one student should submit the same assignment. If it is done so, both students will be punished with zero.
  10.  
  11.  
  12. DBS301 - Oracle 11g Notes
  13. Image of book cover
  14. Title DBS301 - Oracle 11g Notes
  15. Publisher Oracle
  16. Type Print
  17. Required
  18. Description Available at the Seneca bookstore.
  19. Manual Entry Textbook
  20. Oracle SQL By Example
  21. Image of book cover
  22. Title Oracle SQL By Example
  23. Author Alice Rischert
  24. ISBN 978-0137142835
  25. Publisher Prentice Hall
  26. Publication Date August 12, 2009
  27. Type Print
  28. Recommended
  29. Description http://www.oraclesqlbyexample.com/
  30. Manual Entry Textbook
  31. Oracle 11G: SQL
  32. Image of book cover
  33. Title Oracle 11G: SQL
  34. Author Joan Casteel
  35. ISBN 978-1305268029
  36. Publisher Course Technology
  37. Publication Date June 25, 2015
  38. Type Print
  39. Recommended
  40. Description Learn how to most effectively use PL/SQL programming language with one of the most popular and widely-used software programs in large companies today -- Oracle®11g.
  41. Manual Entry Textbook
  42. OCA Oracle Database 11g: SQL Fundamentals I: A Real World Certification Guide
  43. Image of book cover
  44. Title OCA Oracle Database 11g: SQL Fundamentals I: A Real World Certification Guide
  45. Author Steve Ries
  46. Publisher Packt Publishing
  47. Publication Date December 5, 2011
  48. Type Print
  49. Recommended
  50. Description Ace the 1Z0-051 SQL Fundamentals I exam and become a successful DBA by learning how SQL concepts work in the real world
  51. Manual Entry Textbook
  52. Oracle Database 11g SQL
  53. Image of book cover
  54. Title Oracle Database 11g SQL
  55. Author Jason Price
  56. ISBN 978-0071498500
  57. Publisher McGraw-Hill Education
  58. Publication Date November 26, 2007
  59. Type Print
  60. Recommended
  61. Description Learn SQL to get results with the world’s top database platforms–Oracle for the enterprise and Microsoft Access for the desktop
  62. Manual Entry Textbook
  63. OCA/OCP Oracle Database 11g All-in-One Exam Guide: Exams 1Z0-051, 1Z0-052, 1Z0-053
  64. Image of book cover
  65. Title OCA/OCP Oracle Database 11g All-in-One Exam Guide: Exams 1Z0-051, 1Z0-052, 1Z0-053
  66. Author Bob Bryla, John Watson, Roopesh Ramklass
  67. ISBN 978-0-071-62921-8
  68. Publisher McGraw-Hill Education
  69. Publication Date September 5, 2009
  70. Type Print
  71. Recommended
  72. Manual Entry Textbook
  73. Database Systems: Design, Implementation, & Management
  74. Image of book cover
  75. Title Database Systems: Design, Implementation, & Management
  76. Author Carlos Coronel, Steven Morris
  77. ISBN 978-1285196145
  78. Publisher Course Technology; 11 edition
  79. Publication Date February 4, 2014
  80. Binding http://www.amazon.com/Database-Systems-Design-Implementation-Management/dp/1285196147/ref=sr_1_1?s=books&ie=UTF8&qid=1453221520&sr=1-1&keywords=database+systems+design+implementation+%26+management+11th+edition
  81. Type Print
  82. Required
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91. Zenit User Name and Passwords
  92. Attached Files:
  93. File SQL Developer Connection (92.354 KB)
  94. File User Names and Passwords (10.907 KB)
  95. "User Names and Passwords" includes your user name with password for Zenit DB.
  96.  
  97. Students can login to Oracle Neptune DB from inside and outside of Seneca by following these steps:
  98. - Run SQL Developer
  99. - Create a new connection
  100. - Use user name and password for connection
  101. - Change Connection Type to Advanced
  102. - Type the following URL to Custom JDBC URL area
  103. jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = myoracle12c.senecacollege.ca)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = oracle12c)))
  104. - Click on Save Password
  105. - Click on Test. status should be Success
  106. - Save
  107. - Connect
  108.  
  109. If you want, you can change your password using ALTER USER. Please follow these steps to change your password.
  110. - Connect to DB using either SQL Developer or SQL Plus
  111. - Use your user name and initial password for connection
  112. - After logging in, type the following statement
  113. ALTER USER <your_user_name> IDENTIFIED BY <your_new_password>
  114. Sample:
  115. ALTER USER dbs301_131sa40 IDENTIFIED BY abc123
  116. - Disconnect your connection
  117. - Change your password on Properties
  118. - Save and connect again. This time it will connect with your new password
  119. - Keep your password in a safe place. You don't need to change it again
  120.  
  121.  
  122.  
  123.  
  124.  
  125. How to Create HR Schema
  126. Attached Files:
  127. File hr_schema.zip (12.638 KB)
  128. Download attached HR_SCHEMA.ZIP file and extract it to your hard drive.
  129.  
  130. Execute the scripts in the following order using SQL Developer:
  131.  
  132. 1 - hr_cre.sql
  133.  
  134. 2 - hr_idx.sql
  135.  
  136. 3 - hr_comnt.sql
  137.  
  138. 4 - hr_popul.sql
  139.  
  140.  
  141.  
  142.  
  143. Oracle 12c Connection
  144. You can use this URL in order to connect Seneca Neptune database outside from the college. The followings need to be used in SQL Developer.
  145.  
  146. Custom JDBC URL
  147.  
  148.  
  149. jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = myoracle12c.senecacollege.ca)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = oracle12c)))
  150.  
  151. Item
  152. Zenit Connection URL
  153.  
  154.  
  155. https://zenit.senecac.on.ca/info/db-oracle11g.html
  156.  
  157. You can use this URL in order to connect Seneca Neptune database outside from the college. The followings need to be used in SQL Developer.
  158.  
  159. Custom JDBC URL
  160.  
  161.  
  162. jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = zenit.senecac.on.ca)(PORT = 1521)) )(CONNECT_DATA =(SERVICE_NAME = neptune)(SERVER=DEDICATED)))
  163.  
  164.  
  165. Temp user id: dbs301_171ma45
  166.  
  167. Temp password: 76481456
  168.  
  169. ALTER TABLE Statement
  170. More links
  171.  
  172. http://www.tutorialspoint.com/sql/sql-alter-command.htm
  173.  
  174. http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_3001.htm#SQLRF01001
  175.  
  176. Job_grade table
  177. create table JOB_GRADES (
  178. GRADE_LEVEL VARCHAR2(3),
  179. LOWEST_SAL NUMBER,
  180. HIGHEST_SAL NUMBER);
  181.  
  182. insert into JOB_GRADES (GRADE_LEVEL, LOWEST_SAL,HIGHEST_SAL)
  183. values ('A',1000, 2999);
  184. insert into JOB_GRADES (GRADE_LEVEL, LOWEST_SAL,HIGHEST_SAL)
  185. values ('B',3000, 5999);
  186. insert into JOB_GRADES (GRADE_LEVEL, LOWEST_SAL,HIGHEST_SAL)
  187. values ('C',6000, 9999);
  188. insert into JOB_GRADES (GRADE_LEVEL, LOWEST_SAL,HIGHEST_SAL)
  189. values ('D',10000, 14999);
  190. insert into JOB_GRADES (GRADE_LEVEL, LOWEST_SAL,HIGHEST_SAL)
  191. values ('E',15000, 24999);
  192. insert into JOB_GRADES (GRADE_LEVEL, LOWEST_SAL,HIGHEST_SAL)
  193. values ('F',25000, 40000);
  194. commit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement