显示标签为“SQL SERVER”的博文。显示所有博文
显示标签为“SQL SERVER”的博文。显示所有博文

2009年4月11日星期六

April 12th-13th Links:SOLID,ASP.NET MVC,SQL SERVER

.NET

ASP.NET

Design Pattern

JQuery

SQL SERVER
    The RANK() Function in SQL SERVER returns the position of a value within the partition of a result set, with gaps in the ranking where there are ties.
    The DENSE_RANK() function in SQL Server returns the position of a value within the partition of a result set,leaving no gaps in the ranking where there are ties.

Other

2009年4月10日星期五

April 10th-11th Links:Velocity,C#,SQL SERVER,ReSharper

.NET
    How to optimize passing complex data to the server

ASP.NET
    1) Favicon
    2) Titles And Meta Data
    Your page title is more important element for SEO and is also important so that users know what's on the page.Make sure it changes on every page and relate to that page's content.
    3) Cross-Bowser Checks
    4) Proofread
    5) Links
    6) Graceful Degradation
    7) Validation
    8) RSS Link
    The common conversion is to put a small RSS icon in the browser's address bar.
    9) Analytics
    10) Sitemap
    Adding a sitemap.xml file to your root directory allows the major search engines to easily index your website
    11) Defensive Design
    The most commonly overlooked defensive design element is the 404 page.
    12) Optimize

C#

Javascript

Velocity
    1) High Availability
    2) Notifications
    3) Local Caching
    4) Management & Monitoriting
    5) Better Integration

WEB

IE
    1) IE8 Opens More Connections Per Host Name
    2) IE8 Has a New Process Model
    3) All IE8 Tabls,Window and Pop-ups Belong To Same Browser Session
    4) The IE8 Process Model is Configurable
    5) Compatibility Workarounds for IE8
    6) New Built-in Developer Tools For IE9
    7) How to Use HttpWatch with IE8

ReSharper

SQL SERVER
    1. Logical Query Processing Phases- Order of Statement Excution
    1) FROM -> ON -> OUTER -> WHERE -> GROUP BY-> CUBE|ROLLUP->HAVING->SELECT->DISTINCT->ORDER BY->TOP

Other
    neXpert is an add-on to Fiddler which automates the classic performance best practice checks and produces a HTML report on the issues found in a Fiddler capture.
    3.4 Great Tools to use visual Studio

2009年4月2日星期四

April 1th Links:JQuery,TFS,VSS,Silverlight,SQL SERVER

JQuery
    Lazy loading is a well-known design pattern that is intended to prevent redundant processing within your application.

SQL SERVER

Silverlight

Other
    This chapter explains the fundamental difference between Visual Source Safe(VSS) and VSTS Team Foundation.

2009年3月26日星期四

March 27th Links:ASP.NET,JAVASCRIPT,C# Using,Delegate,SQL SERVER

ASP.NET
    where compilation seems to mysteriously( 不可思议的) pause for 30+ seconds(or even minutes),before continuing each time you do a build or F5 of the project.VS2005 Web Sites will copy the assembly picked into the \bin directory of the project as well as(by default) add a .refresh file into the \bin directory that contains a relative path string that points back to the original assembly path location.When you build the solution,VS will automactically check those assembiles with .refresh files to see if a newer version of the assembly is available,and if so automatically re-copy the assembly and re-compile the solution using it.
    1) So Which Project Option Builds Faster?
    When doing full builds of projects,the VS2005 web application project options will complie projects much faster that the vs2005 web site

C#

JAVASCRIPT

SQL SERVER

.NET Framework

Other

English
    1. fledged: 成熟的
    2. unobtrusive: 不打扰的
    3. scratch the surface: 冰山一角

2009年3月21日星期六

March 22th-23th Links: .NET Framework,Silverlight,SQL Server

1. .NET
    3) What is .NET RIA Services?

2. Silverlight
    Here's the source to the WriteableBitmap sample I showed at Mix.The sample uses WriteableBitmap to take a "snapshot" of the running video to make a thumbnail

