可以使用什么样的模式来容纳基于手动日期的数据条目? [英] What sort of schema can I use to accommodate manual date based data entries?

查看:114
本文介绍了可以使用什么样的模式来容纳基于手动日期的数据条目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个管理员,来自多个属性的用户可以在twitter / facebook关注者的每月统计信息中输入。我们无法访问真实的数据/数据库,所以这就是为什么一个手动输入。表单如下所示:

 类型(收音机,仅选择**一个**):
- Twitter
- Facebook

关注者/粉丝(textfield):

属性(下拉菜单):酒店A,酒店B

日期开始:mm / dd / yyyy(textfield)
日期结束:mm / dd / yyyy(textfield)

问题1.1 :由于我只跟踪每个月的月份,所以我已经创建的日期开始/结束字段可能太具体了。如果这是我唯一关心的事情,那么只要开个月/年,月,年呢?



问题1.2

strong>:如果我要将日期开始和结束文本字段更改为开始月/年和结束月/年下拉列表,那么我可以使用哪个模式可用于月度到月份的统计信息?

解决方案

首先,你正在设计一个应用程序。数据驱动用户界面,而不是其他方式。



如果您没有月/年下拉列表,那根本就不重要。你需要收取什么?



如果每个值都是一个月,那么为什么要打扰开始和结束日期?使用一个月的日期和公约,或者月份的最后一个。



6/1/2010是2010年6月的条目。这一天是无关紧要的。不要使用除日期类型之外的任何东西。



如果您对模式进行规范化,则需要一张社交媒体场地表,一个属性表,一个子表对于Count_for_month的日期列和count_of_followers的整数列都是这两个。



对Marjan的回复



您的数据是唯一重要的事情。如果Excel消失了,那么只要文件中的数据可以在Google文档中使用,你会关心吗?



但这是否意味着我建议您捕获大量不必要的数据?还是设计一张桌子? (我只是猜测表和CRUD为中心的意思)我也不是说你的数据模型不是由需求驱动的,而是OUTPUT是你的系统存在的唯一原因的概念是疯狂的。 >

I have an admin where users from multiple properties can enter in monthly statistics for twitter/facebook followers. We do not have access to the real data/db so this is why a manual entry. The form looks like this:

Type ( radio, select **one** only ):
 - Twitter
 - Facebook

Followers/Fans ( textfield ):

Property (dropdown): Hotel A, Hotel B

Date Start: mm/dd/yyyy (textfield)
Date End: mm/dd/yyyy (textfield)

Question 1.1: Since I am only keeping track of month per month, the date start/end fields which I have already created might be too specific. Would it be a better idea just to have a start month/year and and month/year if that's the only thing I care about?

Question 1.2: What schema could I use for month to month statistics if I were to change the date start and end textfields to start month/year and end month/year dropdowns?

解决方案

First of all, you're designing an application backassward. The data drives the UI, not the other way around.

it shouldn't matter at all if you have month/year dropdowns or not. WHAT DO YOU NEED TO CAPTURE?

If each value is for a single month, then why bother with start and end date? Use one date and a convention of either the first of the month or the last of the month.

6/1/2010 is the JUNE 2010 entry. The day is irrelevant. Do not use anything other than a date type.

If you normalize the schema, you need a table for the social media venue, a table of properties, a child table to both of those that has a date column for Count_for_month and an integer column for count_of_followers.

Response to Marjan

Your data is the only thing that matters. If Excel disappeared, would you care so long as the data in the files could be used in Google Docs?

But does that mean I recommend capturing lots of unnecessary data? Or designing one screen per table? (I'm just guessing what is meant by "table and CRUD centered") Nor am I saying that your datamodel isn't driven by requirements but the notion that OUTPUT is the sole reason for your system to exist is lunacy.

这篇关于可以使用什么样的模式来容纳基于手动日期的数据条目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