A A

Tag Archive | "sql"

Quick BASH Script to Dump & Compress a MySQL Database

Saturday, December 27, 2008

1 Comment

A quick script I whipped up to dump my MySQL database. Usage: sh backthatsqlup.sh (be warned that it dumps ALL databases. This can get huge uncompressed) #!/bin/sh # Isam (Biodegradablegeek.com) public domain 12/28/2008 # Basic BASH script to dump and compress a MySQL dump   out=sequel_`date +'%m%d%Y_%M%S'`.sql dest=/bx/   function e { echo -e "n** $1" }   e "Dumping SQL file ($out). May take awhile..." #echo "oh [...]

Understanding Basic Database Relationships in Rails

Wednesday, December 26, 2007

15 Comments

This short tutorial will be beneficial for you if database relationships and keywords like belongs_to and has_many confuse you, or if you’re trying to find out how relationships are implemented in Rails. As we create a small demonstration project, you’ll see that one beauty of Rails is how it does most of the work gluing [...]