我正在嘗試確定存儲每位電話約43人的最佳方式。客戶希望能夠以幾種不同的方式查看數據 - 誰擁有最多/最少的電話YTD,前10名的圖表,前一年的變化等。跟蹤每個人的月度通話次數 - MySQL還是XML?
我認爲試圖不斷更新XML每個人每年的文件名稱和每月呼叫計數,但這會使得提取不同類型的數據比我使用MySQL更具挑戰性。
如果MySQL是最好的選擇,最好每年每人存儲一行數據,並且每年的每個月都有一列。或者,每個月都會在年份,月份和電話簿中添加一行?
建議將不勝感激。
這裏是一個包含數據的XML文件的樣本 -
<?xml version="1.0" encoding="UTF-8" ?>
<report>
<ReportHeader>
<Section SectionNumber="0">
<Picture Name="DeptPic1" GraphicType="BolbField"></Picture>
</Section>
</ReportHeader>
<Group Level="1">
<GroupFooter>
<Section SectionNumber="1">
<Field Name="Field11" FieldName="{IncdPers.PERSONNAME}">
<FormattedValue>Captain John Doe</FormattedValue>
<Value>Captain John Doe</Value>
</Field>
<Field Name="Field12" FieldName="{IncdPers.PERSONLOOKUPID}">
<FormattedValue>Doe, John</FormattedValue>
<Value>Doe, John</Value>
</Field>
<Field Name="Field13" FieldName="DistinctCount ({In5basic.GUIDIDNUMBER}, {IncdPers.PERSONLOOKUPID})">
<FormattedValue>6</FormattedValue>
<Value>6</Value>
</Field>
<Field Name="Field14" FieldName="{@PercentInc}">
<FormattedValue>54.55</FormattedValue>
<Value>54.55</Value>
</Field>
<Text Name="Text14">
<TextValue>%</TextValue>
</Text>
</Section>
</GroupFooter>
</Group>
<Group Level="1">
<GroupFooter>
<Section SectionNumber="1">
<Field Name="Field11" FieldName="{IncdPers.PERSONNAME}">
<FormattedValue>Firefighter Jane Smith</FormattedValue>
<Value>Firefighter Jane Smith</Value>
</Field>
<Field Name="Field12" FieldName="{IncdPers.PERSONLOOKUPID}">
<FormattedValue>Smith, Jane</FormattedValue>
<Value>Smith, Jane</Value>
</Field>
<Field Name="Field13" FieldName="DistinctCount ({In5basic.GUIDIDNUMBER}, {IncdPers.PERSONLOOKUPID})">
<FormattedValue>1</FormattedValue>
<Value>1</Value>
</Field>
<Field Name="Field14" FieldName="{@PercentInc}">
<FormattedValue>9.09</FormattedValue>
<Value>9.09</Value>
</Field>
<Text Name="Text14">
<TextValue>%</TextValue>
</Text>
</Section>
</GroupFooter>
</Group>
</report>
XML在此處的用途是什麼?你是否與另一個系統連接? – RedFilter
你的源數據在哪裏? – RedFilter
源數據實際上是一個由客戶端每月提交的XML文件。我使用PHP遍歷數據並通過名稱和調用次數提取每條記錄。我需要將每個月的XML數據結合到每年的單個數據源中。 – NightMICU