|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Database design ...weekly hours
Hi i have to make a html page where user has options to click the hours he wants to work. Each day there are 10 hours. 8-9, 9-10, 10-11...and so on. There are 5 working days so 5*10 = 50. I would need 50 columns in my table. Can some one suggest me an easier way or a better way to design this database??
|
|
#2
|
||||
|
||||
|
yes, there is an easier way
i want to work mondays from 8 till 11, and wednesdays from 4 till 6 Code:
create table work_hours_selected ( usrid integer not null , wkday integer not null , hours integer not null , primary key (usrid, wkday, hours) ); insert into work_hours_selected values ( 937, 1, 8 ) insert into work_hours_selected values ( 937, 1, 9 ) insert into work_hours_selected values ( 937, 1, 10 ) insert into work_hours_selected values ( 937, 3, 4 ) insert into work_hours_selected values ( 937, 3, 5 ) |
![]() |
| Viewing: Dev Shed Forums > Databases > DB2 Development > Database design ...weekly hours |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|