The Origins of World War I
Richard F. Hamilton, Holger H. Herwig
Cambridge University Press
You need to know a lot about 19th century European history to understand how the First World War could happen, and this book takes that approach, providing relevant background information on each of the major countries involved.  It doesn't discuss the precipitating events, beginning with Ferdinand's assasination, apart from references in the discussions of the major powers' decisionmaking in the few weeks preceding the war.  But even if you are not familiar with these (for a recent detailed discussion, see David Fromkin, Europe's Last Summer: Why the World Went to War in 1914 (2004)), you are better off starting here.  I have no independent knowledge of the qualifications of the 11 authors, but they handle the material confidently and provide extensive notes.  (Many of the footnoted references are in non-English languages, but the end of the book contains references in English orgainized by country.)

Other recent good books on the origins or the war itself are Annika Mombauer, Helmuth von Moltke and the Origins of the First World War (2001); David Stevenson, Cataclysm: The First World War as Political Strategy (2005); and Robert Doughty, Pyrrhic Victory: French Strategy and Operations in the Great War (2005).  A related work, well described by its title, is Roland N. Stromberg, Redemption by War: The Intellectuals and 1914 (1982).