All Questions
Tagged with database-design datetime
11 questions
0
votes
2
answers
324
views
How to convert getdate() stored as varchar to date
I have stored 'getdate()' as text in one of my column in a table. (It's a complicated scenario ,how I saved it)
Now when I select the field what I am getting is getdate() instead of the date . How can ...
0
votes
1
answer
2k
views
Handling multiple dates on fact table with performance concerns
I am working on a simple data marts and has once again stumbled with the handling date and time.
This is a design on a vehicle maintenance form records to collect the status record/remarks for ...
0
votes
1
answer
1k
views
How to handle incoming time-series data in a data warehouse?
I am new to data warehousing (having learnt this in my school days) and is looking to do a data warehouse as a side project. Below is a simple data warehouse design I came up with:
The data warehouse ...
1
vote
1
answer
938
views
Best way to put date range in a table in mySQL
I'm designing a system which is basically a booking engine. it uses separate table to store room data and separate table to store it's availability information (available date(s) ). I'm stuck in ...
1
vote
1
answer
51
views
redesign database around selecting rows by time range
I currently have a MySQL database that grows about 50,000 rows a day. When querying data out of the database, I query information from the info table and use a subquery on the session table to refine ...
23
votes
3
answers
12k
views
Separate month and year columns, or date with day always set to 1?
I'm building a database with Postgres where there's going to be a lot of grouping of things by month and year, but never by the date.
I could create integer month and year columns and use those.
Or I ...
1
vote
3
answers
1k
views
Which would be some benefits of storing date ranges instead of single dates?
I need to store large number of dates, along with with a price that corresponds to each date. I am considering two options: One is (a) to store a row for each date and price pair; the other is (b) to ...
29
votes
6
answers
50k
views
Preferred way to store DateTime
We can store Date and Time information in a couple of ways. What is the best approach for storing DateTime information?
Storing Date and Time in 2 separate columns or one column using DateTime?
Can ...
5
votes
1
answer
2k
views
Should future time be stored in UTC or local time?
Clearly in most cases time should be store in UTC. And in all cases a datetime that records a past event should be stored in UTC. We do this because civil time keeps changing and an event happened at ...
2
votes
1
answer
581
views
Optimal table design for a medical center rental service and recurrent shifts
I'm trying to figure out the optimal design for the following situation I'm being presented. I'm developing a medical web application with MySQL as db engine.
A medical center has 14-16 offices/rooms ...
0
votes
1
answer
6k
views
Date of birth saving to MYSQL DB with timestamp or date column type [closed]
i am using MYSQL database and would like to know which of this is a good practice.
way 1 - use column type in DB as timestamp. i.e will contain values like 2012-11-13 00:00:00 way 2 - use column as ...