Tutor profile: Steve M.
Questions
Subject: Databases
What is the difference between an inline query or a parameterized query (aka prepared statements)? How does one query visibly look different than the other? How is this different from stored procedures (aka stored routines)?
Both inline and parameterized queries execute the SQL against the database. The difference is that inline statements will (frequently) use string concatenation to introduce variables; where parameterized queries will use strongly typed object replacement for variables. The effect is that variables are treated as "code" with inline statements (allowing potential injection attacks), but parameterized queries treat the variable strictly as data. A stored procedure is a compiled SQL statement, which could contain one-to-many SQL statements, and any of them could allow for inline SQL and/or parameterized SQL.
Subject: Computer Science (General)
How would you explain the difference between an interface and an abstract class? Do they share any similarities?
An interface is simply a declaration of the methods, functions, and properties that are expected to be available. There is no functional code present. An abstract class, however, *could* contain functional code. Interfaces do not specify the accessibility (encapsulation) of methods, functions, and properties. However, abstract classes can indicate accessibility of methods/functions/properties. Both concepts require a class to implement/inherit from those concepts to be useful.
Subject: C Sharp Programming
The "using" keyword is powerful for reducing lines of code and calling "Dispose" before exiting it's block. What is another way of writing a "using" statement? Can you think of case where you would want to do the alternate implementation instead of the "using" block?
The alternate implementation is "try-finally", where "catch" is ignored. A case where you would not want to use a "using" block is where you could have specific exceptions to "catch" and act upon for exiting out. One example would be database communication for large dataset interactions, where you may need to rollback some initial data commits. Another example would be TCP communication, where endpoints could fail and leave stale open connections for an extended period of time (before GC or other cleanup happens).
Contact tutor
needs and Steve will reply soon.