Archive for the ‘Data’ Category

British Government launches free data site

Just a quick post about the British Governments launch of offering free access to a large number of datasets. It’s good to see this data, that we as taxpayers have funded, available for free use. Hats off to The Guardian’s long running free our data campaign. The site is being officially launched by Sir […]

Primary Keys do not always have to be ‘Id’!

Warning: count(): Parameter must be an array or an object that implements Countable in /home/fbsqlcom/public_html/ on line 31

We’ve all more than likely spotted tables in databases with no primary keys. But does a primary key always have to be defined something like… ?View Code TSQLALTER TABLE MyTable ADD Id INTEGER NOT NULL IDENTITY(1,1) PRIMARY KEY CLUSTERED; I think we have ORM to blame for this widespread practice of using auto-incrementing integers as […]

London Postcode District Data

The requirement to work with postcodes, and specifically London postcode districts, has followed me around during my professional life. Below is a TSQL script to create a table for the postal districts in London. Enjoy! ?View Code TSQLCREATE TABLE london_postcodes (postcode VARCHAR(4) NOT NULL PRIMARY KEY CLUSTERED) GO   SET NOCOUNT ON; SET XACT_ABORT ON; […]