1.Describe way(s) to tune the SQL table in order to
optimize performance.
2. Explain SQL Injection and how can you prevent them?
Answer / jerry joseph
1. identify and create optimal indexes for your tables
every table should have at least a clustered index
Indexes should be considered on all columns that are
frequently accessed by the WHERE, ORDER BY, GROUP BY, TOP,
and DISTINCT clauses
Static tables can be more heavily indexed that dynamic tables
2. An SQL Injection attack is a form of attack that comes
from user input that has not been checked to see that it is
valid. The objective is to fool the database system into
running malicious code that will reveal sensitive
information or otherwise compromise the server.
Example:
StrSQL = "SELECT * from Users WHERE username = '" +
txtUserName.Text + "' AND password = '" + txtPassword.Text +
"'";
if txtUserName is entered as "admin' OR 1 = 1;--" the query
becomes
"SELECT * from Users WHERE username = 'admin' OR 1 = 1;--'
AND password = '" + txtPassword.Text + "'"
user logs in as admin
Prevention :
Use Parameterized Queries or Stored Procedures to prevent
SQL Injection.
| Is This Answer Correct ? | 0 Yes | 0 No |
what is the Surrogate key?and wt is the diff between Primary key and Surrogate Key?
What is scalar user-defined function?
What do you understand by a view? What does the with check option clause for a view do?
What is the difference between Clustered and Non-Clustered Index?
Explain activity monitors
If no size is defined while creating the database, what size will the database have?
What is difference between stored procedure & function?
3 Answers CarrizalSoft Technologies, Concept Infoway, TATA,
Describe triggers features and limitations?
What is save transaction and save point?
What is a bit datatype?
What stored by the model?
What is application role in sql server database security? : sql server security
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)