On Sun, Nov 14, 2010 at 3:22 PM, russm <[email protected]> wrote:

> On Nov 13, 8:48 pm, flebber <[email protected]> wrote:
> > The only thing that would be unusual about my db is that I want to use
> > two primary keys time & date
>
> are you trying to create 2 primary keys on the table? that's not valid
> in an SQL schema - the point of a primary key is it's a single key
> that uniquely identifies a row.
>
>
> > 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?
>
> it sounds like what you want is a composite primary key, where the
> primary key contains multiple columns.
>
> the syntax for this is simple, just search for "composite primary key"
> in the migration docs -
> http://sequel.rubyforge.org/rdoc/files/doc/migration_rdoc.html
>
>
> I don't know your schema, but is there any reason you're using
> distinct columns for date and time rather than a single datetime
> column?
>
> cheers
>
> Russell
>
> --
> You received this message because you are subscribed to the Google Groups
> "sequel-talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<sequel-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/sequel-talk?hl=en.
>
>
I don't know your schema, but is there any reason you're using
distinct columns for date and time rather than a single datetime
column?

I hadn't considered it. Each date may have multiple events.

Its a very simple schema as I am only just beginning. Essentially its is a
notetaking database, which later i plan to incorporate as part of a bigger
program in Ruby.

Schema

ID(Randomly generated Number?) - EventDate - EventTime  - Location - Event
Number - Name - General Comment - Name Comment - CommentDate/Time

Most searching will be done by name which is unique as well. Most searching
will be done via Name.

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to