Which one takes more space?
Hi there,
We log user activity in the database. Say the activity is search result. The result format is xml. For example, user ABC at 12:00 searched and the result is like following:
<name>name1<name><value>value1</value>
<name>name2<name><value>value2</value>
<name>name3<name><value>value3</value>
... There could be a thousand lines like this.
Now we log them in 2 tables:
Table 1
User ID Username Timestamp
1 ABC 12:00
Table 2
Record ID User ID Attribute Value
1 1 name1 value1
2 1 name2 value2
.... So there will be, say, 1 thousand records associated to 1 User ID.
As a result, the Table 2 grows dramatically fast.
0