DOC PREVIEW
Rose-Hulman CSSE 333 - Database Connectivity

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Database ConnectivityRecall Multi-Tier ArchitecturesWhy use stored procedures?Another Problem: Injection AttacksSlide 5GuidelinesDatabase ConnectivityRose-Hulman Institute of TechnologyCurt CliftonRecall Multi-Tier ArchitecturesDBMS ServerWeb ServerWeb BrowserCustom Client(e.g., Java, C#)Why use stored procedures?Could just send individual SQL commands from UIUse stored procedures to:Optimize performance Keep SQL code on the serverImprove security by preventing casual table browsing and modificationsMore easily create atomic transactions (more next week)Prevent SQL injection attacksAnother Problem: Injection AttacksConsider:Interface presents form prompting for usernameString username = userNameField.getText();Interface builds query to get user’s custom picture from database"SELECT IDPicture FROM Users WHERE Username = '" + username + "'"Interface sends query to backend databaseSo what’s the problem?Another Problem: Injection AttacksConsider:Interface presents form prompting for usernameString username = userNameField.getText();Interface builds query to get user’s custom picture from database"SELECT IDPicture FROM Users WHERE Username = '" + username + "'"Interface sends query to backend databaseUser enters: smith'; DELETE FROM Users WHERE true OR Username ='GuidelinesDo not build queries using concatenationDo not use a highly privileged SQL account for access from the applicationEncrypt the DB connection stringCache static information in the applicationAlways explicitly define the table columns you wish to fetchUse parameter validation at all


View Full Document

Rose-Hulman CSSE 333 - Database Connectivity

Download Database Connectivity
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Database Connectivity and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Database Connectivity 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?