Welcome to AssignmentCache!

Search results for 'Chapter 4: Complete the Hands-On Projects 3,4,5'

Items 31 to 40 of 813 total

per page
Page:
  1. 2
  2. 3
  3. 4
  4. 5
  5. 6

Grid  List 

Set Descending Direction
  1. IS562 SQL database queries

    MIS562 SQL Database Queries Assignment

    $10.00

    MIS562 SQL Database assignment

    1. Show a list of all employee names and their department names and the employees for each department. Be sure to show all departments whether there is an employee in the department or not. Use an outer join.

    2. Select all employee names and their department names. Be sure to show all employees whether they are assigned to a department or not. Use an outer join.

    3. Write a query that that performs an inner join of the grade, student, and grade_type tables using ANSI SQL 99 syntax.

    4. Write a query that that performs an inner join of inner join of the grade, student, and grade_type tables using the Oracle inner join convention.

    5. List all the zip codes in the ZIPCODE table that are not used in the STUDENT or INSTRUCTOR tables. Use a set operator.

    6. Write a SQL statement using a set operator to show which students enrolled in a section that are not enrolled in any classes. Exclude students with student id less than 300.

    Learn More
  2. COMP353 Assignment 3 Functional dependencies

    COMP353/1 Assignment 3 Functional Dependencies

    $15.00

    COMP353/1 Assignment #3

    Exercise #1 (10 points)
    Here are the two sets of FDs for R {A, B, C, D, E}.
    S = {A->B AB->C D->AC D->E} T = {A->BC D->AE}
    Are they equivalent?


    Exercise #2 (10 points)
    Consider the following decomposition of the table ENROLLMENT in two tables Student and Course.

    Table ENROLLMENT
    StudentID StudentName CourseName Credits
    1111111 William Smith COMP218 4
    2222222 Michel Cyr COMP353 4
    3333333 Charles Fisher COMP348 4
    4444444 Patricia Roubaix COMP353 4
    2222222 Paul Paul COMP352 3
    5555555 Lucie Trembaly COMP354 3

    Table Student
    StudentID StudentName Credits
    1111111 William Smith 4
    2222222 Michel Cyr 4
    3333333 Charles Latan 4
    4444444 Patricia Roubaix 4
    2222222 Paul Paul 3
    5555555 Lucie Trembaly 3

    Table Course
    Credits CourseName
    4 COMP218
    4 COMP353
    4 COMP348
    4 COMP353
    3 COMP352
    3 COMP354

    Question: Is this decomposition lossless? Justify.


    Exercise #3 (15 points)
    Using the Functional Dependencies,
    F = {A → BC ; CD → E ; B→D ; E→A}

    a) Compute the closure of F (F+).
    b) Is true / false : F ⊨  E → BC?
    c) Provide the minimal cover Fc (min(F)) using steps shown in the class.
    d) List of the candidate keys for R


    Exercise #4 (15 points)
    Consider the relation R(S, N, R, C, J, H, L) and the set of dependencies.
    F = {S, N  C ; J, H, C  L ; J, H, L  S, N, R ; S, N, R  J, H, L}.
    Prove that F ⊨ J, H, S, N  R using the Armstrong’s axioms?

    Learn More
  3. DBM 380 Art Museum database ERD

    DBM/380 Week 3 ERD Art Museum in Access

    $12.00

    Develop an Art Museum ERD for DBM/380 Week 3

    List the data specifications (must include a minimum of three entities with attributes)

    Has to be on An Art Museum that needs to track the artwork, artists, and locations where the art is displayed or stored within the museum If you Don't have Visio then Do a ERD in Access. Need this last week. Make sure the Database flows.

    Use a Microsoft® Visio® diagram to create a detailed ERD using the data specifications noted in the Week Two Individual Assignment. Make any necessary changes provided in your faculty's feedback.

    Use a Microsoft® Access® database to create the preliminary database tables, columns with data types, primary keys, and relationships.

    Learn More
  4. DBM 380 Week 4 Art Museum Visio ERD

    DBM/380 Week 4 Normalization of the Art Museum ERD

    $12.00

    DBM/380 Week 4 Normalization of the Art Museum ERD

    The following assignment is based on the database environment chosen and created in that last request

    Your database project must meet the following assessment requirements:

    Design and develop a database using professional principles and standards.
    Provide a logical and physical design of the database.
    Use relational database software application to develop database.
    Provide an entity relationship diagram.
    Normalize the database.
    Generate and provide test data.

    Use a Microsoft® Visio® diagram to normalize the ERD to third normal form (3NF).

    Use the Microsoft® Access® database that you just created for me, create a minimum of 10 rows of test data in each table. Also, create at least one query that joins two tables and returns values from both tables.

    Note. Only the Microsoft® Visio® diagram must be normalized to the 3NF. The 3NF is not required for a Microsoft® Access® database.

    Submit the ERD and final database.

    Learn More
  5. Sopwith Coach Hire Task 1 ER Model

    Sopwith Coach Hire Database and ERD

    $15.00

    Guidelines

    The work consists of the design, implementation and population of a small database system that will form the basis of the report to be handed in.

    You will be expected to work on your own and should submit deliverables arrived at independently using your own knowledge and effort.

    Sopwith Coach Hire Database

    Sopwith Coach Hire Ltd is a leading provider of coach and minibus hire in West London. The company was founded in 1982 and it has continued with steady expansion over the past 30 years. The company operates a fleet of vehicles which are available for hire. The majority of the company’s clients are local schools within West London that use the vehicles for school trips. . However, vehicles can also be booked for private functions.

    The Director has requested the creation of a database system to assist in the more effective and efficient running of the company. The Director has provided the following description of the current system. 


    System Overview

    Customers

    A vehicle can be booked by customers and a customer can book many vehicles.

    Details of customers need to be recorded, which include name, address, email address and contact number.

    Vehicles

    The company has a large number of vehicles that range from a standard six seater MPV to a 49 seater coach.

    Table 1 (appendix A) lists the company’s fleet of vehicles. The company has more than one model type of vehicle. The hourly rate for hiring each vehicle is also displayed in this table.

    Booking

    The company wishes to record details of all bookings made by their customers. This will include detailed information of each trip a vehicle is booked for.

    Each customer is charged the hourly rate for each vehicle (you may assume that no discounts are given for long term hire).

    Employees

    The company employs a large number of employees and details of each member of staff need to be recorded. These details include name, address, home telephone number, date of birth, gender, job description, national insurance number and current annual salary. The majority of employees are drivers but the company also has a number of administrative staff that takes the bookings.

    The database must be able to handle driver assignments. Each hired vehicle requires a driver. A second driver is required in the following situations; (1) If the driver cannot have a break of not less than 45 minutes after each 4.5 hours of driving, or (2) if the driver cannot have a 10 hour break after driving a maximum of 9 hours driving in a day.

    Licence

    Each driver must have a valid driver’s licence with no penalty points. Details of each driver’s licence needs to be recorded. This will include the licence number and the expiry date.

    In order to drive a small passenger-carrying vehicle with nine to 16 passenger seats, a driver must have a D1 code on their licence. To drive any bus/coach with more than eight passengers, a driver must have a D code. Some drivers have only a D1 code and are therefore only allowed to drive the minibuses. Other drivers have both codes on their licences and can be used for any of the company’s hired vehicles. 

    Tests 

    The company operates a program that involves random alcohol or drug testing. Any driver may be required to take either the alcohol or drug test or both.

    Sopwith Coach Hire Ltd is required to keep a complete record of all test types, dates and results for each driver.

     

    C Tasks and Grading

    1. Create an entity-relationship model (using UML notation). Specify the cardinality ratio and participation constraint of each relationship type. State any assumptions you make when creating the ER model (if necessary). (30 marks)

    2. Produce a Data Dictionary for the ER diagram in part (1). (25 marks)

    3. Implement the set of relational tables created in part (2) using Oracle.

    You must include your CREATE TABLE statements in the report. (10 marks)

    4. Populate the tables with relevant data.

    A screen shot of the populated tables must be included in the report. (10 marks)

    5. A full discussion of the constraints used, covering the three types: entity, referential and column. Explain why you used them and how they ensure that the integrity and consistency of your data is maintained. (10 marks)

    6. Write 3 queries to demonstrate that your database meets the data requirements of the system. You have to work out what you consider to be the best 3 queries that demonstrate the database meets the data requirements of the system. In your queries you are expected to use a range of SQL queries. ***

    A screen shot of the query output must be included in the report.

    *** If you produce 3 queries that are simply SELECT * FROM, then you will receive no marks. (15 marks)

    Learn More
  6. Northwind Database Task 2 Database Diagram

    Northwind Database SQL Queries

    $10.00

    Install the Northwind Database into the environment. Click here to install the database.
    Note that this link does link to the SQL Server 2000 Sample Databases, but after downloading it, the ZIP file can be extracted and contained inside the package as a file named "instnwnd.sql." This file can be opened and executed inside of Microsoft SQL Server Management Studio.

    Task #2
    Generate a database diagram.
    Include a screenshot of this diagram in your Word document.

    Task #3
    Write SELECT statements for the following questions:
    For each of these statements, include a screenshot of the SQL. Make sure to include the statement execution, including the resulting data.
    1. Display all columns and all rows from the Employees table.
    9 rows returned
    2. Display the regionid, regiondescription for all rows in the Regions table.
    4 rows returned
    3. Modify query 2 so that the column headings are as follows:
    "ID" and "Description"
    4 rows returned
    4. Display the customer ID, customer name, and region for all customers.
    91 rows returned
    5. Display the customer ID, customer name, and region for all customers.
    Name the columns "ID," "Name," and "Region" (respectively), and sort the data by the company name.
    91 rows returned

    Learn More
  7. POS 410 Week 4 SQL for Business Kudler_FF database

    POS 410 Week 4 SQL for Business Kudler_FF database

    $15.00

    POS/410 SQL for Business Week 4

    SQL Reports

    Use tables from the Kudler_FF database to write the SQL statements necessary to perform the following data manipulation:
    o Increase all employees salaries with the selected EEO-1 classification by 10%.
    o Increase all employees salaries by 5%.
    o Choose an employee from the Employee table and delete that employee.
    Deliverable: Copy the SQL statements and data from both tables showing how data was affected to a Word document. Post the document to the assignment tab of the classroom.


    Use tables from the Kudler_FF database to write SQL statements that perform the following computations:
    o Calculate the average salary for all employees.
    o Calculate the maximum salary for all employees.
    o Calculate the maximum salary for exempt employees.
    o Calculate the minimum salary for all employees.
    o Calculate the minimum salary for non-exempt employees.
    Deliverable: Copy the SQL statements and results to a Word document. Post the document to the assignment tab of the classroom.


    Use tables from the Kudler_FF database to write the following queries, using the GROUP BY clause in your SQL statements:
    o Count the number of employees, grouped by EEO classification.
    o Count the number of employees, grouped by exemption status.
    o Compute the average salary, grouped by area code and gender.
    o Compute average age, grouped by exemption status o Compute the earliest hire date, grouped area code, gender, and exemption status. Deliverable: Copy the SQL statements and results to a Word document. Post the document to the assignment tab of the classroom.

    Learn More
  8. CIS515 Assignment 2 Database Systems and Database Models

    CIS515 Assignment 2 Database Systems and Database Models

    $20.00

    CIS515 Assignment 2: Database Systems and Database Models

    The Strayer Oracle Server may be used to test and compile the SQL Queries developed for this assignment. Your instructor will provide you with login credentials to a Strayer University maintained Oracle server.

    Imagine that you have been hired as a consultant to assist in streamlining the data processing of an international based organization that sells high-end electronics. The organization has various departments such as payroll, human resources, finance, marketing, sales, and operations. The sales department is the only department where employees are paid a commission in addition to their yearly salary and benefits. All other departments compensate their employees with a yearly salary and benefits only. Commission is paid by multiplying the employee’s commission rate by the total amount of product units sold. You have access to the following data sets:

    Employee (EmpNumber, EmpFirstName, EmpLastName, CommissionRate, YrlySalary, DepartmentID, JobID)
    Invoice (InvNumber, InvDate, EmpNumber, InvAmount)
    InvoiceLine (InvLineNumber, InvNumber, ProductNumber, Quantity)
    Product (ProductNumber, ProductDescription, ProductCost)
    Department (DepartmentID, DepartmentDescription)
    Job (JobID, JobDescription)

    Write a two to three (2-3) page paper in which you:

    Design a query that will allow the finance department to determine the commissions paid to specific employees of the sales department for the month of December. Note: You will need to generate the tables described above (Employee, Invoice, InvoiceLine, Product, Department, and Job) in order to compare and validate your code. Validated query code must be part of your paper.
    Compare the code of the query you designed in Question one (1) to one that would show how much total compensation is paid to each employee for the same month.
    Determine and explain the factors necessary to ensure referential integrity.
    Create an object-oriented model to show how the tables are interrelated through the use of graphical tools such as Microsoft Visio, or an open source alternative such as Dia. Make sure that you are able to show the relationship types such as 1:M, 1:1, or M:1. Additionally, remember to include the determined factors from the previous assignment requirement. Note: The graphically depicted solution is not included in the required page length.
    Identify which data components are the entities and attributes, and the relationship between each using an object representation diagram through the use of graphical tools such as Microsoft Visio, or an open source alternative such as Dia. Note: The graphically depicted solution is not included in the required page length.
    Describe how Big Data could be used to assist in the productivity and forecasting of the organization’s products and resources.

    Learn More
  9. Task 1 Oracle PlSql Cursors

    Oracle Pl/Sql Records Exception Handling and Cursor

    $20.00

    This is your final examination which consists of five programming questions.
    You are to provide me with a .txt file or a .sql file for supplying the code for each question. Put these in a .zip file and submit them.

    1. Use a cursor to retrieve the location number and the city from the locations table. Pass the location number to another cursor to retrieve from the emp_details_view the last_name, job_title and salary for that employees that work at that location.
    a. Use the %ISOPEN attribute
    b. Use a simple loop
    c. Use an EXIT WHEN and a %NOTFOUND attribute

    2. Write an exception handler to raise an exception named DUE_FOR_ROTATION
    The criteria for raising the exception is if location id is 2700.
    If the employee’s location in the em_details_view meets this criteria output 'Due for Rotation'.
    Insert a listing of all of the EMPLOYEES that meet this criteria into the employee_analysis table.
    You will need to create an analysis table as:
    CREATE TABLE location_analysis
    (employee_id NUMBER(6) not null,
    Last_name VARCHAR(25),
    First_name VARCHAR2(20),
    Location_id NUMBER(4),
    City VARCHAR2(30));
    Screenshot #1 Creating the Analysis Table

    3. You will be using the EMPLOYEES table in YOUR TABLESPACE. Using a cursor write a block to find the largest salary where the hire date is before ‘ 1-jan-96’ . When you find employees who match this criteria change give them a salary increase of 25%.

    4. You will be using the JOBS table in YOUR TABLESPACE. Create a record that incorporates the four columns from the JOBS table. Output the values for a single job on four lines of output.

    5. Write a PL/SQL block to print information about a given country.
    a. Declare a PL/SQL record based on the structure of the COUNTRIES table.
    b. Use the DEFINE command to provide the country ID. Pass the value to the PL/SQL block through a SQL*Plus substitution variable.
    c. Use DBMS_OUTPUT.PUT_LINE to print selected information about the country.
    d. Execute and test the PL/SQL block for the countries with the IDs CA, DE, UK, US.

    Learn More
  10. DBM 405 Lab 3 Step 1 Creating First  Procedure

    DBM 405 Lab 3 Procedures and Functions Advanced Database Oracle

    $20.00

    DBM 405 Lab 3 Procedures and Functions Advanced Database Oracle

    Step 1: Creating the First Procedure
    Your first procedure is to be named MOVIE_RENTAL_SP and is going to provide functionality to process movie rentals. Based on data that will represent the movie ID, member ID, and payment method your procedure will need to generate a rental ID and then insert a new row of data into the mm_rental table. The process will also need to update the quantity column in the mm_movie table to reflect that there is one less copy of the rented movie in stock. Along with the processing, you will also need to define some user-defined exception handlers that will be used in validating the input data. Since you may need to recreate your procedure several times during the debugging process, it is suggested that you use the CREATE OR REPLACE syntax at the beginning of the CREATE statement.

    The following steps will help you in setting up your code.
    1. You will need to define three parameters, one each for movie ID, member ID, and payment method. Make sure that each one matches the data type of the associated column in the database tables.
    2. You will have several other variables that will need to be identified and defined. It might be easier to read through the rest of the specs before you start trying to define these (look for hints in the specifications).
    3. You will need to define four user-defined exceptions; one for unknown movies, one for unknown member, one for unknown payment method, and one for if a movie is unavailable.
    4. You will need to validate each of the three pieces of data passed to the procedure. One easy way to do this might be to use a SELECT statement with the COUNT function to return a value into a variable based on a match in the database table against the piece of data that you are validating. If the query returns a zero then there is no match and the data is invalid; any value greater than zero means a match was found and thus the data is valid. You will need the following validations.
        1. Validate the movie ID to make sure it is valid. If not then raise the unknown movie exception.
        2. Validate the member ID to make sure one exists for that ID. If not then raise the unknown member exception.
        3. Validate the payment method to make sure it exists. If not then raise the unknown payment method exception.
        4. Check the movie quantity to make sure that there is a movie to be rented for the movie ID. If not then raise the unavailable movie exception.
        5. If all the data passes validation then you will need to create a new rental ID. This process should be in a nested block with its own EXCEPTION section to catch a NO_DATA_FOUND exception if one should happen. You can generate a new rental ID by finding the largest rental ID value in the mm_rental table (Hint: MAX function) and then increasing that value by one. The NO_DATA_FOUND exception would only be raised if there were no rental IDs in the table.
        6. Now you are ready to insert a new row of data into the mm_rental table. Use the SYSDATE function for the checkout date and NULL for the check-in date.
        7. Now, update the mm_movie table to reflect one less movie for the associated movie ID.
        8. Finally, you will need to set up an EXCEPTION section for all of your exception handling. For each exception output, you want to state what the problem is, the invalid data value, and a note that the rental cannot proceed. For example, for an invalid movie ID number, you might say, "There is no movie with id: 13 - Cannot proceed with rental". You also want to include a WHEN OTHERS exception handler.

    Compile and check your code. If you get a PROCEDURE CREATED WITH COMPILATION ERRORS message then type in SHOW ERRORS and look in your code for the line noted in the error messages (be sure to compile your code with the session command SET ECHO ON). Once you have a clean compile then your are ready to test.


    Step 2: Testing the First Procedure
    You will need to test for scenarios that will allow both a clean movie rental and test each exception. This means that you will need to run at least five test cases.

    One each for the following:
    1. No movie for the ID supplied (use 13, 10, and 2 for the parameters).
    2. No member for the ID supplied (use 10, 20, and 2 for the parameters).
    3. No payment method for the ID supplied (use 10, 10, and 7 for the parameters).
    4. A successful rental (use 5, 10, and 2 for the parameters).
    5. No movie available for the ID supplied (use 5, 11, and 2 for the parameters). Since there is only one movie available for ID 5, you will get this exception.
    Your output from the testing should look similar to (this would be the output for the first test above):
    exec movie_rent_sp(13, 10, 2);
    Output:
    There is no movie with id: 13
    Cannot proceed with rental
    PL/SQL procedure successfully completed.

    Be sure that when you have verified that everything works, you run your testing in a spools session and save the file to be turned in.


    Step 3: Creating the Second Procedure
    Your second procedure should be named MOVIE_RETURN_SP and should facilitate the process of checking a movie rental back in. For this procedure, you will only need to pass one piece of data to the procedure; the rental ID. You will need two user-defined exceptions; one for no rental record and one for already returned. You will be able to use several of the same techniques you used in the first procedure for your validation.

    The following steps will help in setting up your code.
    1. You will need to define only one parameter for the rental ID number. Make sure that it matches the data type of the associated column in the database table.
    2. You will have several other variables that will need to be identified and defined. It might be easier to read through the rest of the specs before you start trying to define these (look for hints in the specifications).
    3. You will need to define the two user-defined exceptions mentioned above.
    4. You will need to validate the rental ID that is passed to the procedure. If it is not a valid one then raise the associated exception.
    5. If it is valid then get the movie ID and check-in date from the mm_rental table.
    6. Now, check the check-in date to make sure that it is NULL. If it is not then raise the associated exception.
    7. If everything checks out then update the mm_rental table for the rental ID you have and use the SYSDATE function for the check-in date.
    8. Now, you can update the quantity in the mm_movie table for the associated movie ID to reflect that the movie is back in stock.
    9. Last, set up your exception section using appropriate error message text and data.

    Compile and check your code. If you get a PROCEDURE CREATED WITH COMPILATION ERRORS message then type in SHOW ERRORS and look in your code for the line noted in the error messages (be sure to compile your code with the session command SET ECHO ON). Once you have a clean compile then your are ready to test.


    Step 4: Testing the Second Procedure
    You will need to test for scenarios that will allow both a clean rental return and test each exception. This means that you will need to run at least three test cases.

    One each for the following:
    1. No rental for the ID supplied (use 20 for the parameter).
    2. A successful rental return (use 1 for the parameter).
    3. Try to return the same rental in Step 2.
    You output from the testing should look similar to (this would be the output for the first test above):
    exec movie_return_sp(20);
    Output:
    There is no rental record with id: 20
    Cannot proceed with return
    PL/SQL procedure successfully completed.

    Be sure that when you have verified that everything works, you run your testing in a spools session and save the file to be turned in.


    Step 5: Creating the Function
    Your function should be named MOVIE_STOCK_SF and will be used to return a message telling the user whether a movie title is available or not based on the movie ID passed to the function. The exception handling that will be needed is for NO_DATA_FOUND but we are going to set it up as a RAISE_APPLICATION_ERROR.

    The following steps will help in setting up your code.
    1. You will need to define only one parameter for the movie ID number. Make sure that it matches the data type of the associated column in the database table. Also, since you will be returning a notification message, you will want to make sure your RETURN statement references a data type that can handle that (Hint: variable length data type).
    2. You will have several other variables that will need to be identified and defined. It might be easier to read through the rest of the specs before you start trying to define these (look for hints in the specifications).
    3. You will not be doing any validation so the first thing you need to do is retrieve the movie title and quantity available from the mm_movie table based on the ID passed to the function.
    4. Now, you need to determine if any are available. IF the value in the quantity column is greater than zero then you will be returning a message saying something like "Star Wars is available: 0 on the shelf", ELSE if the value is zero then you should return a message saying something like "Star Wars is currently not available". Hint: A good way to return a test string is to assign it to a variable and then simply use the variable name in the RETURN clause.
    5. Finally, set up your exception section to use a RAISE_APPLICATION_ERROR for the NO_DATA_FOUND exception handler. Assign an error number of -20001 to it and an error message that states there is no movie available for the ID (be sure to include the id in the message).

    Compile and check your code. If you get a FUNCTION CREATED WITH COMPILATION ERRORS message then type in SHOW ERRORS and look in your code for the line noted in the error messages (be sure to compile your code with the session command SET ECHO ON). Once you have a clean compile then your are ready to test.


    Step 6: Testing the Function
    You will need to test for all three possible scenarios.

    1. Test for a movie in stock using movie ID 11.
    2. Test for a movie not in stock using movie ID 5 (from your tests of the second procedure above, the quantity should be 0).
    3. Test for an invalid movie ID using movie ID 20.
    For test number 2, you may need to manipulate the quantity amount in the database, which will be fine.
    Test your function by using a select statement against the DUAL table like in the example below:
    select movie_stock_sf(20) from dual;

    Be sure that when you have verified that everything works, you run your testing in a spools session and save the file to be turned in.
    This concludes the Lab for Week 3.
     
    Deliverables
    Your deliverable submission should consist of your Lab 3 script file and the spooled output files described at the beginning of the lab. If you would like, you can include both files in a single ZIP file to be submitted to the Week 3 Lab Dropbox.

    Learn More

Items 31 to 40 of 813 total

per page
Page:
  1. 2
  2. 3
  3. 4
  4. 5
  5. 6

Grid  List 

Set Descending Direction
[profiler]
Memory usage: real: 14942208, emalloc: 14548976
Code ProfilerTimeCntEmallocRealMem