<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Jeremiah Peschka</title>
	
	<link>http://facility9.com</link>
	<description>Jeremiah Peschka's ruminations on sql, ruby, c#, and other things</description>
	<lastBuildDate>Thu, 29 Jul 2010 13:00:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/facility9" /><feedburner:info uri="facility9" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license><item>
		<title>MongoDB – Basic Querying</title>
		<link>http://feedproxy.google.com/~r/facility9/~3/PKtsKOXhH0E/mongodb-basic-querying</link>
		<comments>http://facility9.com/2010/07/29/mongodb-basic-querying#comments</comments>
		<pubDate>Thu, 29 Jul 2010 13:00:01 +0000</pubDate>
		<dc:creator>Jeremiah Peschka</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[nosql_syndication]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://facility9.com/?p=1715</guid>
		<description><![CDATA[I put together a little video tutorial showing you how to accomplish some basic querying with MongoDB.


Download the sample code. A QuickTime/H.264/iPhone formatted video is also available &#8211; download it now.
]]></description>
			<content:encoded><![CDATA[<p>I put together a little video tutorial showing you how to accomplish some basic querying with MongoDB.</p>
<div style='margin-left: 180px'>

</div>
<p>Download the <a href='http://facility9presentations.s3.amazonaws.com/MongoDB%20-%20Basic%20Queries.js' target='_blank'>sample code</a>. A QuickTime/H.264/iPhone formatted video is also available &#8211; <a href='http://facility9presentations.s3.amazonaws.com/MongoDB%20-%20Basic%20Queries.mov' target='_blank'>download it now</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/facility9?a=PKtsKOXhH0E:EGZdWsanLqg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/facility9?i=PKtsKOXhH0E:EGZdWsanLqg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=PKtsKOXhH0E:EGZdWsanLqg:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/facility9?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=PKtsKOXhH0E:EGZdWsanLqg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/facility9?i=PKtsKOXhH0E:EGZdWsanLqg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=PKtsKOXhH0E:EGZdWsanLqg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/facility9?i=PKtsKOXhH0E:EGZdWsanLqg:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/facility9/~4/PKtsKOXhH0E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://facility9.com/2010/07/29/mongodb-basic-querying/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://facility9.com/2010/07/29/mongodb-basic-querying</feedburner:origLink></item>
		<item>
		<title>PostgreSQL Tutorial – Creating the Pagila Schema</title>
		<link>http://feedproxy.google.com/~r/facility9/~3/v-YMw5stYb4/postgresql-tutorial-creating-the-pagila-schema</link>
		<comments>http://facility9.com/2010/07/28/postgresql-tutorial-creating-the-pagila-schema#comments</comments>
		<pubDate>Wed, 28 Jul 2010 13:00:26 +0000</pubDate>
		<dc:creator>Jeremiah Peschka</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[pg_syndication]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://facility9.com/?p=1692</guid>
		<description><![CDATA[In the previous article, we talked about creating your first PostgreSQL database and I went over the syntax of createdb and psql in a bit of detail.
Next up, we&#8217;re going to look at creating the structure of the pagila database.
createdb -U jeremiah pagila
psql -U jeremiah -f pagila-schema.sql pagila
psql -U jeremiah -f pagila-insert-data.sql pagila

Working With SQL
Even [...]]]></description>
			<content:encoded><![CDATA[<p>In the <a href='http://facility9.com/2010/07/21/postgresql-tutorial-creating-your-first-database' target='_blank'>previous article</a>, we talked about creating your first PostgreSQL database and I went over the syntax of <strong>createdb</strong> and <strong>psql</strong> in a bit of detail.</p>
<p>Next up, we&#8217;re going to look at creating the structure of the pagila database.</p>
<pre class="brush:tsql">createdb -U jeremiah pagila
psql -U jeremiah -f pagila-schema.sql pagila
psql -U jeremiah -f pagila-insert-data.sql pagila
</pre>
<h3 id="working_with_sql">Working With SQL</h3>
<p>Even though SQL is the name of the language that we use to work with data, there are two subsets of SQL that you will hear people refer to: DML and DDL.</p>
<h4 id="ddl">DDL</h4>
<p>DDL is the common abbreviation for Data Definition Language. This is the name for the part of SQL that is used for creating and modifying database structures &#8211; tables, indexes, views, etc. The <code>pagila-schema.sql</code> file is chock full of DDL and is a great introduction to how to create objects in PostgreSQL.</p>
<h4 id="dml">DML</h4>
<p>DML stands for Data Manipulation Language. This is the other subset of SQL. This is how we read, update, insert, and delete data. We&#8217;ll be talking about DML in the next article.</p>
<h3 id="tables">Tables</h3>
<p>Tables are the heart and soul of a relational database &#8211; they&#8217;re where data is stored. Let&#8217;s take a look at creating the actors table:</p>
<pre class="brush:tsql">CREATE TABLE public.actor  (
    actor_id    int4 NOT NULL DEFAULT nextval('actor_actor_id_seq'::regclass),
    first_name  varchar(45) NOT NULL,
    last_name   varchar(45) NOT NULL,
    last_update timestamp NOT NULL DEFAULT now(),
    PRIMARY KEY(actor_id)
)
GO
CREATE INDEX idx_actor_last_name
    ON public.actor(last_name)
GO
CREATE TRIGGER last_updated
     BEFORE UPDATE ON actor FOR EACH ROW
     EXECUTE PROCEDURE last_updated()
GO

CREATE FUNCTION last_updated() RETURNS trigger
    AS $$
BEGIN
    NEW.last_update = CURRENT_TIMESTAMP;
    RETURN NEW;
END $$
    LANGUAGE plpgsql;
</pre>
<p>What&#8217;s going on here? Well, we&#8217;re creating a table named actor, for starters (I&#8217;ll come back to the sequence in a minute). The actor table contains four columns: <code>actor_id</code>, <code>first_name</code>, <code>last_name</code>, and <code>last_update</code>. The <code>first_name</code> and <code>last_name</code> columns are the simplest, so I&#8217;m going to start with them.</p>
<p>Both the <code>first_name</code> and <code>last_name</code> columns store character data &#8211; strings of text. These columns store variable length character data that can hold up to 45 characters. Both of these columns have been created as <code>NOT NULL</code>. This means that the columns require a value, even if that value is an empty string. Ideally you will have additional logic in place to prevent empty strings from being stored in the database as meaningful values.</p>
<p>The <code>last_update</code> column holds a date and time. The first time a row is inserted into the actor table, the <code>last_update</code> column will default to the current date and time. There is a trigger on this table, too, that will update <code>last_update</code> with the time of the update. While <code>last_update</code> does not contain any time zone specific information, it is possible for PostgreSQL to store time zone information by using the <code>timestamp with time zone</code> data type.</p>
<p>Finally we come to the <code>actor_id</code> column. This column is used as the primary key &#8211; it uniquely identifies any row in the actor table and requires the the values in the row not be null. I&#8217;ve omitted the code to create the <code>actor_actor_id_seq</code> sequence, but I&#8217;ll summarize. A sequence is similar an <code>IDENTITY</code> column in SQL Server or an <code>AUTOINCREMENT</code> column in MySQL, it just requires manual intervention. Whenever we want to increment the value of a sequence, we need to use the <code>nextval()</code> function to get the next value from the sequence. In the <code>actor</code> table, our primary key is a 4-byte number that will automatically be incremented by 1 every time a new row is added.</p>
<p>Once we have the four main columns created, we create an index <code>idx_actor_last_name</code>. Indexes make it possible for PostgreSQL to rapidly find data in a large table. It&#8217;s possible to create an index on more than one column. In this case, though, we&#8217;ll be creating our index on just the one column. This makes it easier to find actors by their last name.</p>
<p>The last thing we do is create a trigger that runs after an update. Triggers let us run pieces of code after an event (such as an insert, update, or delete) happens on a table. The <code>last_updated</code> trigger runs a function named <code>last_updated</code> before any row is updated in the database. The <code>last_updated</code> function modifies the <code>NEW</code> database row (a virtual row used in inserts and updates on row-level triggers). This new row will be inserted into the table with a new value in the <code>last_update</code> column.</p>
<p>You&#8217;re probably wondering what&#8217;s with the <code>::regclass</code> and the <code>$$</code> when we created the function. Be patient, everything will be explained in time. Right now it&#8217;s more important to focus on the higher level concepts and slowly move into the details as time goes on.</p>
<h3 id="summary">Summary</h3>
<p>Creating a basic table is a simple operation, once you know what you want to store in it. You name the table and then supply a list of columns with a data type for each one. This helps PostgreSQL figure out the optimum way to store data on disk.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/facility9?a=v-YMw5stYb4:xdhPkRrQViQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/facility9?i=v-YMw5stYb4:xdhPkRrQViQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=v-YMw5stYb4:xdhPkRrQViQ:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/facility9?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=v-YMw5stYb4:xdhPkRrQViQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/facility9?i=v-YMw5stYb4:xdhPkRrQViQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=v-YMw5stYb4:xdhPkRrQViQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/facility9?i=v-YMw5stYb4:xdhPkRrQViQ:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/facility9/~4/v-YMw5stYb4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://facility9.com/2010/07/28/postgresql-tutorial-creating-the-pagila-schema/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://facility9.com/2010/07/28/postgresql-tutorial-creating-the-pagila-schema</feedburner:origLink></item>
		<item>
		<title>Finding Cross-Database Dependencies</title>
		<link>http://feedproxy.google.com/~r/facility9/~3/2Ntnw6Mtn70/finding-cross-database-dependencies</link>
		<comments>http://facility9.com/2010/07/27/finding-cross-database-dependencies#comments</comments>
		<pubDate>Tue, 27 Jul 2010 13:00:20 +0000</pubDate>
		<dc:creator>Jeremiah Peschka</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[syndication]]></category>

		<guid isPermaLink="false">http://facility9.com/?p=1707</guid>
		<description><![CDATA[Ever want to know how many queries are referring to other databases on a server? How about a different server?
Worry no more! I have a query that will help you answer these pesky questions:

SELECT  DB_NAME() AS current_db_name,
        OBJECT_NAME(referencing_id) AS o_name ,
       [...]]]></description>
			<content:encoded><![CDATA[<p>Ever want to know how many queries are referring to other databases on a server? How about a different server?</p>
<p>Worry no more! I have a query that will help you answer these pesky questions:</p>
<pre class="brush:tsql">
SELECT  DB_NAME() AS current_db_name,
        OBJECT_NAME(referencing_id) AS o_name ,
        UPPER(COALESCE(sed.referenced_server_name, '')) AS referenced_server_name,
        sed.referenced_database_name,
        sed.referenced_schema_name,
        sed.referenced_entity_name
FROM    sys.sql_expression_dependencies AS sed
WHERE   referenced_database_name &lt;&gt; DB_NAME()
        AND referenced_database_name &lt;&gt; 'msdb'
ORDER BY UPPER(referenced_server_name) ;
</pre>
<p>Want to run it across every database on your server? We got that, too.</p>
<pre class="brush:tsql">DECLARE @command AS NVARCHAR(MAX);

SET @command = 'USE ?;

SELECT  DB_NAME() AS current_db_name,
        OBJECT_NAME(referencing_id) AS o_name ,
        UPPER(COALESCE(sed.referenced_server_name, '''')) AS referenced_server_name,
        sed.referenced_database_name,
        sed.referenced_schema_name,
        sed.referenced_entity_name
FROM    sys.sql_expression_dependencies AS sed
WHERE   referenced_database_name &lt;&gt; DB_NAME()
        AND referenced_database_name &lt;&gt; ''msdb''
ORDER BY UPPER(referenced_server_name) ;'

EXEC sys.sp_MSforeachdb @command1 = @command</pre>
<p><strong>Update:</strong> This only applies to SQL Server 2008. Nothing else. Thanks to an <a href='http://twitter.com/jjakubowski'>astute reader</a> I have been corrected. Now we&#8217;re all smarter. Thanks, John. <img src='http://facility9.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/facility9?a=2Ntnw6Mtn70:Ph_1zoSQYZ8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/facility9?i=2Ntnw6Mtn70:Ph_1zoSQYZ8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=2Ntnw6Mtn70:Ph_1zoSQYZ8:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/facility9?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=2Ntnw6Mtn70:Ph_1zoSQYZ8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/facility9?i=2Ntnw6Mtn70:Ph_1zoSQYZ8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=2Ntnw6Mtn70:Ph_1zoSQYZ8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/facility9?i=2Ntnw6Mtn70:Ph_1zoSQYZ8:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/facility9/~4/2Ntnw6Mtn70" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://facility9.com/2010/07/27/finding-cross-database-dependencies/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://facility9.com/2010/07/27/finding-cross-database-dependencies</feedburner:origLink></item>
		<item>
		<title>PostgreSQL Tutorial – Creating Your First Database</title>
		<link>http://feedproxy.google.com/~r/facility9/~3/GZLVtj42quY/postgresql-tutorial-creating-your-first-database</link>
		<comments>http://facility9.com/2010/07/21/postgresql-tutorial-creating-your-first-database#comments</comments>
		<pubDate>Wed, 21 Jul 2010 13:00:04 +0000</pubDate>
		<dc:creator>Jeremiah Peschka</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[pg_syndication]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://facility9.com/?p=1686</guid>
		<description><![CDATA[Once you&#8217;ve installed PostgreSQL (OS X Instructions) (other platforms), you&#8217;ll probably want to get started with a new database. Unfortunately PostgreSQL does not include a sample database by default.
You can download the pagila sample database from the pgFoundry (direct download link). Pagila is a simple movie rental database, sort of like what you would get [...]]]></description>
			<content:encoded><![CDATA[<p>Once you&#8217;ve installed PostgreSQL (<a href="http://facility9.com/2010/02/15/installing-postgresql-on-mac-os-x">OS X Instructions</a>) (<a href="http://wiki.postgresql.org/wiki/Detailed_installation_guides">other platforms</a>), you&#8217;ll probably want to get started with a new database. Unfortunately PostgreSQL does not include a sample database by default.</p>
<p>You can download the pagila sample database from the <a href="http://pgfoundry.org/projects/dbsamples/">pgFoundry</a> (<a href="http://pgfoundry.org/frs/download.php/1719/pagila-0.10.1.zip">direct download link</a>). Pagila is a simple movie rental database, sort of like what you would get if you ran a video rental store. It is also a port of a sample MySQL database with changes made to take advantage of PostgreSQL&#8217;s features &#8211; you can read about the differences in the README file. Installing pagila is easy: </p>
<pre class="brush:tsql">createdb -U jeremiah pagila
psql -U jeremiah -f pagila-schema.sql pagila
# There will be a great deal of text here about creating tables and other database
#  objects. You can read through the create file if you'd like, but we're going to be
#  taking a look around so you can hold off for a minute
psql -U jeremiah -f pagila-insert-data.sql pagila
# You should see a lot of output from psql again talking about inserting rows
#  and altering seqvals. Once again, we'll be looking at this data over
</pre>
<p>Before you blindly copy and paste the above and run it, let&#8217;s go over everything that we&#8217;re looking at.</p>
<h3 id="createdb">createdb</h3>
<p><strong>createdb</strong> is a command line tool that is installed with your PostgreSQL installation. This is one way to create a new database using PostgreSQL. If you supply the -e command line option (<code>createdb -U jeremiah -e pagila</code>), you can see the commands that are actually being run against PostgreSQL. In this case it&#8217;s as simple as <code>CREATE DATABASE pagila;</code>. We need to tell PostgreSQL which user we&#8217;re using to connect because only certain users have the appropriate rights to create new databases. This isn&#8217;t something that just anyone can do, after all.</p>
<h3 id="psql">psql</h3>
<p><strong>psql</strong> is a command line tool that is used to connect to your PostgreSQL databases. <strong>psql</strong> has a number of options, but I&#8217;m only going to cover the options that we&#8217;re directly using to set things up for the pagila database.</p>
<h4 id="_u">-U</h4>
<p>The <code>-U</code> option is used to specify the user name to use to connect to the database instead of the default user. Unless you&#8217;ve changed something during installation, the default user is the <code>postgres</code> admin account.</p>
<h4 id="_f_filename">-f [filename]</h4>
<p><strong>psql</strong> can operate in two modes: an interactive mode and a file input mode. Passing the <code>-f</code> option to <strong>psql</strong> will use the commands in the file <em>filename</em>. You could use the input redirection operator (&lt;), but using <code>-f</code> has the advantage of processing the file as a single batch and subsequently providing helpful line numbers in the event of an error.</p>
<h4 id="the_database">The database</h4>
<p>The last parameter we&#8217;re passing is the name of the database. If you want to connect to a database on a different host, you would use the <code>-h</code> or <code>--hostname</code> command line flag to change the database host.</p>
<h3 id="related_reading">Related Reading</h3>
<p><a href="http://www.postgresql.org/docs/8.4/static/app-createdb.html">createdb syntax</a><br />
<a href="http://www.postgresql.org/docs/8.4/static/sql-createdatabase.html">CREATE DATABASE</a><br />
<a href="http://www.postgresql.org/docs/8.4/static/app-psql.html">psql</a></p>
<h3 id="some_minutiae_about_postgresql_databases">Some Minutiae About PostgreSQL Databases</h3>
<p>PostgreSQL, like many other databases, has a vast set of features. Two of these features, collations and tablespaces, aren&#8217;t immediately important for understanding what we&#8217;re doing here, but it&#8217;s a good thing to know about them for when you get into more advanced scenarios.</p>
<h4 id="collations_and_locales">Collations and Locales</h4>
<p>When you create a new database you can also specify a collation for the database. Collations are used to determine how text is stored and sorted within PostgreSQL. You can set the collation when PostgreSQL is first configured, during database creation, or when connecting to the database. There are a few gotchas that aren&#8217;t important here, but you can read about them in the PostgreSQL documentation on <a href="http://www.postgresql.org/docs/8.4/interactive/locale.html">Local Support</a>.</p>
<h4 id="tablespaces">Tablespaces</h4>
<p>You can also specify the default tablespace when you create a new database. A tablespace is the place where database objects are stored on disk. If you&#8217;re familiar with SQL Server, you will know this as a filegroup. This is a more advanced feature and can be used to achieve incredible performance benefits by spreading physical database objects across multiple physical disks. Like collation, we&#8217;re not going to worry about tablespaces for now, but it is important to know that the feature is available.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/facility9?a=GZLVtj42quY:TF9nvTN-NOo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/facility9?i=GZLVtj42quY:TF9nvTN-NOo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=GZLVtj42quY:TF9nvTN-NOo:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/facility9?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=GZLVtj42quY:TF9nvTN-NOo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/facility9?i=GZLVtj42quY:TF9nvTN-NOo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=GZLVtj42quY:TF9nvTN-NOo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/facility9?i=GZLVtj42quY:TF9nvTN-NOo:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/facility9/~4/GZLVtj42quY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://facility9.com/2010/07/21/postgresql-tutorial-creating-your-first-database/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://facility9.com/2010/07/21/postgresql-tutorial-creating-your-first-database</feedburner:origLink></item>
		<item>
		<title>Interviewing (A Gently Stolen Idea)</title>
		<link>http://feedproxy.google.com/~r/facility9/~3/d7zQgt1nNH4/interviewing-a-gently-stolen-idea</link>
		<comments>http://facility9.com/2010/07/21/interviewing-a-gently-stolen-idea#comments</comments>
		<pubDate>Wed, 21 Jul 2010 12:32:44 +0000</pubDate>
		<dc:creator>Jeremiah Peschka</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[nonsense]]></category>

		<guid isPermaLink="false">http://facility9.com/?p=1703</guid>
		<description><![CDATA[I totally ripped this idea off. I think that&#8217;s okay, I&#8217;m giving credit.
The premise is responding to a set of interview questions written thusly:
I like _____________________ .
I love _____________________ .
I want _____________________ .
I was _____________________ .
I am _____________________ .
I will _____________________ .
I think _____________________ .
I know _____________________ .
Answers:

I like making up the plan as I [...]]]></description>
			<content:encoded><![CDATA[<p>I totally ripped this idea off. I think that&#8217;s okay, I&#8217;m <a href='http://blog.frankchimero.com/post/836722109/interviewing' target='_blank'>giving credit</a>.</p>
<p>The premise is responding to a set of interview questions written thusly:</p>
<blockquote><p>I like _____________________ .</p>
<p>I love _____________________ .</p>
<p>I want _____________________ .</p>
<p>I was _____________________ .</p>
<p>I am _____________________ .</p>
<p>I will _____________________ .</p>
<p>I think _____________________ .</p>
<p>I know _____________________ .</p></blockquote>
<p>Answers:</p>
<blockquote><p>
I like making up the plan as I go.</p>
<p>I love summer thunderstorms. Especially late at night.</p>
<p>I want to be remembered for the small things and celebrated for the big ones.</p>
<p>I was born on a pirate ship.</p>
<p>I am never going to be as grown up as they want me to be.</p>
<p>I will not compromise, but I will listen and change.</p>
<p>I think a lot of things are overrated.</p>
<p>I know many things. I don&#8217;t know which ones are important.</p></blockquote>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/facility9?a=d7zQgt1nNH4:VciBc7HJiDM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/facility9?i=d7zQgt1nNH4:VciBc7HJiDM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=d7zQgt1nNH4:VciBc7HJiDM:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/facility9?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=d7zQgt1nNH4:VciBc7HJiDM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/facility9?i=d7zQgt1nNH4:VciBc7HJiDM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=d7zQgt1nNH4:VciBc7HJiDM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/facility9?i=d7zQgt1nNH4:VciBc7HJiDM:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/facility9/~4/d7zQgt1nNH4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://facility9.com/2010/07/21/interviewing-a-gently-stolen-idea/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://facility9.com/2010/07/21/interviewing-a-gently-stolen-idea</feedburner:origLink></item>
		<item>
		<title>Revisiting Lady MacBeth and Her Torturous Lies</title>
		<link>http://feedproxy.google.com/~r/facility9/~3/ArJzkHTR3qo/revisiting-lady-macbeth-and-her-torturous-lies</link>
		<comments>http://facility9.com/2010/07/20/revisiting-lady-macbeth-and-her-torturous-lies#comments</comments>
		<pubDate>Tue, 20 Jul 2010 15:13:30 +0000</pubDate>
		<dc:creator>Jeremiah Peschka</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[syndication]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[sqljackass]]></category>

		<guid isPermaLink="false">http://facility9.com/?p=1701</guid>
		<description><![CDATA[A while back, I wrote up a genius piece of code that would automatically shrink my log files whenever they grew.
Kendra Little (blog &#124; twitter) completely called me out for my horrible, sneaky, developer ways. Ostensibly, I had found a solution for my rampant log growth problem. Unfortunately, I had cured the symptom and not [...]]]></description>
			<content:encoded><![CDATA[<p>A while back, I wrote up a <a href='http://facility9.com/2010/06/17/shrink-damnd-log-shrink-i-say' target='_blank'>genius piece of code</a> that would automatically shrink my log files whenever they grew.</p>
<p>Kendra Little (<a href='http://littlekendra.com/' target='_blank'>blog</a> | <a href='http://twitter.com/kendra_little' target='_blank'>twitter</a>) completely called me out for my horrible, sneaky, developer ways. Ostensibly, I had found a solution for my rampant log growth problem. Unfortunately, I had cured the symptom and not the underlying issue. After growing tired of her savage abuse and criticism via gtalk, I looked for the source of the problem. No, not me. The other source of the problem.</p>
<p>I set up monitoring on the server in question, waited for the appropriate log death window, and then read my report. Before you think I&#8217;m using fancy tools that nobody can afford, I set up profiler and perfmon and then merged the results together.</p>
<p>The reports from the single server showed me&#8230; nothing, really. There was a lot of I/O and a backup job overlapped with a re-index by about 2 minutes. The logs also didn&#8217;t fill up. To be on the safe side, I adjusted the jobs and then sat around making frowny faces for a few minutes. Then I remembered that all of the servers are connected to the same SAN, so set up monitoring on the remaining production servers. An I/O issue on one server could start causing problems on all of the other servers.</p>
<p>This time around, the logs filled up, I received a ton of emails, and I also found out something important: all of my backups and re-indexing operations were running at the same time. My SAN was saturated on I/O throughput which was causing a the backup and re-indexing jobs to run slowly. </p>
<p>To solve the problem I looked at the average job run times and arranged the jobs so that they had much more downtime between them (to account for other issues that could slow down the jobs). This took a bit more effort than I thought just because of SLAs within the company. I also re-wrote the jobs so that the backups and re-indexes could never run at the same time and would, instead, occur in series. Once I had this change in place I waited and watched.</p>
<p>Sure enough, the incredible ever growing log file problem stopped happening (unless I do something dumb like move 30,000,000 rows of data). Moral of the story: make sure that you&#8217;re addressing the cause of the problem and not the symptoms.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/facility9?a=ArJzkHTR3qo:F2GVqNa89eY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/facility9?i=ArJzkHTR3qo:F2GVqNa89eY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=ArJzkHTR3qo:F2GVqNa89eY:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/facility9?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=ArJzkHTR3qo:F2GVqNa89eY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/facility9?i=ArJzkHTR3qo:F2GVqNa89eY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=ArJzkHTR3qo:F2GVqNa89eY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/facility9?i=ArJzkHTR3qo:F2GVqNa89eY:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/facility9/~4/ArJzkHTR3qo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://facility9.com/2010/07/20/revisiting-lady-macbeth-and-her-torturous-lies/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://facility9.com/2010/07/20/revisiting-lady-macbeth-and-her-torturous-lies</feedburner:origLink></item>
		<item>
		<title>The Future of Databases</title>
		<link>http://feedproxy.google.com/~r/facility9/~3/HsfZ2vGj9YM/the-future-of-databases</link>
		<comments>http://facility9.com/2010/07/15/the-future-of-databases#comments</comments>
		<pubDate>Thu, 15 Jul 2010 13:00:57 +0000</pubDate>
		<dc:creator>Jeremiah Peschka</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[nosql_syndication]]></category>
		<category><![CDATA[syndication]]></category>
		<category><![CDATA[olap]]></category>
		<category><![CDATA[oltp]]></category>

		<guid isPermaLink="false">http://facility9.com/?p=1652</guid>
		<description><![CDATA[The Story So Far
I&#8217;ve been in love with data storage since I first opened up SQL*Plus and issued a select statement. The different ways to store data are fascinating. Even within a traditional OLTP database, there are a variety of design patterns that we can use to facilitate data access. We keep coming up with [...]]]></description>
			<content:encoded><![CDATA[<h3 id="the_story_so_far">The Story So Far</h3>
<p>I&#8217;ve been in love with data storage since I first opened up <a href="http://en.wikipedia.org/wiki/SQL*Plus">SQL*Plus</a> and issued a select statement. The different ways to store data are fascinating. Even within a traditional OLTP database, there are a variety of design patterns that we can use to facilitate data access. We keep coming up with different ways to solve the problems what we&#8217;re facing in business. The problem is that as the field of computer science advances, and businesses increase in complexity, the ways that we store data must become more complex as well. Exponentially scaling storage complexity isn&#8217;t something that I like to think about, but it&#8217;s a distinct possibility.</p>
<p>General purpose OLTP databases are not the future of data storage and retrieval. They are a single piece in the puzzle. We&#8217;ve been working with OLTP systems for well over 20 years. OLAP is a newer entry, bringing specialized analytical tricks (which are counter intuitive to the way relational data is stored) to the masses. Hell, there are a number of <a href="http://www.microsoft.com/sqlserver/2008/en/us/analysis-services.aspx">general</a> <a href="http://www.oracle.com/technology/products/bi/olap/index.html">purpose</a> <a href="http://www.greenplum.com/">analytical</a> storage engines on the market. These general purpose analytical databases integrate well with existing databases and provide a complement to the transactional specialization of OLTP systems.</p>
<p>That&#8217;s the key, OLTP databases are purpose built <em>transactional</em> databases. They&#8217;re optimized for write operations because way back in the <a href="http://portal.acm.org/citation.cfm?id=362685">dark ages</a> it was far more expensive to write data to disk than it was to read from disk. Data couldn&#8217;t be cached in memory because memory was scarce. Architectural decisions were made. The way that we <a href="http://en.wikipedia.org/wiki/Database_normalization">design our databases</a> is specifically designed to work within this structure. A well designed, normalized, database has minimal duplication of data. In OLTP systems this also serves to minimize the number of writes to disk when a common piece of data needs to be changed. I can remember when I was a kid and the United States Postal Service changed from using three letter state abbreviations to two letter abbreviations. I have to wonder what kind of difficulties this caused for many databases&#8230; </p>
<p>In the 40 years since <a href="http://portal.acm.org/citation.cfm?id=362685">E.F. Codd&#8217;s paper</a> was published, the programming languages that we use have changed considerably. In 1970, COBOL was still relatively new. 1971 saw the the introduction of C, 1975 brought us MS Basic. 1979, 1980, and 1983 saw Ada, Smalltalk-80, Objective-C, and C++ ushering in a wave of object oriented languages. Suddenly programmers weren&#8217;t working on singular data points, they were working with a object that contained a collection of properties. The first ANSI SQL standard was codified in 1986. 1990 gave us Windows 3 and the desktop PC became more than a blinking cursor. The web exploded in 1996, 2001, and continues to explode again in a frenzy of drop shadows, bevels, mirror effects, and Flash.</p>
<p>Throughout the history of computing, we&#8217;ve been primarily working with tuples of data &#8211; attributes mapped to values; rows to you and I. This model holds up well when we&#8217;re working with a entity composed of a single tuple. What happens, though, when the entity becomes more complex? The model to retrieve and modify the entity becomes more complex as well. We can&#8217;t issue a simple update statement anymore, we have to go through more complex operations to make sure that the data is kept up to date.</p>
<h3 id="examples_should_make_things_clearer">Examples Should Make Things Clearer</h3>
<p>Let&#8217;s take a look at something simple: my phone bill.</p>
<h4 id="in_the_beginning8230">In the beginning&#8230;</h4>
<p>Long ago, a phone bill was probably stored in a relatively simple format:</p>
<ul>
<li>Account Number</li>
<li>Name</li>
<li>Address</li>
<li>Past Due Amount</li>
<li>Current Amount Due</li>
<li>Due Date</li>
</ul>
<p>This was simple and it worked. Detailed records would be kept on printed pieces of paper in a big, smelly, damp basement where they could successfully grow mold and other assorted fungi. Whenever a customer had a dispute, a clerk would have to visit the records room and pull up the customer&#8217;s information. This was a manual process that probably involved a lot of letter writing, cursing, and typewriter ribbon.</p>
<p>Eventually, this simple bill format would prove to be unreliable (P.S. I&#8217;m totally making this up just to illustrate a point, but I&#8217;m guessing it went something like this). In our example, there&#8217;s no way to tell when a customer paid or which customer was billed. </p>
<h4 id="after_some_tinkering8230">After some tinkering&#8230;</h4>
<p>After a few more iterations, you probably end up with a way of storing a customer&#8217;s information and bills that looks something like this:</p>
<p>
<a href="http://facility9.com/files/2010/07/The-New-Bill.png"><img src="http://facility9.com/files/2010/07/The-New-Bill.png" alt="" title="A more complex bill hang-2-column" width="528" height="335" class="alignnone wp-image-1653" /></a></p>
<p>This is a lot more complicated from both a design perspective and an implementation perspective. One of the things that makes this implementation more difficult is that there are a number of intermediate tables to work with and these tables can become hotspots for reads as well as writes.</p>
<p>When you look at that design, be honest with yourself and answer this question:</p>
<blockquote>
<p>How often will you view a single service history or general charge row?</p>
</blockquote>
<p>Think about your answer. The fact is, you probably won&#8217;t read any of those rows on its own. You might update one if a change comes in from an external source, but otherwise all of the charges, history, etc on any given phone bill will always be read as a unit. In this particular instance, we&#8217;re always consuming a bill&#8217;s entire <a href="http://en.wikipedia.org/wiki/Graph_(data_structure">graph</a>) at once. Reading a bill into memory is an onerous prospect, not to mention that summarizing phone bills in this system is a read intensive operation.</p>
<h3 id="fixing_the_glitch">Fixing the glitch</h3>
<p>There are a lot of ways these problems could be worked around in a traditional OLTP database. However, that&#8217;s not the point. The point is that there are problems that require actual workarounds. OLTP databases work well for many use cases, but in this case an OLTP database becomes a problem because of the high cost of reading vs writing. (Why should we read-optimize a system that was designed to be write-optimized  when writes will probably account for only 10% of our activity, maybe less?)</p>
<p>I&#8217;ve hinted at how we fix the glitch at the beginning of this article &#8211; we look for a specialized database. In our case, we can use something called a <a href="http://en.wikipedia.org/wiki/Document-oriented_database">document database</a>. The advantage of a document database is that we&#8217;re storing an organized collection of values in the database. This collection of values is similar to a traditional tabular database &#8211; we have groups of similar data stored in named collections. The distinction comes in how the data is accessed. </p>
<p>When we&#8217;re saving a phone bill, we don&#8217;t have to worry about calling multiple stored procedures or a single complex procedure. There&#8217;s no need to create complex mappings between a database and our code. We create an object or object graph in the application code and save it. The software that we use to connect to our document database knows how to properly translate our fancy objects into data stored on a disk somewhere.</p>
<p>This solution has several upsides:</p>
<ul>
<li>Related data is stored in close proximity on disk</li>
<li>Documents do not require strict structure</li>
<li>Documents may change properties without requiring complex changes to physical schema</li>
</ul>
<h4 id="physical_proximity">Physical Proximity</h4>
<p>My data is close together, so what?</p>
<p>In a traditional OLTP database, your data may be scattered across one or multiple disk drives. Physical drive platters will have to spin to locate the data on different parts of your storage medium. Drive read/write arms will have to move around in coordination with the spinning platters. The more complex your query, the more complex the dance your physical hardware will have to do; a simple high school slow dance turns into a tango.</p>
<p>In a document database, all of our data is stored together in a single record. When we want to read our bill, we just have to start reading at the beginning of the bill record and stop when we come to the end. There&#8217;s no need to seek around on the disk.</p>
<p>You might be worried that all of your data won&#8217;t be close together on disk. And you&#8217;d be right. However, many databases (including MongoDB) allow for the creation of secondary indexes to speed up data retrieval. The biggest question you need to ask yourself is &#8220;How will the applications be accessing the data?&#8221; In many applications we&#8217;re only acting on a single object. Even when our application isn&#8217;t acting on a single object, we can pre-aggregate the data for faster reporting and retrieval. When our application only works on a single object at a time, a document database provides distinct advantages &#8211; every time we need an object, we&#8217;ll be pulling back all of the data we need in a single read operation.</p>
<h4 id="strict_structure">Strict Structure</h4>
<p>Databases typically require data to be rigidly structured. A table has a fixed set of columns. The datatypes, precision, and nullability can vary from column to column, but every row will have the same layout. Trying to store wildly diverse and variable data in a fixed storage medium is difficult. </p>
<p>Thankfully, document databases are well-suited to storing semi-structured data &#8211; since our data is a collection of attributes, it&#8217;s very easy to add or remove new attributes and change querying strategies rapidly and in response to different data structure. Better yet, document databases let us be ignorant of how the data is stored. If we want to find all bills where the account holder&#8217;s last name is &#8216;Smith&#8217; and they live in Virginia but the bill doesn&#8217;t have any county tax charges, it is very easy compared to constructing the query in a typical SQL database.</p>
<p>Using <a href="http://mongodb.org">MongoDB</a> our query might look like:</p>
<pre class="brush:tsql">db.bills.find( { last_name : 'Smith' },
               { state : 'Virginia' },
               { charges : { type : 'county tax',
                             $exists : false } } )
</pre>
<p>Compared to similar SQL:</p>
<pre class="brush:tsql">SELECT  b.*
FROM    bills b
        JOIN accounts a ON b.account_id = a.id
        LEFT JOIN charges c ON b.id = c.bill_id
                               AND c.type = 'county tax'
WHERE   a.last_name = 'Smith'
        AND a.state = 'Virginia'
HAVING  COUNT(c.id) = 0
</pre>
<p>And right about now, every DBA that reads this blog is going to be shaking with rage and yelling &#8220;But that SQL is perfectly clear, I don&#8217;t know how you can expect me to understand all of those curly brackets!&#8221; I don&#8217;t expect you to understand those curly brackets. Nor do I expect developers to understand SQL. The easiest way for us to develop is to use our natural paradigm. That&#8217;s why developers write code in C#, PHP, or Ruby and DBAs do their work in some dialect of SQL. MongoDB alleviates this because all the developers are doing is constructing a list of keys and values that must be matched before a document can be returned.</p>
<h4 id="changing_the_schema">Changing the Schema</h4>
<p>Changing the schema of an OLTP database can be an onerous task. You have to wait for, or schedule, down time. Modifications have to take place. Of course, the schema modifications need to take into account any actions (like triggers or replication) that may occur in the background. This alone can require significant skill and internal database engine knowledge to write. It&#8217;s not something that application developers should be expected to know. Why do I mention application developers? 99 times out of 100, they&#8217;re the ones who are working on the database, not a dedicated DBA.</p>
<p>Many newer, non-traditional, databases make it incredibly easy to change the schema &#8211; just start writing the new attribute. The database itself takes care of the changes and will take that into account during querying. When a query is issued for a new attribute, records without that attribute will be ignored (just like a column with a NULL value in a traditional database).</p>
<h3 id="what_about_analytics">What about Analytics?</h3>
<p>I don&#8217;t know a lot about analytical databases, in part because they require a different skill set than the one I&#8217;ve developed. I do know a few things about them, though.</p>
<p>Analytical databases are currently encumbered by some of the same problems as OLTP databases &#8211; data is stored in tables made up of rows and columns. Sure, these are called dimensions/facts and attributes, but the premise is the same &#8211; it&#8217;s a row-based data store.</p>
<p>Row-based data stores pose particular problems for analytic databases. Analytic databases throw most of the rules about normalization in the garbage and instead duplicate data willy nilly. Without joins, it&#8217;s very quick to query and aggregate data. But the problem still remains that there is a large quantity of repeated data being stored on disk.</p>
<p><a href="http://wiki.toadforcloud.com/index.php/Survey_distributed_databases#Columnar_Databases">Columnar databases</a> attempt to solve this problem by compressing columns with similar values and using some kind of magical method to link up columnar values with their respective rows. Sounds complicated, right? Well, it probably is. Let&#8217;s say you have a table with 10,000,000,000 rows and the CalendarYear column is a CHAR(4). If there are only 25 different values for CalendarYear in the database, would you rather store 40,000,000,000 bytes of data or 100 bytes of data? I know which makes more sense to me.</p>
<p>Interestingly enough, there are two approaches being taken to solving this problem. The first is by creating single-purpose columnar databases. There are <a href="http://www.sybase.com/products/datawarehousing/sybaseiq">several</a> <a href="http://infinidb.org/">vendors</a> providing dedicated columnar databases. Other database developers are looking for ways to leverage their <a href="http://blog.tapoueh.org/char10.html#sec10">existing database engines</a> and create hybrid row and columnar databases.</p>
<h3 id="looking_into_the_future">Looking Into the Future</h3>
<p>There are a lot of interesting developments going on in the database world. Many of them seem to be happening outside of the big vendor, traditional database space. Most of this work is being done to solve a particular business need. These aren&#8217;t the traditional row-based OLTP systems that we&#8217;re all familiar with from the last 30 years of database development. These are new, special purpose, databases. It&#8217;s best to think of them like a sports car or even a race car &#8211; they get around the track very quickly, but they would be a poor choice for getting your groceries.</p>
<p>The next time you start a new project or plan a new server deployment, think about what functionality you need. Is it necessary to have full transactional support? Do you need a row-based store? How will you use the data?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/facility9?a=HsfZ2vGj9YM:RRM303KdyIQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/facility9?i=HsfZ2vGj9YM:RRM303KdyIQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=HsfZ2vGj9YM:RRM303KdyIQ:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/facility9?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=HsfZ2vGj9YM:RRM303KdyIQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/facility9?i=HsfZ2vGj9YM:RRM303KdyIQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=HsfZ2vGj9YM:RRM303KdyIQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/facility9?i=HsfZ2vGj9YM:RRM303KdyIQ:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/facility9/~4/HsfZ2vGj9YM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://facility9.com/2010/07/15/the-future-of-databases/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		<feedburner:origLink>http://facility9.com/2010/07/15/the-future-of-databases</feedburner:origLink></item>
		<item>
		<title>The Board of Directors and You</title>
		<link>http://feedproxy.google.com/~r/facility9/~3/T1ZunmrgBm8/the-board-of-directors-and-you</link>
		<comments>http://facility9.com/2010/07/13/the-board-of-directors-and-you#comments</comments>
		<pubDate>Tue, 13 Jul 2010 13:00:31 +0000</pubDate>
		<dc:creator>Jeremiah Peschka</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[sqlpass]]></category>
		<category><![CDATA[syndication]]></category>

		<guid isPermaLink="false">http://facility9.com/?p=1675</guid>
		<description><![CDATA[The deadline for nominations to the PASS Board of Directors is rapidly approaching. I figured that it would be great if I chimed in and mentioned what I&#8217;ve learned on the Board, what I think would be typical for a board member, and&#8230; I don&#8217;t know what else, but I really felt that this list [...]]]></description>
			<content:encoded><![CDATA[<p>The deadline for <a href='http://www.linkedin.com/redirect?url=http%3A%2F%2Fwww%2Esqlpass%2Eorg%2FCommunity%2FPASSBlog%2Fentryid%2F121%2FCall-for-Nominations-for-2011-2012-PASS-Board-Term-Now-Open%2Easpx&amp;urlhash=tViC' target='_blank'>nominations to the PASS Board of Directors</a> is rapidly approaching. I figured that it would be great if I chimed in and mentioned what I&#8217;ve learned on the Board, what I think would be typical for a board member, and&#8230; I don&#8217;t know what else, but I really felt that this list needed a third item. Mainly because I wanted to show off that I know how to properly use an Oxford comma.</p>
<h3 id="what_is_expected">What Do These People Want From Me?!</h3>
<p>When I stepped up and ran for the PASS Board of Directors, I had no idea what I was doing. I knew that I wanted to help make PASS better. Better how? I had a few ideas. We were going to change the world! There would be speaker mentoring and education for all! A chicken in every garage and mittens on our feet! It turns out that my chickens and mittens proposal isn&#8217;t going so well, but we&#8217;re working on a speaker mentoring program and I&#8217;ve been working with Microsoft to get your feedback to them about certifications.</p>
<p>Enough about me! More about you!</p>
<h4 id="have_a_plan">Have a Plan</h4>
<p><a href="http://www.flickr.com/photos/kyle_slushey_is_awesome/3702677032/" title="This is the future, kid"><img src="http://farm4.static.flickr.com/3612/3702677032_573faa5219_m.jpg" width="240" height="181" alt="KPBB-12" class="alignright"></a>So, this Board of Directors thing, you should have a strong idea of what you would like to change. That could be changes to how we&#8217;re governed, increasing our revenue streams, or finding a new Summit location. The point is that you should have a vision of the future. Beyond a vision, it would be helpful if you have some ideas about how you&#8217;re going to fulfill that vision. You don&#8217;t need to have a complete business plan, although that never hurts.</p>
<p>I can&#8217;t stress how important having a strong vision is. The goal is to have Board members act in a strategic role. Rather than plan things <em>and</em> implement them, you should be coming up with broad plans. Once you&#8217;ve come up with plans and goals you&#8217;ll work with PASS HQ and a few key volunteers to implement things. That isn&#8217;t always how things work out, but that should be the goal.</p>
<p>Without a strong vision, it&#8217;s very easy to get swept along. This is a two year commitment. if you&#8217;re being swept along for two years, you&#8217;re going to feel very lost, purposeless, and burnt out. Make sure that you know you have something that you plan to accomplish. When you&#8217;re finished with your term you can look back and say &#8220;I did <em>that</em> and I&#8217;m damn proud of it.&#8221; I know that when I&#8217;m done, we will have happily gone through and codified and documented more of the abstract selection process. There will be less tribal knowledge and more of it will be available for easy public consumption.  I&#8217;m going to be happy about that. Know what you&#8217;re doing. Have a goal, make a plan. Don&#8217;t be afraid to revise it.</p>
<h4 id="the_time_of_your_life">The Time of Your Life</h4>
<p><a href="http://www.flickr.com/photos/blackcustard/247625993/" title="Pinhole: Clock by Matt Callow, on Flickr"><img src="http://facility9.com/files/2010/07/247625993_2603011c36_o.jpg" alt="Pinhole: Clock" title="247625993_2603011c36_o" width="640" height="134" class="aligncenter size-medium wp-image-1676" /></a></p>
<p>People always say that you need to be willing to donate &#8220;a few hours a week&#8221; of your time if you want to be on the PASS Board of Directors. (They say this for just about anything else, too.) So, how much time does it really require?</p>
<p>That all depends on how much work you take on, how much you can delegate, and your own personal comfort level. The amount of time that I spend on my own portfolio is not typical &#8211; that&#8217;s not to say that they work less, it&#8217;s just that my time commitments come in spikes where I&#8217;ll be incredibly busy for three or four months and then a lot of the year things are very quiet. I&#8217;m hoping that other Board members will comment here and put forward their opinions and help to add to this article and clear things up for the people who are thinking about running for the Board of Directors. The point is: there&#8217;s no fixed amount of time. It&#8217;s as much or as little time as you want to put into it.</p>
<p>There&#8217;s a one hour conference call once a month. As often as once a quarter there will be an in-person Board meeting. You&#8217;ll typically spend a day traveling to and from the meeting and two days on site. This ends up being four week days, in my experience. Of course, one of these in person Board meetings ends up being the PASS Community Summit. So that&#8217;s one less week that you have to take off from work.</p>
<h4 id="skills_in_magic">Skills in Magic</h4>
<p><a href="http://www.flickr.com/photos/iamagenious/4009214094/" title="hella dope  by permanently scatterbrained, on Flickr"><img src="http://facility9.com/files/2010/07/4009214094_6f4371c4b8_z.jpg" alt="hella dope" title="hella dope" width="170" height="362" class="hang-2-column size-full wp-image-1677" /></a></p>
<p>What kind of skills do you need to be on the PASS Board of Directors? We&#8217;ve already covered one: planning. You should be reasonably good at planning. You don&#8217;t need to be a genius strategist, but you should be able to put together a simple plan and execute on it. These are the skills that you&#8217;ve built as a DBA or database developer. You know how to make a list, prioritize, delegate, and execute on that list. If you can do that effectively, you&#8217;re halfway there.</p>
<p>The other skills that you would use in running a business the size of PASS&#8230; it would help if you had them before starting, but they&#8217;re not necessary.</p>
<h3 id="the_free_mba">The Free MBA</h3>
<p>The PASS Board of Directors is the cheapest and most entertaining MBA program I have found. Nowhere else will you find the opportunity to manage a 7 figure budget while dining on bacon.</p>
<p>You can quote me on that.</p>
<p>One of the greatest things about the PASS Board of Directors is that it really is like an MBA program. I&#8217;ve learned about budgeting on a 7 figure scale, about how decisions play out, how to think strategically, how to plan, delegate, project, and all of the other things that they talk about in fancy business classes. Instead of one instructor and a few students, you&#8217;re one student with many other instructors. There are five other board members, three members of the Executive Committee, four vendor board members, the immediate past president, and let&#8217;s not forget our non-voting representative from Europe. Right there, you&#8217;re going to be learning from fourteen other people.</p>
<p>In the last seven months, I&#8217;ve learned more about my abilities as a manager than in the rest of my career. I was speaking with a friend recently, and he asked me what I thought about the PASS Board of Directors. Knowing that this friend was in management I said &#8220;It&#8217;s an awful lot like being a manager without the benefit of a company car and a reserved parking space.&#8221; After a hearty chuckle, we proceeded to play golf using a corporate AmEx. Okay, maybe that was a lie. But we did talk about the experience. The one thing that struck me is what I&#8217;ve mentioned here &#8211; it&#8217;s been the greatest education about business and about myself. There are days when I joke that I don&#8217;t know why people complain about being managers, all you do is tell people to do something and wait until they get it done. There are other days when I want to shove my head in a mailbox and scream.</p>
<p>The biggest thing that I&#8217;ve learned is how to listen. I don&#8217;t always see eye-to-eye with my fellow board members. But I&#8217;ve learned to listen to what they&#8217;re saying and to try to understand where they&#8217;re coming from. Sure, we all say things like this, right? That&#8217;s what marriages and friendships are about. When you&#8217;re making large decisions about the PASS Community Summit or a spring event or a budgetary decision, you suddenly realize how little you listened before and how much you need to listen. You want to know something funny? I don&#8217;t find myself agreeing with people any more than I did before I started listening closely, but I do find myself understanding them. That alone has made a huge difference for me professionally and personally.</p>
<h3 id="the_round_up">The Round Up</h3>
<p>That&#8217;s not a ringing endorsement, but there are bad days. The good days and the learning experiences far outweigh the bad days and the stress.</p>
<p>In the end, it&#8217;s been worth it. If I had to do it again, would I still run for election? Absolutely.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/facility9?a=T1ZunmrgBm8:Hs6fmqvQreY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/facility9?i=T1ZunmrgBm8:Hs6fmqvQreY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=T1ZunmrgBm8:Hs6fmqvQreY:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/facility9?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=T1ZunmrgBm8:Hs6fmqvQreY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/facility9?i=T1ZunmrgBm8:Hs6fmqvQreY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=T1ZunmrgBm8:Hs6fmqvQreY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/facility9?i=T1ZunmrgBm8:Hs6fmqvQreY:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/facility9/~4/T1ZunmrgBm8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://facility9.com/2010/07/13/the-board-of-directors-and-you/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://facility9.com/2010/07/13/the-board-of-directors-and-you</feedburner:origLink></item>
		<item>
		<title>MSDN Contest Winners</title>
		<link>http://feedproxy.google.com/~r/facility9/~3/Wk_qUNEfmqY/msdn-contest-winners</link>
		<comments>http://facility9.com/2010/07/12/msdn-contest-winners#comments</comments>
		<pubDate>Mon, 12 Jul 2010 14:00:33 +0000</pubDate>
		<dc:creator>Jeremiah Peschka</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://facility9.com/?p=1671</guid>
		<description><![CDATA[It&#8217;s time to announce the lucky winners of the MSDN subscription contest that I ran. There were some great entries.
So, here are the winners&#8230;
Shawn Melton
Shawn is a DBA in Montgomery, AL who has attended some SQL Saturday events and is a regular attendee of the local PASS chapter. He wants to get started with blogging [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s time to announce the lucky winners of the MSDN subscription contest that I ran. There were some great entries.</p>
<p>So, here are the winners&#8230;</p>
<h3>Shawn Melton</h3>
<p>Shawn is a DBA in Montgomery, AL who has attended some SQL Saturday events and is a regular attendee of the local PASS chapter. He wants to get started with blogging and presenting. </p>
<h3>AJ Mendo</h3>
<p>AJ is studying for his MCITP exams, is a member of the program committee, and has attended a few SQL Saturdays. He&#8217;s started contributing to the community and has been bitten. He&#8217;s looking to learn more and set up a lab at home to contribute to his learning process.</p>
<h3>Mike Peschka</h3>
<p>Hey, look at that, some nepotism. So, here&#8217;s why I&#8217;m giving this last one to my brother. Mike has taught me more of over the course of my career than most people have a right to forget. He&#8217;s helped out a number of people in the development world on a one-on-one basis, and he does it all with a goofy ass smile on his face. To top it all off, Mike has done it all while working remotely for a company based in the UK and with an old version of development tools. Mike may not directly be an active part of the development community, but he&#8217;s helped more people than you&#8217;d know.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/facility9?a=Wk_qUNEfmqY:epNlnogM-R0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/facility9?i=Wk_qUNEfmqY:epNlnogM-R0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=Wk_qUNEfmqY:epNlnogM-R0:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/facility9?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=Wk_qUNEfmqY:epNlnogM-R0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/facility9?i=Wk_qUNEfmqY:epNlnogM-R0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=Wk_qUNEfmqY:epNlnogM-R0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/facility9?i=Wk_qUNEfmqY:epNlnogM-R0:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/facility9/~4/Wk_qUNEfmqY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://facility9.com/2010/07/12/msdn-contest-winners/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://facility9.com/2010/07/12/msdn-contest-winners</feedburner:origLink></item>
		<item>
		<title>TFS and You</title>
		<link>http://feedproxy.google.com/~r/facility9/~3/bvpqBAW-nhY/tfs-and-you</link>
		<comments>http://facility9.com/2010/07/07/tfs-and-you#comments</comments>
		<pubDate>Wed, 07 Jul 2010 11:32:50 +0000</pubDate>
		<dc:creator>Jeremiah Peschka</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[TFS]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[syndication]]></category>

		<guid isPermaLink="false">http://facility9.com/?p=1649</guid>
		<description><![CDATA[How many of you are using Visual Studio 2010? How many of you are writing SSIS packages? How many of you are pissed off, irritated, or confused about how you&#8217;ll be able to write and version control your SSIS packages (VS 2008) once you&#8217;ve upgraded to TFS 2010?
Confused yet? Yeah, so am I.
Let&#8217;s backtrack: at [...]]]></description>
			<content:encoded><![CDATA[<p>How many of you are using Visual Studio 2010? How many of you are writing SSIS packages? How many of you are pissed off, irritated, or confused about how you&#8217;ll be able to write and version control your SSIS packages (VS 2008) once you&#8217;ve upgraded to TFS 2010?</p>
<p>Confused yet? Yeah, so am I.</p>
<p>Let&#8217;s backtrack: at work we recently upgraded to VS 2010 and TFS 2010 &#8211; this lets everyone on my team take advantage of the database developer edition as well as add a whole slew of automated testing features and doodads. Plus our management can tie in to our tasks </p>
<p>One of the problems that we ran into is connecting to TFS2010 from VS2008. Why would I need to do that? Visual Studio 2010 doesn&#8217;t have support for the SQL Server 2008 BI project types yet (SSRS, SSIS, etc). So, in order to work on SSIS packages, I need to keep VS 2008 around. </p>
<p>It&#8217;s pretty easy to connect Visual Studio 2008 to TFS 2010. <a href='http://www.microsoft.com/downloads/details.aspx?FamilyID=CF13EA45-D17B-4EDC-8E6C-6C5B208EC54D&amp;displaylang=en'>Download this hotfix</a>, install it, and then you&#8217;re up and running. That&#8217;s really all there is to it.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/facility9?a=bvpqBAW-nhY:u5WkTcvCx0s:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/facility9?i=bvpqBAW-nhY:u5WkTcvCx0s:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=bvpqBAW-nhY:u5WkTcvCx0s:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/facility9?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=bvpqBAW-nhY:u5WkTcvCx0s:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/facility9?i=bvpqBAW-nhY:u5WkTcvCx0s:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/facility9?a=bvpqBAW-nhY:u5WkTcvCx0s:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/facility9?i=bvpqBAW-nhY:u5WkTcvCx0s:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/facility9/~4/bvpqBAW-nhY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://facility9.com/2010/07/07/tfs-and-you/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://facility9.com/2010/07/07/tfs-and-you</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 2.896 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-07-29 09:16:27 -->
