title: Use existing database and tables with Sinatra and Datamapper?
body: <p>I am playing with Sinatra over the weekend to evaluate it for a small wiki site for my company.</p>
  
  <p>The problem I am having, is that we already have an existing MySQL database with all of our information in it, which other processes use, so I can't recreate it and seed it with data, because then I would have the mess of keeping two different databases synced with the same data.  </p>
  
  <p>Can anyone give me an example class for connecting to a MySQL database with Sinatra, and how do I pull fields from my existing columns?  </p>
  
  <p>This is an example of my table (from create commands):</p>
  
  <pre><code>CREATE TABLE `serverinfo` (
    `DB` CHAR(10) NOT NULL,
    `SERVERNM` CHAR(30) NOT NULL,
    `INSTANCE` CHAR(30) NOT NULL,
    `LOCATION` CHAR(2) NOT NULL,
    `ROLE` CHAR(15) NOT NULL,
    `HOST` CHAR(180) NOT NULL,
    `STATUS` CHAR(1) NOT NULL DEFAULT 'A',
    PRIMARY KEY (`DB`, `SERVERNM`, `INSTANCE`, `LOCATION`, `ROLE`, `HOST`)
  )
  </code></pre>
  
  <p>I am not sure if I can do what I need with Datamapper, so any other suggestion/example would be great.  It would also be great if I had an example of pulling from multiple tables in one class.</p>