Ruby-Sequel - Sqlite3 table schema

Hi

Looking for a little assistance. I am trying to create a basic
database schema using Ruby, Sequel and Sqlite3.

I am reading here
http://sequel.rubyforge.org/rdoc/classes/Sequel/Database.html#M000510
and Home - SFirst-QL .

The only thing that would be unusual about my db is that I want to use
two primary keys time & date as no more than one event can occur at
any time though multiple events could occur on a day. I am not
understanding in sequel how to correctly create a db with multiple
keys? Or should I just be generating a random number to create a key
which references date and time?

Thanks

Sayth

Good Evening,

On Fri, Nov 12, 2010 at 7:35 PM, flebber [email protected] wrote:

two primary keys time & date as no more than one event can occur at
any time though multiple events could occur on a day. I am not
understanding in sequel how to correctly create a db with multiple
keys? Or should I just be generating a random number to create a key
which references date and time?

First you would be better off in the Sequel mailing list here -
http://groups.google.com/group/sequel-talk

As to your question - you create the two fields as normal and then add

primary_key([:date_col, :time_col])

The best resource for the docs on schema generation is here

http://sequel.rubyforge.org/rdoc/classes/Sequel/Schema/Generator.html

John