This topic contains a solution. Click here to go to the answer

Author Question: Explain the features of the following code.CREATE PROCEDURE usp_StudentLogInstudentKey nchar(10)ASIF ... (Read 26 times)

ap345

  • Hero Member
  • *****
  • Posts: 537
Explain the features of the following code.CREATE PROCEDURE usp_StudentLogInstu dentKey nchar(10)ASIF EXISTS(SELECT FROM studentWHERE studentKey=studentKey)BEGINSELECT studentLastNameFROM StudentWHERE Studentkey=studentKeyEND
 
  What will be an ideal response?

Question 2

Explain how views and stored procedures could be used to help ensure the security of a database.
 
  What will be an ideal response?



Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by a Subject Expert

sokh

  • Sr. Member
  • ****
  • Posts: 357
Answer to Question 1

This code creates a stored procedure called usp_StudentLogIn. It asks for a parameter StudentKey. Next it checks to see if that studentKey exists in the student table. If it does it returns the students name.

Answer to Question 2

Views present the user with a view of the data that is appropriate to their use of the database. Views can be used to hide the underlying structure of the tables and columns. This can help prevent a disgruntled user from attacking the underlying structure. Stored procedures can be used to capture INSERTS, UPDATES, and DELETES and make sure they occur safely.




ap345

  • Member
  • Posts: 537
Reply 2 on: Jul 7, 2018
Excellent


isabelt_18

  • Member
  • Posts: 342
Reply 3 on: Yesterday
Thanks for the timely response, appreciate it

 

Did you know?

In 1864, the first barbiturate (barbituric acid) was synthesized.

Did you know?

Of the estimated 2 million heroin users in the United States, 600,000–800,000 are considered hardcore addicts. Heroin addiction is considered to be one of the hardest addictions to recover from.

Did you know?

Certain topical medications such as clotrimazole and betamethasone are not approved for use in children younger than 12 years of age. They must be used very cautiously, as directed by a doctor, to treat any child. Children have a much greater response to topical steroid medications.

Did you know?

The toxic levels for lithium carbonate are close to the therapeutic levels. Signs of toxicity include fine hand tremor, polyuria, mild thirst, nausea, general discomfort, diarrhea, vomiting, drowsiness, muscular weakness, lack of coordination, ataxia, giddiness, tinnitus, and blurred vision.

Did you know?

Everyone has one nostril that is larger than the other.

For a complete list of videos, visit our video library