Ecet 450 Laboratory 2 Part B Purpose This Laboratory Provide
Ecet 450 Laboratory 2part Bpurposethis Laboratory Provides Practice
This laboratory provides practice in creating realistic tables and their relationships using Oracle SQLPlus, along with writing SQLPlus script files. The exercise involves building a simple invoice system with five tables, inserting data, and creating a script to facilitate future recreations of the database schema. You will logs interactions via spool files, save commands in scripts, and verify the creation and data loading of the tables. The process includes drop and create table commands with properly named primary and foreign key constraints, as well as executing the scripts to ensure correct setup. Additionally, you will produce printed outputs of the tables and scripts, formatted appropriately for clarity and future use.
Paper For Above instruction
The purpose of this laboratory exercise is to develop practical skills in designing, creating, and managing relational database tables using Oracle SQL*Plus. It emphasizes establishing relationships among tables, inserting representative data, and scripting the entire process for consistency and repeatability. This foundational experience supports subsequent, more complex database exercises, including normalization, ERD design, and data integrity enforcement.
First, students are required to log into Oracle SQL*Plus with assigned credentials, record the session with the spool command, and execute SQL statements to create five key tables: REP, CUSTOMER, PRODUCT, INVOICE, and LINE, reflecting a simplified invoicing schema. The table names, attributes, and data entries must follow specified formats, with particular attention to omitting currency symbols and separators for monetary values. Constraints such as primary keys and foreign keys should be properly named according to classroom conventions, helping students practice relational integrity enforcement. The creation of the tables must include drop commands to allow rebuilding if necessary.
Furthermore, students need to insert sample data into each table accurately. After data loading, a script file named load_tablesXXX.sql (with initials replacing XXX) must be created, containing all necessary SQL commands (drop, create, insert, and display commands). This script ensures that the database schema can be reliably recreated and should be free of extraneous responses, comments, or incorrect commands for clarity. The completed script must be stored for future use, and a printout of the script should be included in the final report.
The second part involves printing each of the five tables in landscape mode, with set line sizes to prevent line wrapping, so that data is clearly visible and properly formatted. These outputs serve as verification that data has been correctly entered and stored. The process is integral for validating the schema and data integrity before proceeding with further exercises.
Execution of the script is tested by running the command '@
References
- Elmasri, R., & Navathe, S. B. (2015). Fundamentals of Database Systems (7th ed.). Pearson.