Using the MySQL Workbench query editor or the Command Terminal copy the

Using the mysql workbench query editor or the command

This preview shows page 8 - 15 out of 21 pages.

Using the MySQL Workbench query editor or the Command Terminal, copy the following code below. Observation: I created a function where 1 is true and the username is logged-in and 0 is false where the username is not found in the data base or fails to log-in. 2. Execute the SQL code. 3. Using the MySQL Workbench query editor or the Command Terminal, copy the following code below. Observation: After creating new function, I used it in create procedure.
Image of page 8
4. Execute the SQL code. 5. Test the Stored Procedure and Function by copying the following code and executing it. 6. Inserting an existing Account record will result in 1 else it will be 0. Observation: I called the LoginUser that is added on the database and used the username and password that I created in the previous procedure. As you can see on the screenshot it shows 1, meaning the user successfully logged in This is the result of successfully call for loginuser. 7. Modify the code by replacing the codes in the Python function authenticateUser() with the code below. The ones emphasized with red lines are the codes that were changed.
Image of page 9
Observation: I modified the that I created earlier 8. Run and validate the result again. The output should be the same with procedures 5 and 6. MS SQL Database Connection 1. Login to the SQL Server Management Studio using your credentials. 2. Create the database mydb_<lastname>. Observation: I created a database in SQL Server Management Studio 3. Create the Accounts table and insert at least two values to the table.
Image of page 10
4. Insert at least two values to the table. Observation: I created a table named account and added 2 values in the table 5. Create the scalar-valued stored function named authenticateUser.
Image of page 11
Observation: I created a scalar-valued function and named it as AuthenticateUser 6. Create the stored procedure login.
Image of page 12
Observation: I created a stored procedure named Loginnew 7. Test the stored procedure and function. 8. The result of the login_status should be similar earlier on the MySQL. 9. Modify the with the code below SUPPLEMENTARY ACTIVITY
Image of page 13
1. The database that will be used is the ABCLibrary database. You may use an existing ABCLibary database or create a new one.
Image of page 14
Image of page 15

You've reached the end of your free preview.

Want to read all 21 pages?

  • Fall '16

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors