2009年2月25日星期三

February 26th-27th Links:SQL SERVER,ASP.NET PERFORMANCE

C#
    1. Creating SOLID Code: Sigle Responsibility Principle- Episode-Codebetter.com 

ASP.NET

IIS

SQL SERVER
    The query statement is related Table : sys.foreign_keys,sys.foreign_key_columns,sys.objects
    Third Normal Form(3NF) is most preferable normal form in RDBMS.Nomalization is the process of designing a data model to efficiently store data in database.The rules of 3NF are mentioned here:
    1) Make a sperate table for each set of related attributes, and give each table a privary key.
    2) If an attribute deponds on only part of a muil-valued key. remove it to a separate table.
    3) If an attribute don't contribute(有助) to a description of the key, remove it to a separate table.
    Normalization is very close to concept of Object Oriented schema's and it stores one data at only one place by removing all the redundant(多余的) data. Normalization comes at cost of performance.
    PS: 1NF: 数据库表中的字段都是单一属性,不可再分.
           attribute1   attribute2  attribute3(attribute3.1,attribute3.2...)
           2NF: 数据库表中不存在非键字段对任一候选关键字段的部分函数依赖.
           (studentId, courseName)->(studentName,age,grade,credits(学分))
           but
           (courseName)->(credits)
           (studentId)->(studentName,age)
           3NF: 数据表中不存在非关键字段对任一候选关键字段的传递函数依赖。
          (studentId)->(name,age,college,colleagePhone,colleageLocation)
   but
          (studentId)->(colleage)->(colleagePhone,colleageLocation)

2009年2月24日星期二

February 25th Links: SQL SERVER,Design Pattern,Web

SQL SERVER
    T-SQL statement:
    SELECT name,physical_name AS current_file_location
    FROM sys.master_files
    T-SQL statement:
    SELECT *
    FROM sys.configurations
    Master database contains all the system level information of server.Information about all the login account, system configurations and information required to access all the other database are stored in Master Database.if the Master Database is damaged,it will be difficult to use any other database in SQL Server that makes it most important database in SQL Server.
    2) Exec sqlcmd command line:
        RESTORE DATABASE master FROM DISK='C\BackupLocation\master.bak' WITH                     REPLACE

Design Pattern
    Although enums aren't necessary a code smell for refactoring,they can definitely be a waring sign.Especially if u find yourself having to make changes in more than one place,in this case both the enum and the corresponding switch statement,each time that u wnat to add new functionality.If this sounds familiar to u,then it may be time to take a look at the strategy pattern for your own needs.

WEB

English
    1. Microsoft Certification Exam: 微软认证考试
    2. Polymorphism: 多态性
    3. Corresponding: 一致的,符合的

February 24th Links:ASP.NET,SEO,C#

ASP.NET

C#

NUint
 
LINQ-XML

SQL SERVER

WEB
    the short answer is ALWAYS! But let's rewind(绕回) a bit and provide some context...............In Summary,the compatibility(兼容) UA-X meta tag is the perfect way to ensure that your customers will enjoy your pages the way they were intended
e.g. meta equiv="x-UA-Compatible" content="IE-EmulateIE7"

CodePlex
    1. Fluent DateTime
    A set of(Ruby inspired灵感) C# Extension Methods for easier and more natural DateTime handing and operations in .NET.

English
    1. Global Summit:全球峰会
    2. Seattle and Redmond
    3. Canonical : 标准的,权威的
    4. Inspired:灵感的
    5. Campaign:战役,活动,运动

2009年2月22日星期日

February 23th Links:SQL SERVER

.NET Framew粗体ork
  1) .NET Framework:
.net framework = CLR + manage libraries + tools;
2) CLR(common language runtime)
  CLR takes care of code management upon program execution and provides various services such as memory management,thread management,security management and other system services.
    3) CTS(common Type system)
CTS describes how types are declared,used and managed.
4) CLS(common language specification)公共语言规范
The CLS is specification that defines the rules to support 
Language integration.That is done in such a way that
program written by any language(.net compliant兼容)
can interoperate with one another

SQL SERVER
1) inner join : produces the set of records that match in both Table A and Table B
2) Full outer join: produces the set of reacords that match all both Table A and Table B,if
    there's no match,the missing side will contain null.
