How to design schema for time information

From: Jason <jasonjz_at_gmail.com>
Date: Wed, 5 Mar 2008 14:39:10 -0800 (PST)
Message-ID: <6e700108-019c-4190-9b50-d769e76acd59@z17g2000hsg.googlegroups.com>


I am wondering if there is a better way to define a column to store time information.

I need to create new table to represent store's open and close time for every weekday. i.e.

create table storehours(MondayOpen time,

                                MondayClose time,
                                TuesdayOpen time,

....
FridayOpen time, FridayClose time)

But I just realized that Oracle doesn't have the TIME data type. And the DATE and TIMESTEMP don't seem to help in this situation. So an alternative could be:

create table storehours(MondayOpen integer,

                                MondayClose integer,
                                TuesdayOpen integer,

....
FridayOpen integer, FridayClose integer)

But I don't like it because it is difficult to understand or use.

Any comments are highly appreciated. Received on Wed Mar 05 2008 - 16:39:10 CST

Original text of this message