|
Tuesday, 6 October 2009
Scalable Vector Graphics
Monday, 6 July 2009
Wimbledon 2009: Federer won but Roddick didn't lose
Last night, Federer created history by overtaking Sampras as the all time winner of 15 Grand Slam titles. In doing so, he set another record by appearing in his seventh consecutive Wimbledon final but spare a thought for the man who stood in his way and threatened to spoil the party, Andy Roddick.
Roddick came to this final a record of 18 loses and only 2 wins against Federer. This was hardly encouraging however, armed with a new strategy that attempted to stifle the free flowing Federer and a fitter body, Roddick unleased a barrage of serves that kept him toe to toe with the FedEx. Infact throughout the match, it was Roddick who on several occasions threatened to seize control and run away with the match, however Federer being the great Champion that he is used all his experience to finally overcome Roddick in the longest fifth set in the annals of the competition. Well Done Federer (for the win and for also regaining the number one ranking) but also Well played Roddick!!
Roddick came to this final a record of 18 loses and only 2 wins against Federer. This was hardly encouraging however, armed with a new strategy that attempted to stifle the free flowing Federer and a fitter body, Roddick unleased a barrage of serves that kept him toe to toe with the FedEx. Infact throughout the match, it was Roddick who on several occasions threatened to seize control and run away with the match, however Federer being the great Champion that he is used all his experience to finally overcome Roddick in the longest fifth set in the annals of the competition. Well Done Federer (for the win and for also regaining the number one ranking) but also Well played Roddick!!
Monday, 8 June 2009
French Open 2009: The FedEx is a Champion..AGAIN!!
Federrer finally got what he wanted.A complete Slam!True, he didn't have to overcome the challenge of having to face his greatest nemesis, Rafa over the net in the finals, yet there was no question about his form and ability. After a scratchy beginning to the tournament during which he dropped two sets against Tommy Haas and nearly went to the brink, Federrer regained control and played down the nerves to take the Championship in three sets against Robin Soderling. The final was a bit of an anti-climax with Federrer completely dominating the match but for a Federrer fan like me, it was a sweet win.Well Done Federrer!!
Saturday, 6 June 2009
Mapping Hibernate to Computed Columns
Most applications require a unique id to be assigned to the record. While a unique id can be implemented in several ways, SQL Server offers the option of using a Computed Column to generate and maintain these values.
Computed Columns enable the implementation of some complex logic via a User Defined Function (UDF) in generating the value of the corresponding row. For example: Consider an Employee table that has Employee_Location as a unique field. The Employee_Location changes every time, the employee's department is changed. This field can have values such as E001,Y001 and T009. While there are several ways of implementing this scenario, the Computed Column feature offered by SQL Server is an effective option. Values stored in a Computed Column can be persisted or kept virtual. Thus, it gives you a performance boost as you don't need to store data on the disk that is changing frequently but is required. On the other hand, if the data does need to be stored, the Computed Column can be persisted. This article explains the creation of indexes on Computed Columns.
If your Computed Column is being refrenced from within the application via an ORM such as Hibernate. The corresponding column mapping in the Hibernate POJO has to be annotated using the following set of annotations on the getter of the associated column attribute.
@Column(name = "Employee_Location", length = 25, insertable = false, updatable = false)
@Generated(GenerationTime.INSERT)
What the annotations do is tell Hibernate, that the Computed Column is not to be updated by the application AND that the value in the Computed Column is created when the record is inserted. That's it. Hibernate will not attempt to insert any value into the Employee_Location column but will retrieve the value stored in the column and associate it with any related mapping.
Computed Columns enable the implementation of some complex logic via a User Defined Function (UDF) in generating the value of the corresponding row. For example: Consider an Employee table that has Employee_Location as a unique field. The Employee_Location changes every time, the employee's department is changed. This field can have values such as E001,Y001 and T009. While there are several ways of implementing this scenario, the Computed Column feature offered by SQL Server is an effective option. Values stored in a Computed Column can be persisted or kept virtual. Thus, it gives you a performance boost as you don't need to store data on the disk that is changing frequently but is required. On the other hand, if the data does need to be stored, the Computed Column can be persisted. This article explains the creation of indexes on Computed Columns.
If your Computed Column is being refrenced from within the application via an ORM such as Hibernate. The corresponding column mapping in the Hibernate POJO has to be annotated using the following set of annotations on the getter of the associated column attribute.
@Column(name = "Employee_Location", length = 25, insertable = false, updatable = false)
@Generated(GenerationTime.INSERT)
What the annotations do is tell Hibernate, that the Computed Column is not to be updated by the application AND that the value in the Computed Column is created when the record is inserted. That's it. Hibernate will not attempt to insert any value into the Employee_Location column but will retrieve the value stored in the column and associate it with any related mapping.
Subscribe to:
Posts (Atom)