3) Left outer join: produces a complete set of records from Table,with the matching records(where available) in Table B.If there's no match,the right side will contain null.
4) Left outer join + where B.Id is null:
     To produce the set of records only in Table A,but not in Table B.
5) Full outer join + where B.Id is null and A.Id is null.
    To produce the set of records unique to Table A and Table B.
6) Cross join:  a x b:
    To produce the set of records that per record from Table B has all of Table A                        records. 

1)  Clustered Index:
only 1 allowed per table.
physically rearranges the data in the table to conform to the index constraints
For use on columns that are frequently searched for ranges of data
For use on columns with low selectivity
2) Non-Clustered Index
up to 249 allowed per table
create a sprated list of key values with pointers to the location of the datta in the data pages
For use on columns with high selectivity
3) Included Column Index(New in Sql Server2005)
 Why does SQL2005 create new index?
There are limitations to creating indexes that make covering queries defficult:
a. A 900-byte size limit on indexes
b. A maximun of 16 columns can be named in the index
c. Columns wite data types like narchar(max),text,and ntext can't by used in    indexes
So a new type of index was developed in SQL2005 that assists in covering queries:indexes with included columns.

Related Post:

    The sql statement:
 
  USE AdventureWorks - Replace AdventureWorks with your DBName
GO
SELECT DISTINCT[TABLE] = OBJECT_NAME(OBJECT_ID)
FROM SYS.INEXES
WHERE INDEX_ID = 0
AND OBJECTPROPERTY(OBJECT_ID,'IsUserTable') = 1
 
    SQL SERVER provides three different recovery models that allow u to specify the way SQL Sever manages log files and perpare your enterprise for a disaster。Each of these models represents a different approach to balancing the tradeofff between conserving disk space and providing for granular disaster recovery options.
    1) simple recovery model
    2) full recovery model
    3) bulk-logged recovery model


 Englis Words
1. venn diagrams:(维恩图,用图表示集与集之间的关系)
2. populate:填充,构建
 3. IRC : internet Relay chat
 4. specification:规范
5. compliant:兼容,顺从的
 6. disaster:灾难
 7. bulk:大批,体积

2009年2月20日星期五

February 20th Links:SQL SERVER,OAUTH

ASP.NET
1. Creating RSS using ASP.NET --Kevin Miller
     note: using system.ServiceMode.Syndication namespace (introduced in .NET3.5)

SQL Server
   tip1: you can organize all your connects in amazing ways. To get the window just go to View-> Regisered Servers.
           tip2:if u don't remeber the query syntax.E.g. adding a new column,inser script etc.SQL Server has a feature called Template Explorer(Hit CTRL+ALT+T).

VSTS2008,Test
     note : there are four parameters that are categorized as Request,Pages,Tests,Error
1) Request : 
Avg Req/Sec(high),Avg Req Passed/Sec(high)
2) Page:
Avg Page Time/Sec(low)
3) Test:
Total Test(high)
4) Scenaro - User Load(high)
5) Errors - Errors/sec(low)
6) Processor - %Processor Time(low)
7) Memory - Available Mbytes(high)
9) Physical Disk - Crrent Disk Queue Length(low)
10) Network interface - output Queue Lenght(low)

OAUTH

2009年2月17日星期二

February 18th Links: ASP.NET,JQuery

ASP.NET
1. Download the files by using Asp.net
JQuery
--Bill Beckelman
    note: this post include some good url regExp

REST,C#

WCF

2009年2月16日星期一

February 17th Links: Cache,Programmer

Cache
1) Exploring Caching in Asp.net --by Abhijit Jana

Other:
1)  8 ways to be a better programmer in 6 minutes
      1. 在你使用的IDE中,设置一个比较大的字体(10pt-14pt).
      2. 将代码中的hard-coded设置成一个比较显眼的颜色
      3. 掌握一些自己不清楚的关键字,例如:yield
      4. 提高测试覆盖率(code-coverage)1%
      5. 阅读一些开源的代码
      6. 在你的代码中运行一些分析工具
      7. 将代码中一样不像样的代码重构
      8. 不但阅读代码,而且开始写,不但开始写,写完后编绎,运行