Database

Database related, specially SQL Server issues. Well the .NET codes related to database also falls in this catagory.

Employee Info Starter Kit: Project Mission

Employee Info Starter Kit is an open source ASP.NET project template that is intended to address different types of real world challenges faced by web application developers when performing common CRUD operations. Using a single database table ‘Employee’, it illustrates how to utilize Microsoft ASP.NET 4.0, Entity Framework 4.0 and Visual Studio 2010 effectively in that context. Employee Info Starter Kit is highly influenced by the concept ‘Pareto Principle’ or 80-20 rule. where it is targeted to ...

Email Reporter: VSTS 2008 Load Test Plug-in (V1.0) Released

Microsoft’s Visual Studio Team System Test Edition provides a powerful platform to perform high volume load testing. It also provides high end flexibilities to write and utilize external plug-in for extended functionalities. Email Reporter: VSTS 2008 Load Test Plug-in enables users to send the load test reports to one or more pre-configured email addresses automatically, once a VSTS Load Test is completed. This open-source load test plug-in also provides supports for customization by which you can ...

nAML: A New Revolutionary Way to Model Your .NET Applications!

Understanding the architecture and code in software application plays as major factors while building good software products. Having an easy to understand visual notation, not only helps architects to model the system efficiently, but also helps developers to quickly implement that, as well as it helps the re-engineering process to easily adopt the architectural model with respect to new requirement. A new visual modeling technique, termed as “nAML” (.NET Application Modeling Language) is being introduced ...

Using .NET 2.0 Generics for Custom Entity Collection

