This answer won't we very tech related: We also using different CMS for our customers and they have a "created_at" and "updated_at" column in almost all of theis tables that relate to users, products, posts, ... One week ago, I was asked to get some stats from the application. I should get how many users were active and when, when did a user log-in and did he returned in period X. From users that are not older than 1 month (speaking application wise of course) how many have actively done something on the site and so on.
There are specialized tools for something like that, of course but the data was more than enough to provide pretty detailed information on various aspects that were very important from a financial point of view as well as planning and re-thinking some aspects.
As mentioned, this is not really a datebase-design answer but I'm sure everyone who does the econimical part will be interrested in some of this data at one point. So keeping it doesn't hurt anybody but can give you cheap (because it's "already there") information for a next meeting with the customers manager or whoever.
发布评论
评论(2)
这个答案不会与我们非常技术相关:我们还为我们的客户使用不同的 CMS,他们在几乎所有与用户、产品、帖子相关的论文表中都有一个“created_at”和“updated_at”列......一周之前,我被要求从应用程序中获取一些统计数据。我应该了解有多少用户处于活跃状态,以及用户何时、何时登录以及他是否在 X 期间返回。对于不超过 1 个月的用户(当然是指应用程序而言),有多少用户在网站等。
当然,有类似的专门工具,但数据足以提供各个方面的相当详细的信息,这些信息从财务角度以及规划和重新思考某些方面非常重要。
如前所述,这并不是真正的数据库设计答案,但我确信每个从事经济部分的人都会对其中的一些数据感兴趣。因此,保留它不会伤害任何人,但可以为您提供廉价的(因为它“已经在那里”)信息,供您下次与客户经理或任何人会面时使用。
This answer won't we very tech related: We also using different CMS for our customers and they have a "created_at" and "updated_at" column in almost all of theis tables that relate to users, products, posts, ... One week ago, I was asked to get some stats from the application. I should get how many users were active and when, when did a user log-in and did he returned in period X. From users that are not older than 1 month (speaking application wise of course) how many have actively done something on the site and so on.
There are specialized tools for something like that, of course but the data was more than enough to provide pretty detailed information on various aspects that were very important from a financial point of view as well as planning and re-thinking some aspects.
As mentioned, this is not really a datebase-design answer but I'm sure everyone who does the econimical part will be interrested in some of this data at one point. So keeping it doesn't hurt anybody but can give you cheap (because it's "already there") information for a next meeting with the customers manager or whoever.
如果您使用的是 SQL Server,则可以像这样创建第一个用户。它对我来说效果很好,但你可能需要稍微调整一下。
示例:
来源:
如何从 SQL Server 获取下一个标识值
If you are using SQL Server the first user could be created like this. It has worked well for me but you might have to tweak it a bit.
Example:
Source:
How to get the next identity value from SQL Server