CIS336 Create Om Database And Table

Cis336 Createomtablesdocxcis336 Create Om Database And Tablesstarti

Cis336 Createomtablesdocxcis336 Create Om Database And Tablesstarti

Starting with Week 4, all labs will utilize the Order Management (OM) database and sample data. These tables are created by the script file (create_OM_db.sql) found in the Doc Sharing area of the website. You will need to download the file, modify or remove the CREATE DATABASE statements or manually create the correctly named database as appropriate to your lab environment, and then run the script to create your database, tables, and data. The Entity Relationship Diagram (ERD) for this database is provided below, for your reference. Follow the steps below to create the tables based on the environment you are using.

Option 1: Use DeVry’s Omnymbus EDUPE-APP lab environment

  1. Download the create_OM_db.sql file from Doc Sharing and save it on your local computer. For example, create a CIS336 directory on your C: drive and save the file there.
  2. Open the create_OM_db.sql file in Notepad (do NOT use Microsoft Word!) and remove the following lines:
    -- create database
    

    DROP DATABASE IF EXISTS om;

    CREATE DATABASE om;

    -- select database

    USE om;

  3. Log into the Omnymbus EDUPE-APP cloud environment and create a new database schema with a name ending in _xxxx (where xxxx is your login), such as OM_xxxx.
  4. Type in the name and click CREATE. Select the new database schema once created. It will be empty.
  5. From the commands at the bottom, click EXECUTE SQL.
  6. Click "Run SQL from file" and browse to the downloaded create_db_om.sql file, then click EXECUTE.
  7. The script should execute without errors. Return to the Table list to confirm the creation of tables and data.

Alternatively, Option 2: Prepare the database using a local MySQL environment

  1. Ensure your MySQL database is running and you have a user account with sufficient privileges.
  2. Login to MySQL via your preferred SQL editor (e.g., MySQL Workbench), select your local instance.
  3. Use the menu to run the script: FILE—Run SQL script, browse and select create_OM_db.sql, then run it.
  4. Refresh schemas in your navigator window to see the OM schema.
  5. To view data in tables, right-click a table and select "Select Rows—Limit 1000," or manually execute queries like SELECT * FROM items;

Note: You only need to create and populate the tables once. Data is saved when you exit the environment. You are now prepared to proceed with your lab activities.

Paper For Above instruction

The process of setting up and initializing the Order Management (OM) database for academic and practical exercises involves several essential steps tailored to different environmental configurations. Whether utilizing DeVry’s Omnymbus EDUPE-APP cloud platform or a local MySQL installation, students are required to accurately create the database schema, execute SQL scripts, and verify data integrity. This foundational setup allows subsequent exercises like querying, modifying, and creating views to be performed effectively, reinforcing concepts of relational database design, data manipulation, and SQL scripting.

In the first option, students gain experience using cloud-based database tools, which offer simplified GUI-based interaction for creating schemas and importing SQL scripts. The process involves editing the download script to remove conflicting statements, such as database creation commands, to prevent errors. Once the database schema is established and the script executes successfully, students can verify the tables and sample data through graphical interfaces. This environment simulates real-world cloud database management, emphasizing the importance of environment-specific adjustments in script execution, including schema naming conventions that adhere to organizational standards or platform requirements.

Alternatively, the local MySQL environment provides students with hands-on experience managing databases on their own computers. The procedure emphasizes ensuring that the database server is operational, proper user privileges are assigned, and scripts are executed through SQL editors like MySQL Workbench. Students learn about executing script files, managing schemas, and verifying data through sample SELECT statements. The emphasis here is on understanding how environment setup affects database operations, and familiarity with command-line or GUI tools enhances practical skills essential for database administration and development roles.

Regardless of the environment, the critical learning outcomes include understanding the importance of proper database initialization, script editing for environment compatibility, and verification of successful creation. These fundamental skills serve as the groundwork for more advanced exercises such as designing views, performing complex queries, and implementing data updates and joins in subsequent labs. Proper setup ensures data consistency, security measures, and functional integrity, aligning with real-world practices of database management and application development.

References

  • Elmasri, R., & Navathe, S. B. (2016). Fundamentals of Database Systems (7th ed.). Pearson.
  • Rob, P., & Coronel, C. (2009). Database Systems: Design, Implementation, & Management (8th ed.). Cengage Learning.
  • Pratt, C., & Adamski, J. (2018). Concepts of Database Management. Cengage Learning.
  • Gibson, M., & Schultz, R. (2017). SQL for Data Analysis. DataCamp.
  • Coronel, C., & Morris, S. (2015). Database Systems: design, implementation, & management. Cengage.
  • McLaughlin, V. (2018). Pro MySQL. Apress.
  • Sommerville, I. (2011). Software Engineering (9th ed.). Addison-Wesley.
  • Silberschatz, A., Korth, H., & Sudarshan, S. (2010). Database System Concepts (6th ed.). McGraw-Hill.
  • Murphy, K. (2017). Mastering MySQL. Packt Publishing.