Generics is a new feature in .NET 2.0 which allows us to create a data structure without committing to a specific data type. In the early age of .net 2.0 (i.e. .net 1.x), while using custom entity model in our application data architecture, we had to create a separate class regarding the collection for each of custom entity. The custom entity public class SystemUser { public string _Name, _Password; public SystemUser(string name, string password) { _Name = name; _Password = password; } public string ...

ASP.NET Role Based Security: The Basics

Authentication and authorization is the two basic part of the user-end security in asp.net web applications. After to successful authentication of a user, authorization takes the place according to which the authenticated user are allowed to access to the corresponding resources in the web application. Role based security is very basic requirements in the current trend of web applications. Mostly there are two roles involved, which are registered user and the admin users. However in a web application ...

Performing Long Running Operation with Asynchronous Page in ASP.NET 2.0

Technorati Tags: asp.net,async,web service,performance,database There are few cases in current web applications, where it involves long running operations. For instance, a system admin uploads 1 gig of data in the system, which will be processed by the system for 30-40 minutes to be splitted and putted properly in the database system, as well as notifying other system user regarding the availability if data. In the traditional approach of web application, the user has to wait for the whole time until ...

Performance Benchmark on Database Column and Row Expansion

What performs better – Expanding DB column or expanding db row? My benchmark test shows expanding DB column performs better, on the following machine configuration: Processor: Intel® Pentium® 4; 2.66 GHz; Memory: 960 RAM. Operating System: Windows XP, Version 2002, Service Pack 2. Expanding Columns A table having 4 columns with nchar(10) data type with 20,112 rows, query executes: SQL Server Execution Times: CPU time = 47 ms, elapsed time = 125 ms. Scan count 1, logical reads 232, physical reads ...

Concentration on Smarter Database Documentation

I have been working in SQL Server 2000 for previous several years. Of course it's a nice tool, where I can compile the top level requirements to physical implementation layer in much professional way. Well, as a developer, I have been faced a common problem in multiple projects, where I got confused while seeing the database diagram of an existing system, after a long time while I designed the database. Using database diagram, I can easily see the data fields, analyze the relations etc. But the ...

“Instance Saver” Custom Entity Model- Basic Architecture

Business Entity: For each custom business entity, there is a collection class. However, if our tech platform is .net 2.0, we can use the generic list class for collections. Business Layer: 1. Contains a “Save” instance method in business layer for insert and update operations.2. For delete and get operations, it uses static methods in the business layer. Data Access Layer: Data access layer contains all CRUD operations in one class ...

SQL Scripting in SQL Server 2005 Express

When we had worked in SQL Server 2000, including deployment into the remote server, for deployment in testing servers as well as slice the whole database in several parts requires sripts to be generated for both database schema and data. By this time for schema script generation I used “Enterprise Manager” and for generate SQL INSERT script for data I used an third party tool, found in codeproject, which can be found at http://www.codeproject.com/... Beside to populate ...

Efficient Batch Operation From ASP.NET 2.0 Using SQL Server 2005 XML Data Type

One of the good practice while developing high performance web application is to reduce the database roundtrip as much as possible. In the current trend of web applications, its a very common to enable users to delete multiple items in a list user interface at a time. To perform this type of batch delete operation, one common mistake that happens by beginner developers are to calling the data access method repetitively for each item with in a loop as below: For Each row As GridViewRow In gvEmployees.Rows ...

Some Basic Differences Between ASP.NET 2.0 ObjectDataSource and SqlDataSource

* Type NameFor ObjectDataSource, the property TypeName includes the class name, that will responsible to manage data, this may NOT be the data object collection. The select, insert etc methods will use the mentioned methods to access or retrieve data. For SqlDataSource, a built-in data collection is used, which can be bound to data data controls. * Connection StringFor ObjectDataSource, there is NO connection string needed, as it is used middle tier. For SqlDataSource, connection string is needed. ...

LINQ – We can use intellisense on queries !!!

As a developer always we want to have the opportunity to write the codes properly, along with programming language specific words and keyword to be highlighted in to different colors. Also VS.NET developers enjoys an IDE features named “Intellisense”, where while wring codes, a list of probable class or object name appears in a list and can be inserted to the code segment, just by selecting the appropriate item from the list. This becomes EXTREMELY useful, when we have to use long class ...

Using Data Access Application Block for .NET 2.0

DAAB definitely saves the lines of codes to be written for data access. The sample provided below doesn’t include DAAB, but some general codes in .net 2.0 for data access: string connectionString = (string)ConfigurationSettin... SqlConnection connection = new SqlConnection(connectionStr... SqlCommand command = new SqlCommand("INSERT_PERSON", connection); command.CommandType = CommandType.StoredProcedure; command.Parameters.Add(new SqlParameter("@Name", SqlDbType.NVarChar, ...

SQL Express Connection String

To let ASP.NET to search the database location, use the following connection strings in the web.config in specific cases -> in the default data folder connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilen... -> in an absolute path connectionString="Provider=... Source=C:\NewMembershipProv... Security Info=False" ...

Database Simplest Samples – Northwind Employees

Northwind database is such a database which is available in SQL Server 2000 and which data model is well known to most microsoft based developers. So, when testing or modeling new software framework or architecture, specially from data driven perspective, if we conisder Northwind it reduces sample data modeling, data generation etc overhead and also our architecture or product sample can be easily sharable with other developers. As relational database deals with three types of relationships, rather ...

Custom Entity – Many 2 Many Table Issue

When we define a custom business entity as an architecture for a given project, one common issue arises that, how we will consider “Many to Many” relationships? As there is only one entity for each database table, “Many to Many” tables might not be a good choice to make a separate table for that, since this is basically a connector entity. Case: Database Simplest Samples – Northwind Employees Entities: Employees, Territories, EmployeeTerritories, RegionOne-to-One: Employees ...

Custom Entity – Data Operation on Multiple Tables

1. In a case, where we are considering m2m, and it’s required to add a new entity record in the m2m table, an obvious case comes, where we create and save the entity first and then we add that entity in the m2m table. For example, when we add a new book to an exiting author’s book list, we first create a “Book” object and save it, and then we add this book to the author book list thru a static method. However, in that case, we might have to consider database server side or ...