Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Normalizing Question

Status
Not open for further replies.

BikeToWork

Programmer
Jun 16, 2010
50
0
0
US
I understand that it is a cardinal sin to save duplicate data in a database and was wondering if someone could suggest an alternative to my current approach. I import a log file of user logins into a database every month. The user's active/inactive status for the month is dependent on whether or not they had login(s) during that month. In addition to the log file of login data, there is also a tblUser table, which contains user information. What I'm doing currently is using another table (tblUserActive) where I save the UserID and Month for all users and mark their status active or inactive for the month depending on whether or not they had logins during the month. The problem with this method is that I am basically duplicating certain fields from the user table each month. Is there a better way? Thanks in advance for any advice.
 

For the start - since the table's name is [tt]tblUserActive[/tt] I would be tempted to keep just that: UserID and Month when they were ACTIVE, and forget about the users who did not access your stuff that month.

Have fun.

---- Andy
 
What makes the data in each table unique? It sound to me like

UserName String
Month String
ActiveStatus Yes/No

is the primary key, and probably all the necessary fields for your "header" table that would relate to your login detail table.
 
You shouldn't really need tblUserActive since it is storing values that can be calculated. However, sometimes this type of table assists with the efficiency of other tasks.

I don't see which fields are being duplicated.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top