9. April 2012 14:17
This is a two-part series on Sequences, an enhancement newly introduced in SQL Server 2012 (Denali). In this post I introduce you to SQL Server Sequences and how internally it works. In the second part of this series, I will cover the usage of sequences in depth.
Sequences are not new in the database world. Oracle, PostgreSQL and other databases have it from a long time but SQL Server added it quite late. It is now available with SQL Server 2012 (code named "Denali").
In this post I am going to show you:
- What is a Sequence (in SQL Server) and how it differs from IDENTITY property?
- What are the advantages and disadvantages of a Sequence?
- Basic syntax.
What is a Sequence (in SQL Server) and how it differs from IDENTITY property?
Conceptually, Sequences work in a similar manner as IDENTITY, i.e., they generate a sequence of numeric values automatically. But what makes a Sequence different from IDENTITY is that a Sequence is an independent object like other database objects as opposed to the IDENTITY which is tied to a particular column of a table. A single database can make use of multiple Sequences.
Sequences generate numeric values in an ascending or descending order at a defined interval and may cycle as requested. An interesting feature of a Sequence is that an application can obtain the next sequence number before inserting the row by calling the NEXT VALUE FOR function. Another added advantage is that while creating a Sequence, you don't even have to specify which database is going to use it.
7. April 2012 21:52
IgniteFree: Database Response Time Monitoring Tool. Shows performance bottlenecks inside your Oracle, SQL Server, DB2 or Sybase instance.
fwptt: Web load testing framework. It can record normal and AJAX requests.Allows user to record browsing actions using proxy server.
Idera Free Tools: SQL Server tools for performance monitoring, managing SQL agent jobs, copying or moving logins and permissions settings across SQL servers. Also include SharePoint tools and PowerShell scripts.
Raakt: Web accessibility analysis tool that makes it easy to integrate basic accessibility evaluation early in the development process.
4. April 2012 13:42
In some situations you may need to retrieve rows as independent columns using a single T-SQL Query.
For instance, I have a table (Schemes) in my SQL Server database:
CREATE TABLE [dbo].[Schemes](
[ID] [int] NOT NULL,
[City] [varchar](30) NOT NULL,
[Scheme] [varchar](10) NOT NULL,
[SchemeStatus] [varchar](10) NOT NULL,
CONSTRAINT [PK_Schemes] PRIMARY KEY CLUSTERED
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
This table holds City, Scheme and Scheme Status. Each City is running various schemes at various locations and keeps record of the Status of the scheme.
The Scheme Status of any Scheme can be from any of the following:
- To be started
Now, we add a couple of records in the table [Schemes]:
31. March 2012 10:58
Service Stack: Opensource .NET and Mono REST Web Services framework. A modern fresh alternative to WCF. Code-first, convention-based, codegen-free.
FRAPI: A High-level API framework that puts the “rest” back into RESTful. FRAPI automatically generates JSON, XML, PHP, and plain text versions of your data.
DOOPHP: Doo framework is one of the fastest, if not the fastest PHP framework available. It enables developers at all levels to rapidly develop robust web 2.0 applications.
24. March 2012 16:01
gantter: A FREE web-based project management tool. You can think of it as a web-based Microsoft Project. Store/Share in the Cloud, Google Docs integration and support for multiple languages.
PlanProjects: Signup as a Project Manager or a Freelancer. Create and manage projects. Assign freelancers to your tasks. Enables project managers to work with fairly seamlessly with freelancers.