Create a SQL script containing your data definition language (DDL) statements to create your tables, views, triggers, and other required database objects for project 1. Your script must also include...



Create a SQL script containing your data definition language (DDL) statements to create your tables, views, triggers, and other required database objects for project 1. Your script must also include queries to demonstrate that all objects are created successfully (i.e. selecting from the database catalog/data dictionary using user_objects and user_tables). Additionally, you must submit a separate document that contains the complete textual output from running your DDL script successfully. Your score will include the evaluation of this output report as well as a live, error-free expected run of your script in the environment. Within your DDL SQL script, the following minimum requirements must be met:
Data Definition Language (DDL) SQL Script Minimum Requirements:
Drop Statements for All Objects as needed (5 points)
At the beginning of your script, ensure that all objects that are required to be dropped are properly dropped.
Create/Alter Statements for All Tables and Constraints (30 points)
In an order that is appropriate for repeated executions, ensure that all tables and constraints are properly created and/or altered.
Create Indexes for Natural, Foreign Key, and Frequently Queried Columns (10 points)
Unlike primary keys which have unique indexes created automatically, you must create indexes for ever natural key that is not included in the primary/composite key as well as all foreign keys and frequently queried columns. Note: you may not yet have queries built for your database yet but you will during project part 4. Keep this in mind as you will need to create indexes to support these queries.
Create a Minimum of Two Views (10 points)
You are required to create at least two views though it is recommended that you create the number of views that is most appropriate to support your business requirements.
Create a Minimum of Two Sequences (10 points)
You are required to create at least two sequences though if you are using surrogate keys this number will at least be equal to the number of entities that use said keys.
Create a Minimum of Two Triggers (10 points)
You are required to create at least two triggers though the number of triggers should exceed this minimum if more than two sequences are deployed and to accommodate the automatic population of the auditing columns (see next requirement).
Describe the Business Purpose of your Views and Triggers (5 points)
Using comments in your SQL script, before each view and trigger provide a description of what business purpose or function they provide. Recommend that you also begin incorporating this data back into your SOW and Requirements Definition document as necessary in preparation for submitting your consolidated lab report during project part 4.
Database Catalog/Data Dictionary Queries (5 points)
Demonstrate the successful creation of all aforementioned objects by querying the database catalog/data dictionary; see the Project Learning Demonstration for examples.
Output Report (5 points)
All output from the execution of the statements in requirements 1 through 8 must be recorded and saved into an output report.
Executable, Error-Free Script (10 points)
The script you submit must fully execute and be error-free.
Project 1 Step #3 Deliverables
DDL Script in SQL or TXT: LastName_FirstName_DDL.[sql|txt]
Script Output Report: LastName_FirstName_output.[doc|docx]
Note: the database catalog/data dictionary queries you write are considered DML statements not DDL. Despite this fact, for clarity the entire deliverable is classified as your DDL script. Please ensure that you include these queries at the bottom of your DDL script as required above.
Your Project 1 Step #3 Data Definition Language (DDL) script is worth 30% of Project 1 which is 20% of your course grade. The lab project is cumulative meaning that you will submit this SOW again during project part 4 with all errors corrected, content expanded, and formatting updated as required.
Project 1 Step #3 Best Practices:
1. If you use Word to create your script, ensure you turn off the curly quotes as this will cause an error in Oracle. To do this you usually go to the "Options" area, find "Proofing", then "AutoCorrect" and "AutoFormat". Under "Replace", uncheck "Straight quotes" with "smart quotes".
2. You may want to put script comments in your DDL file to document your work. If you do, ensure to indicate to Oracle that your notes are "comments" and not DDL commands. Oracle will error on non-commented notes.
Example of comments
Single-line comments start with two dashes. Example: --Query problem #6
Multi-line comments are enclosed with /* */ Example:
/*Query 4
The business value of this query is to show all customers in the CUSTOMERS table */
This is a reference you can use for understanding this concept:https://docs.oracle.com/cd/B14117_01/server.101/b10759/sql_elements006.htm

3. Output documentation - the quickest way to capture script output is to use the "Save" option on the lower, "output" window section of SQL Developer. The "Save" icon will ask you to save the file. You can email yourself the file or save to Google drive if you use this. If you use screenshots, please put them in a Word file.
4. Your DROP TABLE statements - put them in reverse order of the CREATE TABLE statements. If you have them ordered correctly, you won't need to use CASCADE CONSTRAINTS options.
5. One further note is to use: set echo on; at the top of your DDL file so your commands display before the output does. This will help you locate errors should they pop up run your DDL script twice. The 2nd run is to check for DROPs in the correct order.
----------------------------------
More Project 1 Step #3 suggestions
For Project 1 Step #2 ERD, if you used Oracle Data Modeler (for help see Using Oracle Data Modeler v4-1-5 UMUC DBST 2017) you can output the ERD (for help see Export ODM v4-1-5 Models UMUC DBST 2017) and import it into SQL Developer (For help see Import Data Using SQL Developer) See Project Learning Demonstration for step by step instructions for Project 1 Step #2. Once imported into SQL Developer, you should be able to keep working on your tables in SQL Developer, adding data types etc to your tables.
HINT- there is a way to generate DDL statements like DROP TABLE using SQL Developer. seehttp://www.oracle.com/technetwork/developer-tools/sql-developer/export-intro-1-161239.htmlfor an example.
-------------------------------------------------
Below are some helpful links on using the SQL Developer Data Modeler.
SQL Developer Data Modeler Documentation
Release 4.1
SQL Developer Data Modeler User's Guide

https://docs.oracle.com/cd/E57998_01/doc.41/e57984/toc.htm

Data Modeler Concepts and Usage

https://docs.oracle.com/cd/E57998_01/doc.41/e57984/data-modeler-concepts-usage.htm#cs_default

Data Modeler Tutorial: Modeling for a Small Database

https://docs.oracle.com/cd/E57998_01/doc.41/e57984/data-modeler-tutorial.htm#library

Please start on this lab as soon as possible so there's time to ask questions should you run into issues. If you do need to ask a question about an error, please send your DDL script and error information to save on time. Ensure to follow the Syllabus requirements for this part of the project and to turn your assignments in on time.
Learning Resources:
I'm attataching the SOW and the ERD files and table and the project learning Demonstration only look at instructions for Part 3 and please give copies of all files and output showing error free because she want to see that I really processed these files.I'm also attaching the evaluation form to be filled out. Please put information that she asked in the instructions in the SOW. Please call me if you have any questions at9012406499. I have a program that you can use to run the SQL through the school and you need my code, if that will be easier for you. Thanks
.

https://www.w3schools.com/sql/sql_create_table.asp


https://docs.oracle.com/database/121/SQLRF/sql_elements.htm#SQLRF002



Jul 09, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here