<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Buddy Lindsey &#187; Database</title>
	<atom:link href="http://buddylindsey.com/category/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://buddylindsey.com</link>
	<description>because reading textbooks gets boring</description>
	<lastBuildDate>Mon, 30 Jan 2012 23:33:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PostgreSQL &#8211; Week 1 of 7 Databases in 7 Weeks</title>
		<link>http://buddylindsey.com/postgresql-week-1-of-7-databases-in-7-weeks/</link>
		<comments>http://buddylindsey.com/postgresql-week-1-of-7-databases-in-7-weeks/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 23:33:21 +0000</pubDate>
		<dc:creator>Buddy Lindsey</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://buddylindsey.com/?p=669</guid>
		<description><![CDATA[Relational Databases are great databases, and a good staple of any development stack when flexible querying ability is needed. Currently my main RDBMS is MySQL, but since the acquisition by Oracle I have been a bit turned off by it. Something always rubbed the wrong way as it was, but the purchase made me really [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://buddylindsey.com/wp-content/uploads/2012/01/PostgreSQL-9.0.1.gif"><img src="http://buddylindsey.com/wp-content/uploads/2012/01/PostgreSQL-9.0.1.gif" alt="" title="PostgreSQL-9.0.1" width="275" class="alignright size-full wp-image-670" /></a></p>
<p>Relational Databases are great databases, and a good staple of any development stack when flexible querying ability is needed. Currently my main RDBMS is MySQL, but since the acquisition by Oracle I have been a bit turned off by it. Something always rubbed the wrong way as it was, but the purchase made me really want to move away. However, I never knew to what, or what to read to decide. This first chapter sealed the deal on my move to PostgreSQL for all non-wordpress and future projects.</p>
<h3>Impressions of the Book</h3>
<p>As noted above knowing what to read about PostgreSQL has been hard, but the book nailed what I wanted to know. I don&#8217;t really care too much about SQL Syntax, but what I wanted was more of the nitty gritty of how it worked along with what array of abilities it has. I got that and then some. </p>
<p>While some of the content was over my head because I have never had to deal with that kind of data storage and retrieval I could really see the flexibility incase I need to go there. The best part of the chapter is it was a deep dive with all the assumptions that I knew what I was doing with an RDBMS which allowed the content to be more specific.</p>
<h3>What I Learned</h3>
<p>For this database this section is going to be a bit small because I am used to RDBMS&#8217;s, but that doesn&#8217;t mean I didn&#8217;t learn anything. There are 3 key things that suck out in my head the most which I like, but are probably trivial to many other people.  These might be in other database engines, I don&#8217;t know.</p>
<h4>Sub Selection</h4>
<p>I had never thought about this before, but this is a great way to keep referential integrity without having to lookup id&#8217;s everywhere. Here is the code that drew my attention to it.</p>
<pre class="brush: sql; title: ; notranslate">
INSERT INTO events (title, starts, ends, venue_id)
VALUES ('Mobi', '2012-02-06 21:00', '2012-02-06 23:00', (
     SELECT venue_id FROM venues WHERE name = 'Crystal Ballroom'
)
</pre>
<h4>LIKEs</h4>
<p>I specifically liked ILIKE which is case insensitive like vs a case sensitive LIKE. I have not seen this before and I remember running into an issue in the past, not sure what RDBMS, where I wanted all uppercase only, but kept getting mixed results. It is cool there is a distinction.</p>
<h4>Extensibility</h4>
<p>To be honest I had never thought about writing, or having, extra functionality in a database engine before from 3rd parties. This chapter not only showed me you can, but there is a lot of power in using them.</p>
<h3>Overall</h3>
<p>Chapter 1 was a great read, easy to follow and witty. Good amount of information in a short amount of time with not much fluff. It was a fairly deep dive as advertised for one reasonably length&#8217;d chapter. I really liked in the wrap-up where they talked about the strengths and weaknesses of PostgreSQL. However, I can only hope they expand on what they said in the weakness section in later chapters by detailing out how to use non-relational data. </p>
<p>I have high hopes for the future chapters as I was quite impressed by this first one. Join me next time for Riak.</p>
]]></content:encoded>
			<wfw:commentRss>http://buddylindsey.com/postgresql-week-1-of-7-databases-in-7-weeks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>7 Databases in 7 Weeks &#8211; 8 Week Review and Experience</title>
		<link>http://buddylindsey.com/7-databases-in-7-weeks-8-week-review-and-experience/</link>
		<comments>http://buddylindsey.com/7-databases-in-7-weeks-8-week-review-and-experience/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 01:18:06 +0000</pubDate>
		<dc:creator>Buddy Lindsey</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[CouchDB]]></category>
		<category><![CDATA[HBase]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[Neo4J]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Redis]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[Riak]]></category>

		<guid isPermaLink="false">http://buddylindsey.com/?p=663</guid>
		<description><![CDATA[Databases are annoying and generally suck. Many us developers prefer to just do stuff with data and don&#8217;t like to deal with storing data beyond a nice pretty api. However, to be an effective software developer we also understand knowing about databases is a smart idea, doesn&#8217;t mean we have to like it. One of [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://pragprog.com/book/rwdata/seven-databases-in-seven-weeks"><img alt="7 Databases in 7 Weeks" src="http://imagery.pragprog.com/products/251/rwdata.jpg?" title="7 Databases in 7 Weeks" class="alignright" width="295" /></a></p>
<p>Databases are annoying and generally suck. Many us developers prefer to just do stuff with data and don&#8217;t like to deal with storing data beyond a nice pretty api. However, to be an effective software developer we also understand knowing about databases is a smart idea, doesn&#8217;t mean we have to like it.</p>
<p>One of the biggest problems for me is I don&#8217;t really know a lot about data stores outside of RDBMS&#8217;s. NoSQL data stores do not generally make a lot of sense to me, I know about them technically, but I haven&#8217;t found (m)any good overviews which help things click on proper ways to use them. It is my hope that reading <a href="">7 Databases in 7 Weeks</a> will be that final piece of knowledge which helps everything click into place.</p>
<h3>A Note</h3>
<p>I feel I should note before moving on this book is still in beta so things can, and will probably change. Most of the book covers different NoSQL databases so with my limited knowledge anything is better than nothing. I just wanted to be sure to point out as of now the book is in beta, but that doesn&#8217;t mean it is wrong or bad.</p>
<h2>What to Expect</h2>
<p>Over the course of the next 7 weeks I will take one database at a time and do all the exercises, to the best of my ability, and read the entire chapter. I will then describe what I have learned and what, if anything, really helped things click in my head. Finally, on week 8 I will do a wrap-up of everything I have read and my opinion of the book.</p>
<h2>What is In the Book</h2>
<p>Databases of course <img src='http://buddylindsey.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . The book is broken up into the following databases:</p>
<ol>
<li>PostgreSQL</li>
<li>Riak</li>
<li>HBase</li>
<li>MongoDB</li>
<li>CouchDB</li>
<li>Neo4J</li>
<li>Redis</li>
</ol>
<p>Each database will get its own post so I can do them justice. Especially since there are several different types of databases.</p>
<h2>What I Hope to Get Out of The Book</h2>
<p>I mostly use RDBMS&#8217;s, namely mysql, but I need to learn NoSQL, and want to learn PostgreSQL, if for nothing else to know when and where to use it. I don&#8217;t want to just use it because I can, but because I should. In the first chapter, which was an overview, this is what they promise and I think they will deliver. I don&#8217;t intend to be an expert in each database, but at least have a working knowledge of them to combat my database ignorance. </p>
<p>Please comeback next week for the first part on PostgreSQL.</p>
]]></content:encoded>
			<wfw:commentRss>http://buddylindsey.com/7-databases-in-7-weeks-8-week-review-and-experience/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Getting Started with SQLite</title>
		<link>http://buddylindsey.com/getting-started-with-sqlite/</link>
		<comments>http://buddylindsey.com/getting-started-with-sqlite/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 18:53:11 +0000</pubDate>
		<dc:creator>Buddy Lindsey</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[RoR]]></category>
		<category><![CDATA[SQLite]]></category>

		<guid isPermaLink="false">http://buddylindsey.com/?p=427</guid>
		<description><![CDATA[You see a lot about SQLite all over the place, but finding a good place to start with how to use and interact with it is a pain. For a long time I never understood how to create, update, edit, etc. a sqlite Database. It turned out to be easier than I thought. Therefore this [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>You see a lot about SQLite all over the place, but finding a good place to start with how to use and interact with it is a pain. For a long time I never understood how to create, update, edit, etc. a sqlite Database. It turned out to be easier than I thought. Therefore this a quick get started below. One thing to note is to remember that SQLite is a subset of SQL* most basic commands will work, but you might need to look up the nuances.</p>
<h2>Download SQLite</h2>
<p>If you are on linux or OS X you might already have it. Open up command line and try to type:</p>
<blockquote><p>sqlite3 &#8211;version</p></blockquote>
<p>If you get a version number you are good, jump to next step.<br />
If not you need to visit <a href="http://sqlite.org/download.html">http://sqlite.org/download.html</a> and get your relevent version. For windows get the &#8220;Precompiled Binaries&#8221;.<br />
If you want can go ahead and extract the executable and add the .exe to your path, or just run command-line from that folder.</p>
<h2>Create a Database</h2>
<p>Creating a SQLite database was always the most confusing thing for me what to do, but I found it was pretty simple. If you have SQLite executable installed you simply type:</p>
<blockquote><p>sqlite3.exe test.db</p></blockquote>
<p>This will create the db file and get you into console mode ready to edit the database. Usually I like to try to find a GUI to edit the db, but for some reason I can&#8217;t find a very nice SQLite GUI that will create a db file so have had to do it manually. Unfortunately, when I try to create the db file if I don&#8217;t create a table before I exit it doesn&#8217;t actually create and save the file for use; so I usually create a small little table.</p>
<h2>Create Tables</h2>
<p>This is actually really simple since it is ANSI SQL</p>
<blockquote><p>create table test_table(id INTEGER NOT NULL, name TEXT);</p></blockquote>
<p>&#8220;Don&#8217;t forget the semi-colon at the end!&#8221;</p>
<h2>See Schema</h2>
<p>Use the command line tool to view the design/layout of your database. Use &#8220;sqlite3.exe db_filename.extension&#8221; on an existing SQLite db file and you are ready to go editing and viewing the file.</p>
<blockquote><p>.schema</p></blockquote>
<p>This command actually outputs the commands issued for the created tables. So it will look just like the command you input above. This is how you will view your database structure.</p>
<h2>Exit and Save</h2>
<p>FInally comes time to quit. This is quite simple.</p>
<blockquote><p>.exit</p></blockquote>
<p>Now you shouldn&#8217;t be stuck trying to close the file for 5 minutes because you don&#8217;t know what is going on like I did with the stupid period before the word &#8220;exit&#8221;.</p>
<h2>Conclusion</h2>
<p>SQLite is a really useful and portable database file to use, and was pretty &#8220;scary&#8221; to figure out when I didn&#8217;t know anything about it at all. I was so confused by it I didn&#8217;t want to mess with it, or anything relating to it. However, considering more and more things I work on seem to be dealing with SQLite db&#8217;s it was time to learn it, most notably are RoR and iPhone/OS development. I also like that it works with NHibernate if I needed.</p>
<p>I think if this is all you ever learn about SQLite then this is enough to make you comfortable with SQLite when you run across it in the future.</p>
<p>*As noted by Jay R. Wren in the comments. I originally said it was based on T-SQL. This was my confusion because every one I talk to about SQL always says T-SQL or SQL. I never knew the history behind it. SQLite technically uses a subset of ANSI SQL which was formalized by ANSI in 1986, aka SQL-86/7, it has progressed since then and T-SQL is a Microsoft SQL Server and Sybase variant of SQL, sorry for any confusion on this. For more information feel free to read the wiki article on SQL. <a href="http://en.wikipedia.org/wiki/SQL">SQL &#8211; Wikipedia</a></p>
]]></content:encoded>
			<wfw:commentRss>http://buddylindsey.com/getting-started-with-sqlite/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AdventureWorks Database download</title>
		<link>http://buddylindsey.com/adventureworks-database-download/</link>
		<comments>http://buddylindsey.com/adventureworks-database-download/#comments</comments>
		<pubDate>Sun, 08 Jul 2007 22:37:03 +0000</pubDate>
		<dc:creator>Buddy Lindsey</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://buddylindsey.com/?p=174</guid>
		<description><![CDATA[In SQL 2000 and previous there was Northwind which was your dummy database that you could use if you need to do database stuff, but didn&#8217;t have a database. Well with the release of SQL 2005 they came out with a new Database called AdventureWorks. Problem is it doesn&#8217;t come with SQL Express so you [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>In SQL 2000 and previous there was Northwind which was your dummy database that you could use if you need to do database stuff, but didn&#8217;t have a database. Well with the release of SQL 2005 they came out with a new Database called AdventureWorks. Problem is it doesn&#8217;t come with SQL Express so you have to find it. Well I finally found the link and am sharing it with you all.</p>
<p><a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=E719ECF7-9F46-4312-AF89-6AD8702E4E6E&amp;amp;displaylang=en">Download: AdventureWorks Database</a></p>
<p>Edit: I just figured out it got moved yet again to Code Plex</p>
<p><a href="http://www.codeplex.com">http://www.codeplex.com</a></p>
<p>Edit: here is the exact link to get it. Finally actually found it.</p>
<p><a href="http://www.codeplex.com/MSFTDBProdSamples/">http://www.codeplex.com/MSFTDBProdSamples/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://buddylindsey.com/adventureworks-database-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

