background preloader

Journalism in the Age of Data

Journalism in the Age of Data

Database Sharding CodeFutures offers an effective sharding solution with our product, dbShards. Our customers have used dbShards to achieve unprecedented performance, in the scope of hundreds of millions of reads and millions of writes every day. Database Sharding The Rise of Database Sharding The concept of Database Sharding has been gaining popularity over the past several years, due to the enormous growth in transaction volume and size of business application databases. Database Sharding can be simply defined as a “shared-nothing” partitioning scheme for large databases across a number of servers, enabling new levels of database performance and scalability achievable. The term “sharding” was coined by Google engineers, and popularized through their publication of the Big Table architecture. The focus of this paper is on the need for Database Sharding, the options available for database partitioning, and the key considerations for a successful sharding implementation. Figure 1. CPUMemoryDisk Figure 2.

Tutorial — PyMongo v2.0.1 documentation This tutorial is intended as an introduction to working with MongoDB and PyMongo. Prerequisites Before we start, make sure that you have the PyMongo distribution installed. In the Python shell, the following should run without raising an exception: This tutorial also assumes that a MongoDB instance is running on the default host and port. Assuming you have downloaded and installed MongoDB, you can start it like so: Making a Connection The first step when working with PyMongo is to create a Connection to the running mongod instance. >>> from pymongo import Connection>>> connection = Connection() The above code will connect on the default host and port. >>> connection = Connection('localhost', 27017) Getting a Database A single instance of MongoDB can support multiple independent databases. >>> db = connection.test_database If your database name is such that using attribute style access won’t work (like test-database), you can use dictionary style access instead: Getting a Collection Documents Note

SQL Code Layout and Beautification William Brewer takes a look at the whole topic of SQL Code layout and beautification, an important aspect to SQL programming style. He concludes that once you are tired of laying SQL out by hand, you had better choose a tool with plenty of knobs to twiddle, because nobody seems to agree on the best way of doing it. Badly-formatted SQL is the bane of my life. That is because my life is spent staring at SQL Code. The reason that every database developer has such strongly held views is that he gets used to a particular format. The worst experience a database developer can suffer is to be obliged to support a SQL application that has been written by someone else. I was brought up with CB, the C beautifier, and BCPP the C++ beautifier. There are a couple of unique problems with beautifying SQL. A lot of shops, especially in the larger enterprises, have existing standards for SQL code, and any beautifier has to be configurable to comply with these standards. SSMS/Query analyzer add-ins Commas

Related: