Interview Tips Database/SQL Questions
Interview Tips Database/SQL Questions
2. What’s the implicit name of the parameter that gets passed into the class’ set method?
System.Object.
When overriding, you change the method behavior for a derived class. Overloading simply
involves having a method with the same name within the class.
5. What is CLR?
The .NET Framework provides a runtime environment called the Common Language
Runtime or CLR (similar to the Java Virtual Machine or JVM in Java), which handles the
execution of code and provides useful services for the implementation of the program. CLR
takes care of code management at program execution and provides various beneficial services
such as memory management, thread management, security management, code verification,
compilation, and other system services. The managed code that targets CLR benefits from
useful features such as cross-language integration, cross-language exception handling,
versioning, enhanced security, deployment support, and debugging.
6. What is CTS?
Common Type System (CTS) describes how types are declared, used and managed in the
runtime and facilitates cross-language integration, type safety, and high performance code
execution.
7. What is CLS?
The CLS is simply a specification that defines the rules to support language integration in
such a way that programs written in any language, yet can interoperate with one another,
taking full advantage of inheritance, polymorphism, exceptions, and other features. These
rules and the specification are documented in the ECMA proposed standard document,
"Partition I Architecture", http://msdn.microsoft.com/net/ecma
A name that consists of an assembly's identity—its simple text name, version number, and
culture information (if provided)—strengthened by a public key and a digital signature
generated over the assembly.
The primary purpose of the AppDomain is to isolate an application from other applications.
Win32 processes provide isolation by having distinct memory address spaces. This is
effective, but it is expensive and doesn't scale well. The .NET runtime enforces AppDomain
isolation by keeping control over the use of memory - all memory in the AppDomain is
managed by the .NET runtime, so the runtime can ensure that AppDomains do not access
each other's memory. Objects in different application domains communicate either by
transporting copies of objects across application domain boundaries, or by using a proxy to
exchange messages.
10. What is serialization in .NET? What are the ways to control serialization?
12. What is Global Assembly Cache (GAC) and what is the purpose of it?
Each computer where the common language runtime is installed has a machine-wide code
cache called the global assembly cache. The global assembly cache stores assemblies
specifically designated to be shared by several applications on the computer. You should
share assemblies by installing them into the global assembly cache only when you need to.
All .NET compilers produce metadata about the types defined in the modules they produce.
This metadata is packaged along with the module (modules in turn are packaged together in
assemblies), and can be accessed by a mechanism called reflection. The System.Reflection
namespace contains classes that can be used to interrogate the types for a module/assembly.
The .NET Framework provides a run-time environment called the Common Language
Runtime, which manages the execution of code and provides services that make the
development process easier. Compilers and tools expose the runtime's functionality and
enable you to write code that benefits from this managed execution environment. Code that
you develop with a language compiler that targets the runtime is called managed code; it
benefits from features such as cross-language integration, cross-language exception handling,
enhanced security, versioning and deployment support, a simplified model for component
interaction, and debugging and profiling services
The namespace keyword is used to declare a scope. This namespace scope lets you organize
code and gives you a way to create globally-unique types. Even if you do not explicitly
declare one, a default namespace is created. This unnamed namespace, sometimes called the
global namespace, is present in every file. Any identifier in the global namespace is available
for use in a named namespace. Namespaces implicitly have public access and this is not
modifiable.
SQLClient .NET classes are highly optimized for the .net / sqlserver combination and
achieve optimal results. The SqlClient data provider is fast. It's faster than the Oracle
provider, and faster than accessing database via the OleDb layer. It's faster because it
accesses the native library (which automatically gives you better performance), and it was
written with lots of help from the SQL Server team.
Clone - Copies the structure of the DataSet, including all DataTable schemas, relations, and
constraints.Does not copy any data
Copy - Copies both the structure and data for this DataSet.
20. In a Webservice, need to display 10 rows from a table. So DataReader or DataSet is best
choice?
It’s an abstract class with public abstract methods all of which must be implemented in
the inherited classes
25. What is the transport protocol you use to call a Web service