Hunt

Thursday, December 17, 2009

DIFFERENCES...

DIFFERENCE BETWEEN CTYPE AND DIRECTCAST
================================================================================

Point#1
DirectCast requires the run-time type of an object variable to be the same as the specified type.The run-time performance of DirectCast is better than that of CType, if the specified type and the run-time typeof the expression are the same. Ctype works fine if there is a valid conversion defined between the expression and the type.

Point#2
The difference between the two keywords is that CType succeeds as long as there is a valid conversion defined between the expression and the type, whereas DirectCast requires the run-time type of an object variable to be the same as the specified type. If the specified type and the run-time type of the expression are the same, however, the run-time performance of DirectCast is better than that of CType.

================================================================================

UNIQUE KEY AND PRIMARY KEY
=================================================================================

Primary key and unique are Entity integrity constraints.

Primary key:

1)Primary key is nothing but it is uniqly identified each roe in Table.

2)Primary key Does not Allowes Duplicate values and Null values.

3)Primary key is default Clustered indexes

4)One table can have only one Primary key.
5) primary key can reference to other table as foreign key.


Unique Key:

1)Unique Key is nothing but it is uniqly identified each row in Table.

2)Unique Key Does not Allowes Duplicate values but allowes only one Null value.

3)Unique key is default Non- Clustered indexes

4)One table can have more number of Unique key

===================================================================================

NORMALIZATION


Normalization is the process of efficiently organizing data in a database. There are two goals of the normalization process: eliminating redundant data (for example, storing the same data in more than one table) and ensuring data dependencies make sense (only storing related data in a table). Both of these are worthy goals as they reduce the amount of space a database consumes and ensure that data is logically stored.
The Normal Forms
The database community has developed a series of guidelines for ensuring that databases are normalized. These are referred to as normal forms and are numbered from one (the lowest form of normalization, referred to as first normal form or 1NF) through five (fifth normal form or 5NF). In practical applications, you'll often see 1NF, 2NF, and 3NF along with the occasional 4NF. Fifth normal form is very rarely seen and won't be discussed in this article.

Before we begin our discussion of the normal forms, it's important to point out that they are guidelines and guidelines only. Occasionally, it becomes necessary to stray from them to meet practical business requirements. However, when variations take place, it's extremely important to evaluate any possible ramifications they could have on your system and account for possible inconsistencies. That said, let's explore the normal forms.
First Normal Form (1NF)
First normal form (1NF) sets the very basic rules for an organized database:

* Eliminate duplicative columns from the same table.
* Create separate tables for each group of related data and identify each row with a unique column or set of columns (the primary key).

Second Normal Form (2NF)
Second normal form (2NF) further addresses the concept of removing duplicative data:

* Meet all the requirements of the first normal form.
* Remove subsets of data that apply to multiple rows of a table and place them in separate tables.
* Create relationships between these new tables and their predecessors through the use of foreign keys.

Third Normal Form (3NF)
Third normal form (3NF) goes one large step further:

* Meet all the requirements of the second normal form.
* Remove columns that are not dependent upon the primary key.

Fourth Normal Form (4NF)
Finally, fourth normal form (4NF) has one additional requirement:

* Meet all the requirements of the third normal form.
* A relation is in 4NF if it has no multi-valued dependencies.


URL:http://databases.about.com/od/specificproducts/a/normalization.htm
===========================================================================

DIFFERENCE BETWEEN REPEATOR,DATALIST AND GRIDVIEW CONTROLS
===========================================================
Explanation:
In ASP .NET basically there are three kinds of the Data Presentation Controls.

1. GridView (or DataGrid)
2. DataList
3. Repeater


When we talk about usage of one Data Presentation Controls then many of us get confused about choosing one. When you need to use one of the data Presentation Control then You have to see what kind of behavior you need in your Data Display.

1. Do you want to show Data in many Pages or in one page?
2. Do you have to Display more then one column in a Row ?
3. Do you want to have a Row repeating Possibility?
4. Will users be able to update, Insert and delete the Data?

We are going provide a list of different abilities of Repeater Control, Datalist Control and GridView Control.



Features of a GridView
•Displays data as a table
•Control over
–Alternate item
–Header
–Footer
–Colors, font, borders, etc.
–Paging
•Updateable
•Item as row

Features of Repeater
•List format
•No default output
•More control
•More complexity
•Item as row
•Not updateable


Features of DataList
•Directional rendering
•Good for columns
•Item as cell
•Alternate item
•Updateable

===============================================================
Difference between Datagrid,DataList and Data Repeater:

* Datagrid has paging while Datalist doesnt.
* Datalist has a property called repeat. Direction = vertical/horizontal. (This is of great help in designing layouts). This is not there inDatagrid.
* A repeater is used when more intimate control over html generation is required.
* When only checkboxes/radiobuttons are repeatedly served then a checkboxlist or radiobuttonlist are used as they involve fewer overheads than aDatagrid.

The Repeater repeats a layout of HTML you write, it has the least functionality of the three. DataList is the next step up from a Repeater; accept you have very little control over the HTML that the control renders. DataList is the first of the three controls that allow you Repeat-Columns horizontally or vertically. Finally, the DataGrid is the motherload. However, instead of working on a row-by-row basis, you’re working on a column-by-column basis. DataGrid caters to sorting and has basic paging for your disposal. Again you have little contro, over the HTML. NOTE: DataList and DataGrid both render as HTML tables by default.



===========================================================================
URL
http://www.dotnet-friends.com/fastcode/asp/fastcodeinasp140ee486-9653-4807-bf04-aee4d5696991.aspx

http://24x7aspnet.blogspot.com/2009/06/feature-difference-between.html
===========================================================================

No comments:

Post a Comment