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
  • Preview random excerpt
    xxx xxxxxxxx;
    xxxxxxxxx $$
    xxxxxx xxxxxxxxx xxxxxxxxxxxxxxxxx(xx xxxxxxxxx xxxxxxx(5), xx xxxxxxxxx xxxxxxx(5),xx xxxxxxxxxxxxxx xxx, xx xxxxxxxxxxxxxx xxx)
    xxxxx
    SET SQL_SAFE_UPDATES = 0; UPDATE Season
    xxx
    HomeTeamScore =
    xxxxxxxxxxxxxx
    ,
    xxxxxxxxxxxxx
    = pAwayTeamScore
    xxxxx
    HomeTeam =
    xxxxxxxxx
    AND AwayTeam = pAwayTeam; END$$ DELIMITER ; --
    xxxx
    to verify stored
    xxxxxxxxx
    CALL Baseball.UpdateMatchResult('Team1', '
    xxxxx
    ',
    x
    ,
    x
    ); --
    xxxxxx
    to show the updated
    xxxx
    SELECT *FROM Season WHERE HomeTeam = 'Team1' AND AwayTeam = '
    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...
    x
    );
    xxxx
    .Open();
    xxxxxxxxxxxx
    xxxxxxxxx
    =
    xxx
    xxxxxxxxxxxx
    ("Select *from Season;", conn);
    xxxxxxxxx
    .CommandType =
    xxxxxxxxxxx
    .Text;
    xxxxxxxxxxxxxxx
    rdr =
    xxxxxxxxx
    .
    xxxxxxxxxxxxx
    ();
    xxx
    macthCounter =
    x
    ;
    xxx
    matchesList =
    xxx
    List(); //
    xxxx
    all the data 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
    .
    xxxxxxxxx
    ("Connecting
    xx
    MySQL...");
    xxxx
    .
    xxxx
    ();
    xxxxxxxxxxxx
    cmdSeason =
    xxx
    xxxxxxxxxxxx
    ("Select *from Season;", conn);
    xxxxxxxxx
    .CommandType = CommandType.Text;
    xxxxxxxxxxxxxxx
    rdr = cmdSeason.ExecuteReader();
    xxx
    macthCounter =
    x
    ;
    xxx
    matchesList = new List(); //
    xxxx
    xxx
    the data
    xxxx
    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