3. SQL Server
    1) Index Maintenance 
    if your indexes are less than 30% fragmented(碎片) than you can run a DBCC INDEXDEFRAG else rebuild.

English
    1. Resemble:相似,像
    2. Encounter:遇到,偶遇
    3. Revealed:透露,显示
    4. overlap: 重复,重叠
    5. rectangle: 长方形,矩形
    6. ellipse: 椭圆
    7. replicate: 折叠,复制

2009年3月18日星期三

March 19th-21th: C#,SQL SERVER,Silverlight 3

C#
    bad:
    1) No two consecutive(连续的) empty lines
    2) No empty line before a closing curly(卷发的,弯曲的,大括号)
    3) No empty line after an opeing curly
    good:
    1) one empty line between same level declarations.
    2) one emtp line between members of a type
    3) one empty line after #region and before #endregion
    Ruby's send functionality is that being able to dynamically invoke a method on an object like this:  
thisobject.Send("Foo",1,2,3);
Web
    Yesterday we released a new people selector widget on Flickr.This widget downloads a list of all of your contacts,in javasript,in under 200ms(this is even for member with 10,000+ contacts).In order to get this level of performance,we had to completely rethink how we send data from the server to the client.
    1) Server Side:Cache Everything
    2) Testing the Performance of Differenct Data Formats
      a) JSON,Eval() is Slow
      b) JSON and Dynamic Script Tags: Fast but Insecture

Silverlight

SQL SERVER
    One way to script the Stored Procedures of your SQL SERVER2008 databse is to use the SQL SERVER Management Stuio(SSMS).
    1) Open SSMS > Your Database > Programmablility > Stored Procedures > Right Click Stored Procedure Name > 'Script Stored Procedure As' > 'Creat To'
    2) Or Complete the same task using below T-SQL:

USE NORTHWIND
SELECT obj.Name as SPName,
modu.definition as SPDefinition,
obj.create_date as SPCreatinDate
FROM sys.sql_modules modu
INNER JOIN sys.objects obj
ON modu.object_id = obj.object_id
WHERE obj.type = 'P'
    2. Find All Servers From Local Network- Using sqlcmd- Pinal Dave
    1) Go to command prompt and type in "osql -L" or "sqlcmd -L"
    
CREATE TABLE #servers(sname VARCHAR(255))
INSERT #servers(sname)
EXEC master..xp_CMDShell 'ISQL -L'
DELETE
FROM #server
WHERE sname = 'Servers:'
OR sname IS NULL
SELECT LTRIM(sname)
FROM #servers
DROP TABLE #servers
Other

2009年3月14日星期六

March 14th-16th Links:ASP.NET Task,SOLID,Regular Experssion,ReSharper,SQL SERVER...

ASP.NET
    In this article,I'll take about scheduled Task Manager in a ASP.NET Environment.We often need to make scheduled tasks running in background but it's not very simple to make it with asp.net.I based my article on StackoverFlow article which uses ASP.NET Cache to schedule tasks.

C#

Continous Intergration,NAnt,NUnit,NCover

ReSharper

SQL SERVER
     P.S. : Use ROW_NUMBER() clause and PARTITION BY clause

Other
    Regardless of which software development methodology and hierarchy(等级制度)you use,there's 1 core practice I think every team should use: estimation(估计) and tracking.
    What do you need to do?
    The first thing you need to break-down(分离) tasks and assign them to people.The next thing you need to do is put an estimate,in hours or days,on each task.This can either be done together by the team(preferred)or you can let each developer estimate his or her own tasks.
    All of these things can be done using a modern bug-tracker.We currently use Redmine.
    1) MSBuild/NANT/Build Automation
    2) WCF,WPF and WF
    3) Silverlight and Expression
    4) JQuery
    5) W3C Design Compliance & "Table-less Design"
    6) AZure
    1) Never check in changes that can't be built.
    2) Check in related changes atomically.
    Atomically(原子性)means all related changes are checked in at the same time.
    3) Make use of shelving.
    4) Get All Current code and build before checking in.

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 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