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
      ;
      xxxxxx
      xxxxxx
      SET HomeTeamScore = pHomeTeamScore, AwayTeamScore = pAwayTeamScore WHERE HomeTeam =
      xxxxxxxxx
      AND AwayTeam =
      xxxxxxxxx
      ;
      xxx
      $$ DELIMITER ; -- Call to verify stored
      xxxxxxxxx
      xxxx
      Baseball.UpdateMatchResult('Team1', '
      xxxxx
      ', 1,
      x
      ); -- SELECT to show the updated info SELECT *
      xxxx
      Season WHERE
      xxxxxxxx
      = '
      xxxxx
      ' AND
      xxxxxxxx
      = '
      xxxxx
      ';
      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("Connecting to MySQL...");
      xxxx
      .
      xxxx
      ();
      xxxxxxxxxxxx
      cmdSeason =
      xxx
      xxxxxxxxxxxx
      ("Select *from
      xxxxxx
      ;",
      xxxx
      );
      xxxxxxxxx
      .
      xxxxxxxxxxx
      =
      xxxxxxxxxxx
      .
      xxxx
      ;
      xxxxxxxxxxxxxxx
      rdr = cmdSeason.
      xxxxxxxxxxxxx
      ();
      xxx
      macthCounter = 1;
      xxx
      xxxxxxxxxxx
      =
      xxx
      List(); //
      xxxx
      all the
      xxxx
      from Season 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
      .WriteLine(
      xxxxxxxxxxx
      xx
      MySQL...
      x
      );
      xxxx
      .Open();
      xxxxxxxxxxxx
      cmdSeason = new MySqlCommand(
      xxxxxxx
      *from Season;", conn);
      xxxxxxxxx
      .CommandType =
      xxxxxxxxxxx
      .Text;
      xxxxxxxxxxxxxxx
      rdr = cmdSeason.ExecuteReader();
      xxx
      macthCounter = 1;
      xxx
      matchesList =
      xxx
      xxxx
      (); //
      xxxx
      all the data from Season 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