Archive for the ‘Database’ Category

DNA is Good

Released March 1st, 2011
Screen capture of the Intrepid Bioinformatics website.

Screen capture of the Intrepid Bioinformatics website.

Ok, bad paraphrasing aside, for one moment, put on your best “Gordon Gekko” suit, and loosely consider this:

In finance, a portfolio is a collection of investments held by an institution or an individual. Holding a portfolio is a part of an investment and risk-limiting strategy called diversification – by owning several assets, or “things with value”, certain types of risk can be reduced. In building up an investment portfolio, a financial institution will typically conduct investment analysis, while a private individual may make use of a financial advisor/institution’s portfolio management services.

Now ask yourself this – what if there were a way to do this with, oh I don’t know: your genetic data? Enter Intrepid Bioinformatics.

Intrepid’s founders had a vision, one of a heterogenous genetic data management platform that would allow researchers to store, compare, and contextualize genetic trends, as well as purchase reagents and consumables, all in one place. With a newly-designed identity by Katie Bush Design, Inc. in hand, Intrepid and their team came to Mission Data looking to take this concept out of the futuristic conversational realm and bring it into the “now”.

What Does It Do?

A “software-as-a-service” platform allows genetic researchers to compare similar data sets from thousands of samples side-by-side. With Intrepid, a researcher can begin to quickly identify trends in entire populations which will have the potential to quickly advance discoveries in the medical, pharmaceutical and agricultural biotechnology industries. From free trials to rich-access subscriber plans, users are presented with an impressive load of features right out of the gate – multiple upload options, data downloading, user tutorials, and active collaboration between other community members of your choice, to name a few.

Who’s Using It?

Intrepid appeals to the genetic research community in two sectors: human genome research and animal (specifically, bovine) research. The markets for these two segments are vastly different, and the audience can be further segmented into researchers working for larger companies/governments/universities vs. researchers in small, relatively unfunded labs.

Take, for example, a cattle farmer. He or she obviously has a vested interest in ensuring that their clients are receiving the best product possible, be it milk, beef, etc. By using Intrepid’s services, they can access a wealth of genetic data that will help them determine which lines of cattle are best suited for those assorted purposes. And, which lines they might want to avoid because of a predilection for disease.

That’s not to say those are the only audience contingents that Intrepid is looking to pull into their community. On the contrary, a day on the horizon can be seen in which members of the public can look to utilize Intrepid Bioinformatics’ services like a digital genetic bank, safely and securely storing their data with constant and “at-will” access.

Our team at Mission Data constantly look to push and redefine the boundaries of what is thought possible and conventional in the realm of the web. And, I think I can speak for all of us when I say that if we can eliminate boundaries and make the ideas of the future happen while partnering with great clients, then the ride is made all the better. This was certainly the case here.

To further paraphrase Gordon Gekko: “It’s all about the ‘now’, kid. The rest is just conversation.”

Epicurean Tips on the Go

Released January 11th, 2011

tt-blog

Wondering where to go when you’re hungry? Tasting Table offers foodies a delicious daily digest of taste-tested recipes from world-renowned chefs and ideas about dining, wine, cocktails, cooking and more.

Local editions for New York, Los Angeles, Chicago, San Francisco and Washington D.C, delight more than 300,000 registered users with highlights of neighborhood buzz, must-visit hot spots, dishes to try and high-profile personalities. The national edition serves up exclusive recipes from Tasting Table’s chefs with a bonus sneak preview of America’s hottest new eateries.

Working with the Tasting Table team, Mission Data designed and developed the iPhone application including integrating with Tasting Table’s web services on their existing web-based application taking the existing website content mobile.

Download the application from the iTunes App Store to find nearby recommendations, create and manage your To-Do lists and consume articles and recommendations from the Tasting Table website easily on your iPhone or iPod touch.

Sending UTF-8 email with Oracle

Released April 18th, 2007

I have seen several examples of sending email using oracle with non-ascii characters floating around the Internet, but few seem to tackle sending these ‘special’ characters in both the subject and the body. Many also take a shortcut and use 8bit transfer encoding for the body. I am 99.9% sure that this will work on today’s mail servers, but basic SMTP only really needs to support 3 transfer encodings – 7bit ascii, base64, and quoted-printable.

(more…)

Computing time with Oracle sysdate

Released April 11th, 2007

If you ever need to work with something other than a day when using sysdate you are in luck. As it turns out you can work on sysdate with fractional days. This is just what a person needs when they want to do something like:

SELECT mycol FROM sometable WHERE sometimestamp < "30 seconds ago"

The main trick here is to know that sysdate math is based in days and fractional days work. Here are a few examples:

Remove hours from a date:

sysdate – hours/hours in a day

Remove minutes from a date:

sysdate – minutes/(hours in a day * minutes in an hour)
or
sysdate – minutes/minutes in a day

Remove seconds from a date:

sysdate – seconds/(hours in a day * minutes in an hour * seconds in a minute)
or
sysdate – seconds/seconds in a day

The example above would be:

SELECT mycol FROM sometable WHERE sometimestamp < sysdate - 30/(24*60*60)

Accessing oracle with sqlplus and no tnsnames

Released July 28th, 2006

If you want to access a database without it being in your tnsnames.ora file, you can use a ‘URL’ at the command line:

sqlplus login/pwd@//hostname:1521/sidname

This should work with versions 9 and above. Let me know if other versions work.

Converting unix or java timestamps (time since the epoch) to real dates with Oracle

Released April 29th, 2006

A few days ago I made use of a couple Oracle built in functions and it made me happy I didn’t have to write a stored proc or some type of mini-app to do it. I needed to parse a timestamp out of a field that was put there by a java program. The timestamp was just the output of System.currentTimeInMillis() and was concatenated onto some other information.

It took a little digging to find out how to convert a epoch style timestamp but here it is:

select new_time( to_date('01011970', 'ddmmyyyy') + 1/24/60/60 * :currenttimeinmillis/1000, 'GMT', 'EDT' ) from dual

Note that I convert the output from GMT to EDT here.

Ruby Oracle DBI ActiveRecord in 7 steps

Released March 22nd, 2006

Setting up ruby to work with Oracle seems to be a pain for a lot of people. Here are the steps I follow to set it up on a linux box from nothing to Active Record or DBI in 7 steps.

  1. Gather the installation sources you will need. You have to be registered with oracle to get their instant client packages.
    Download the ruby oci8 drivers
    Download the oracle instant client
    You want the following packages (these examples assume the zip format):

    • Instant Client Package – Basic or Instant Client Package – Basic Lite
    • Instant Client Package – SDK
    • Instant Client Package – SQL*Plus (optional but nice to have)
  2. (more…)

Fun with Oracle Strings

Released February 13th, 2006

Today I needed to find a way to count the number of unique email domains in a table. I figured there was a way of getting the index of a string in another string and sure enough there is. This did the trick in Oracle:

select count(1), SUBSTR(email, INSTR(email, '@', 1, 1)+1) from SOMETABLE group by SUBSTR(email, INSTR(email, '@', 1, 1)+1) order by count(1) desc

The INSTR function gives you the location in a string where another string is located. See the following link for more on the INSTR function: http://www.techonthenet.com/oracle/functions/instr.php

I’ve always found the way Oracle handles case interesting. It looks like they are changing things a little starting with 10G: http://blogs.ittoolbox.com/database/solutions/archives/005951.asp