DBM405A Lab 6 Stored Procedure HomeTeamScore and AwayTeamScore and Event to Backup DB

I. OBJECTIVES

  1. Understand how to add, change, and delete records.

II. PARTS LIST

  1. EDUPE Omnymbus Environment (https://devry.edupe.net:8300); and/or
  2. MySQL (dev.mysql.com/downloads).

III. PROCEDURE
By now you have set up either the Omnymbus environment or the MySQL Server Community environment, or both. You may do the labs in this class on your own computer equipped with MySQL or you may use the MySQL environment hosted by the vendor Omnymbus. You may even use both.
Lab Procedure Continued (common to both environments)

  1. Create a Store Procedure to update the HomeTeamScore and the AwayTeamScore for the current record every time the procedure is called.
  2. Write a program to step through the “Season” table displaying each record and allowing the user to enter the final score for the game. Call your stored procedure from within the program updating the “Season” table.
  3. Set up an event to back up your database at midnight every Friday night.



This slideshow requires JavaScript.



This assignment includes a zip document.

  • Attachments
    • DBM405A_Week_6.zip (233.44 KB)
      • DBM405A_Week6_Script.sql
      • DBM405A_Week_6_iLab-Solved.docx
      • Program.cs
      • Visual Studio project (C#)
        • DBM405A_Week6
          • App.config
          • bin
            • Debug
            • DBM405A_Week6.csproj
            • DBM405A_Week6.IsolatorCache.user
            • DBM405A_Week6.sln
            • DBM405A_Week6.v12.suo
            • Program.cs
            • Properties
              • AssemblyInfo.cs
      Preview random excerpt
      xxx xxxxxxxx;
      xxxxxxxxx $$
      xxxxxx xxxxxxxxx xxxxxxxxxxxxxxxxx(xx xxxxxxxxx xxxxxxx(5), xx xxxxxxxxx xxxxxxx(5),xx xxxxxxxxxxxxxx xxx, xx xxxxxxxxxxxxxx xxx)
      xxxxx
      xxx
      SQL_SAFE_UPDATES =
      x
      ; UPDATE
      xxxxxx
      xxx
      HomeTeamScore =
      xxxxxxxxxxxxxx
      ,
      xxxxxxxxxxxxx
      = pAwayTeamScore
      xxxxx
      HomeTeam = pHomeTeam AND AwayTeam =
      xxxxxxxxx
      ; END$$ DELIMITER ; -- Call to verify
      xxxxxx
      procedure CALL Baseball.UpdateMatchResult('
      xxxxx
      ', '
      xxxxx
      ', 1,
      x
      ); -- SELECT to show
      xxx
      xxxxxxx
      info SELECT *
      xxxx
      Season
      xxxxx
      HomeTeam = '
      xxxxx
      ' AND AwayTeam = 'Team2';
      xxx xxxxxxxx;
      - - - more text follows - - -
      Preview random excerpt
      {
      xxxxxx xxxxxxx = "xxxxxx=xxxxxxxxx;xxxx=xxxx;xxxxxxxx=xxxxxxxx;xxxxxxxx=****;";
      xxxxxxxxxxxxxxx xxxx = xxx xxxxxxxxxxxxxxx(xxxxxxx);
      xxx
      {
      xxxxxxx
      .WriteLine(
      xxxxxxxxxxx
      to
      xxxxx
      ...");
      xxxx
      .Open();
      xxxxxxxxxxxx
      cmdSeason =
      xxx
      MySqlCommand("Select *
      xxxx
      Season;", conn);
      xxxxxxxxx
      .CommandType =
      xxxxxxxxxxx
      .Text;
      xxxxxxxxxxxxxxx
      rdr =
      xxxxxxxxx
      .ExecuteReader();
      xxx
      macthCounter =
      x
      ;
      xxx
      matchesList =
      xxx
      xxxx
      (); //
      xxxx
      all the data from
      xxxxxx
      table;
      xxxxx (xxx.xxxx())
      {
      xxxxxxxxxxx.xxx(xxx xxxxxxxxxxxx(xxx["xxxxxxxx"].xxxxxxxx(), xxx["xxxxxxxx"].xxxxxxxx()));
      - - - more text follows - - -
      Preview random excerpt
      {
      xxxxxx xxxxxxx = "xxxxxx=xxxxxxxxx;xxxx=xxxx;xxxxxxxx=xxxxxxxx;xxxxxxxx=****;";
      xxxxxxxxxxxxxxx xxxx = xxx xxxxxxxxxxxxxxx(xxxxxxx);
      xxx
      {
      xxxxxxx
      .
      xxxxxxxxx
      (
      xxxxxxxxxxx
      to
      xxxxx
      ...
      x
      );
      xxxx
      .Open();
      xxxxxxxxxxxx
      cmdSeason =
      xxx
      MySqlCommand("Select *
      xxxx
      Season;", conn);
      xxxxxxxxx
      .
      xxxxxxxxxxx
      =
      xxxxxxxxxxx
      .Text;
      xxxxxxxxxxxxxxx
      rdr = cmdSeason.
      xxxxxxxxxxxxx
      ();
      xxx
      macthCounter = 1;
      xxx
      xxxxxxxxxxx
      =
      xxx
      xxxx
      (); //
      xxxx
      xxx
      the data from
      xxxxxx
      table;
      xxxxx (xxx.xxxx())
      {
      xxxxxxxxxxx.xxx(xxx xxxxxxxxxxxx(xxx["xxxxxxxx"].xxxxxxxx(), xxx["xxxxxxxx"].xxxxxxxx()));
      - - - more text follows - - -



    Purchasing Instruction
    List Price: $19
    Buy Now

    Buy More Save More
    Buy at least TWO items & save up to 30% OFF your ENTIRE order!
    Rack up instant rebates in your shopping cart. Simply add items to your cart, and see the savings add up.
    Discounts will automatically be applied on eligible orders.

    Add to Cart