-->

Thursday, December 5, 2013

Common Language Runtime and Features, .NET Framework: Introduction to Sql Server

Earlier article was about .Net Framework and its components. In this article we will discuss about the remaining component i.e. Common Language Runtime, the important among all.

The CLR, Common Language Runtime, is one of the most essential components of the .NET Framework. It provides an environment for the application to run. The CLR or the runtime provides functionalities, such as exception handling, security, debugging, and versioning support to the applications.

Here're some of the features provided by the CLR:


  • Automatic memory management: allocates and de-allocates memory to the application as and when required.
  • Standard type system: provides a set of common data types in the form of Common Type System (CTS). This means that the size of integer and long variables is the same across all programming languages.
  • Language Inter-operability: provides the ability of an application to interact with another application written in a different programming language. This also helps maximize code reuse.
  • Platform independence: allows execution of a code from any platform that supports the .NET CLR.
  • Security management: applies restrictions on the code to access the resources of a computer.

The CLR can host a variety of languages and offers a common set of tools across these languages, ensuring inter-operability between the codes. The code developed with a language compiler that targets the CLR is called a managed code.

Alternatively, the code that is developed without considering the conventions and requirements of the common language runtime is called unmanaged code. Unmanaged code executes in the common language runtime environment with minimal services. For example, unmanaged code may run with limited debugging and without the garbage collection process.

The components of SQL Server and the .NET Framework provide various features to the database server. These features help the developers to manage data in an efficient way.

Read Also: SQL Server Features and SQL Intro

SQL Server Integration with .NET Framework: Introduction to SQL

The .NET Framework is a collection of services and classes and exists as a layer between the .NET applications and the underlying operating system. SQL Server uses various services provided by the .NET Framework. For example, the notification services component is based on the .NET Framework and uses its services to generate and send notification messages.

SQL Server is integrated with the .NET Framework, as shown in the following figure.

SQL Server Integration with .NET Framework: Introduction to SQL

Advantage of the .NET integration is that you can create managed database objects. Managed database objects are created by using any .NET language and can be embedded within the SQL Server. For example, developers can create an object that retrieves data from a Web server and saves it in a database table. This provides the software developer with a flexibility of writing codes in a language the developer is most comfortable with. Therefore, as a database developer, it is important to understand the .NET Framework.

The .NET Framework

The .NET Framework is an environment used to build, deploy, and run business applications. These applications can be built in various programming languages supported by the .NET Framework.

The .NET Framework is designed to make significant improvements in code reuse, code specialization, resource management, Multilanguage development, security, deployment, and administration. Therefore, it helps bridge the gap of interoperability between applications.

The .NET Framework consists of the following components:

  • Development tools and languages
  • Base Class Library
  • Common Language Runtime (CLR)

Development Tools and Languages

The development tools and languages are used to create the interface for the Windows forms, Web forms, and console applications. The development tools include Visual Studio 2005 and Visual C# Developer. The languages that can be used are Visual Basic .NET, C#, or J#. These components are based on the .NET Framework base classes.

Base Class Library

The .NET Framework consists of a class library that acts as a base for any .NET language, such as Visual Basic, .NET, and C#. This class library is built on the object-oriented nature of the runtime. It provides classes that can be used in the code to accomplish a range of common programming tasks, such as string management, data collection, database connectivity, and file access.

CLR provides an environment for the application to run, discussed in next article.
© Copyright 2013 Computer Programming | All Right Reserved