Data Type is an attribute that specifies the type of data that object can hold.
System.Boolean ( 1 byte
System.Byte ( 1 byte
System.Char ( 2 bytes
System.Int16 ( 2 bytes
System.Int32 ( 4 bytes
System.Int64 ( 8bytes
System.Object ( 4bytes
System.Single ( 4bytes
System.Double ( 8bytes
System.Decimal ( 12bytes
System.DateTime ( 8bytes
System.String ( 10bytes +(2*string length)
System.ValueType ( Sum of Member sizes(User Defined Type)
Monday, May 26, 2008
Data Types in .NET
Differences between Dataset and DataReader
The Dataset object is central to supporting disconnected and distributed data scenarios with ADO.NET. The Dataset is a memory-resident representation of data that provides a consistent relational programming model regardless of the data source. It can be used with multiple and differing data sources, used with XML data, or used to manage data local to the application.
The Dataset represents a complete set of data including related tables, constraints, and relationships among the tables. I think this is something that gives the advantage upon the older ADO.
ADO.NET DataReader to retrieve a read-only, forward-only stream of data from a database. Using the DataReader can increase application performance and reduce system overhead because only one row at a time is ever in memory.
Choosing a DataReader or a Dataset:
When deciding whether your application should use a DataReader (see Retrieving Data Using the DataReader) or a Dataset (see Creating and Using Dataset s), you should consider the type of functionality that your application requires.
Use a Dataset to do the following:
Remote data between tiers or from an XML Web service. Interact with data dynamically such as binding to a Windows Forms control or combining and relating data from multiple sources. Cache data locally in your application. Provide a hierarchical XML view of relational data and use tools like an XSL Transformation or an XML Path Language (XPath) Query on your data.
For more information, see XML and the Dataset . Perform extensive processing on data without requiring an open connection to the data source, which frees the connection to be used by other clients.
If you do not require the functionality provided by the Dataset . You can improve the performance of your application by using the DataReader to return your data in a forward-only read-only fashion. Although the DataAdapter uses the DataReader to fill the contents of a Dataset (see Populating a Dataset from a DataAdapter), by using the DataReader you can receive performance gains because you will save memory that would be consumed by the Dataset , as well as saving the processing required to create and fill the contents of the Dataset .
Why to use SiteMinder
SiteMinder is the user authentication and authorization component of an access management suite. SiteMinder provides policy-based authentication as well as single sign-on for all Web-based applications. SiteMinder is used in conjunction with IdentityMinder, which manages detailed user profiles, and TransactionMinder, which provides access to Web services. To integrate SiteMinder authentication within an ASP.NET application what must be done (beside the installation and configuration of the Web Agent, Policy Server, etc, of course) is to extract the SiteMinder HTTP headers from the web request and construct a Generic Principal object which holds the identity of the authenticated user.
Problems facing today’s internet business:
• Securing content
• Managing users and access control
• Customizing user’s experience
• Scaling for large/small number of users
• Integrating already existing web based systems.
• Implementation of SiteMinder will overcome all the mentioned issues what we are facing in current internet business and applications.
Why to use SiteMinder:
• SiteMinder Provides a single customized view of any portal, to a variety of users.
• It addresses key authentication, authorization and personalization requirements of building secure web sites, in a cost effective and efficient way.
• Site Minder supports a variety of platforms.
• Centralized administration
• Ease of implementation for redundant setup
• Deliver an improved user experience(Single sign on, Personalization, User registration etc)
• Provide delegated administration
• Scale for large and small projects.
• Integrate applications and improve workflow.
• Allow easier web application development.
New features in ADO.NET 2.0
1. MARS
The new Multiple Active Result Sets (MARS) feature in ADO.NET 2.0 can have multiple active commands on one connection. By using MARS, you can open a connection to the database, create a new command and process some results, create a second command and process those results, then go back to the first command and process more results. No blocking happens between the commands that share the database connection. You can use MARS support only with SQL Server 2005 systems.
2. Schemas
In ADO.NET 2.0, Microsoft has added a set of features to the standard managed code classes that you can use as an API to query database schemas and obtain information about the tables, stored procedures, data types, users, and other content of a database.
3. Bulk Insert
The SqlBulkCopy object provides a high-performance method for transferring database objects between databases or SQL Server systems. However, the object doesn't connect to the file system and thus can't be used to import flat files to SQL Server.
4. Query Notification
If records in the underlying database table change, then your Web application will display old, inaccurate data. ADO.Net 2.0 provides us with the feature where in the cache can be invalidated and the data is re-loaded in the cache when the request is made if the underlying data changes before the cache expires. SQL Server 2005 has got a SQL Broker Service feature where-in it will notify the web application that the data has changed. This helps in relieving the web application to poll to the SQL Server 2005 to check for data changes.
5. New Data Set
The indexing engine for SQL Server 2005 has been re-written which helps in reading the data much faster than earlier version. The DataTable is independently serializable and can be used in both web service and remoting scenarios. The DataTable now supports the basic methods for XML, just as the DataSet does.
6. XML Data Type Support
XML data type is just like INT or VARCHAR, and SQL Server 2005 allows in-place querying and processing of this data type using a series of XML-specific functions. There is also support for storing collections of XML schemas in the database, enabling database-based schema validation.
7. Asynchronous Support
Asynchronous support lets client applications submit queries without blocking the UI. ADO.NET 2.0 lets server applications issue multiple database requests on different threads. The support works with SQL Server 2005, SQL Server 2000, and SQL Server 7.0.
VS 2008 Certification
Visual Studio 2008 certifications are part of the ‘new generation’ of certifications, i.e. Microsoft Certified Technology Specialist (MCTS) and Microsoft Certified Professional Developer (MCPD)–the same format in which VS2005 certifications were released.
There will not be an upgrade path from MCAD or MCSD to Visual Studio 2008, but you can go from MCAD/MCSD to Visual Studio 2005, then follow a (to-be-determined) transition path to Visual Studio 2008
If you are new to certification (or just haven’t started a VS2005 or VS2008 track), take 70-536 because it is the first step for both 2005 and 2008 MCTS cert’s and is available now.
If you are partially through an MCAD or MCSD track, you can finish them. MCAD/MCSD won’t expire. However, at some point this year retirement of those exams will be announced (usually with a year’s notice) so keep that in mind, keep an eye out for a formal announcement, and get a move on. For that reason, too, It is not recommend starting a MCAD or MCSD track from the beginning now - instead consider exams in the MCTS/MCPD family.
If you work with Visual Studio 2005, start (or finish) a Visual Studio 2005 certification track. As long as you are working with VS2005 those certs will have value, one of the exams is part of your 2008 track and there will be a 2005 to 2008 option, for when/if you want to transition your certification to 2008.
If you want to start a VS2008 track from scratch (or if you are MCAD/MCSD and want to wait for 2008), you can start now on 70-536.
When to use dataset & data reader
When we need to work with few tables and most of the time you need to execute queries on these tables, you should go for the dataset.
Disconnected data access is suited most to read only instances and disconnected data access architecture is not designed to be used in the networked environment where multiple users are updating data simultaneously and each of them needs to be aware of current state of database at any time.
DataReader is more useful when you need to work with large number of tables, Database in non-uniform pattern and you need not execute the large no. of queries on few particular table.
It also depends on the nature of application. If multiple users are using the database and the database needs to be updated every time, you must not use the dataset. For this, .Net provides the connection oriented architecture.
But in the scenarios where instant update of database is not required, dataset provides optimal performance by making the changes locally and connecting to database later to update a whole batch of data. This also reduces the network bandwidth if the database is accessed through network.
