Codechef4u is a community for computer professionals,by computer professionals,just like you; who loves sharing and helping each others,Join them
Share your post

CTS in .NET

What is the CTS?

Common type system check how types are declared ,used and managed in common language run time.

CTS standardize types for cross-language integration.


CTS stands for Common type system

 

The CTS performs following functions:

1. Enable cross-language integration, type safety, and high-performance code execution.
2. Provide OOPs model for multiple language implementation.
3. Defines rules that all languages follow it, which helps ensure that objects written in different Languages can interact with each other.
4. provides a library that contains the primitive data types (such as Boolean, Byte, Char, Int32, and UInt64) used in application development.

 

This is the range of types that the .NET run time understands, and therefore that .NET applications can use.. The CTS is a super set of the CLS(Common language specification).

Example:

Declaration of int variable in VB converted into int32 in C#, System.int class ensures that type safety.



CLR in .Net

What is the CLR?

CLR is runtime environment provided by Microsoft with .net framework to make development process easier.

Code we develop with CLR is called managed code


CLR stand for  Common Language Runtime.


CLR is set of resources provided by Microsoft:

 

1.  Security model
2. Type system
3. All .NET base classes
4. Many .NET framework classes
5. Development, debugging, and profiling tools
6.  Execution and code management
7.  IL-to-native translators and optimizers


Advantages using CLR:

1.  Performance improvements.
2.  Cross-language exception handling
3.  Cross-language integration
4.  Enhanced security
5.  Versioning and deployment support
6.  Debugging and profiling services
7.  Support for custom attributes
8.  A simplified model for component interaction
9.  Garbage Collection
10.  Use of delegates instead increases type safety and security instead of function pointers.
11.  Language features such as inheritance, interfaces, and overloading for object-oriented programming

SQL Views

View is a virtual table based on the result-set of an SQL statement and that is Stored in the database with some name.

Syntax:

CREATE VIEW SomeViewName AS
SELECT Some_columnName(s)
FROM tableName
WHERE condition


Example:

Create View:

CREATE VIEW StudentProducts AS
 
SELECT  * FROM Products WHERE CategoryId in (Select CategoryID from Categories where CategoryName='Books')
 
GO  

Update View:

MS-SQL supported

ALTER VIEW StudentProducts AS
 
SELECT  * FROM Products WHERE CategoryId in (Select CategoryID from Categories where CategoryName in ('Books','Mobile'))
 
GO

 

Oracle supported:

CREATE OR REPLACE VIEW StudentProducts AS
 
SELECT  * FROM Products WHERE CategoryId in (Select CategoryID from Categories where CategoryName in ('Books','Mobile'))
 
GO


DROP view:

DROP View StudentProducts