# Data Access Based on a Guide Map of the Underwater Wireless Sensor Network
## 4 The DAGM Framework and Method of UWSN Data Storage and Query
### Building Method and Processing Mechanism of the Data Map
#### 4.2.1 Building Method of the Center Ring for Metadata
Then, the shortest distance sum is \(D_{ER\_2}=\sum_{i=1}^{n-2a+b}t\_i(\text{mod}(i,2)+\text{fix}(i/2)\times\sqrt{2}\) from all the nodes in this area to the node in the \(l\) line of center ring. Also, mod(\(i\),2) is a function: if \(i\) is an odd number, its value is 1; if \(i\) is an even number, its value is 0. fix(\(i/2\)) indicates an integral part that \(i\) is divided by 2. There are four identical ER-2 areas in the network, and the distance sum of this part is \(4\times D_{ER\_2}\). 3. For the ER-3 area in Figure 4, if \(a>n/2-2\), the number of nodes in the ER-3 is 0; the distance sum of this part is \(D_{ER\_3}=0\). If \(a\leq n/2-2\), the value of \(X\) coordinate axis (the node on this axis) is \(n/2+a+2\leq x\leq n\). The value of \(Y\) coordinate axis is less than its \(X\) coordinate axis: it is \(n/2\)\(+a-b+1\leq y\leq(x-b-1)\). For each node in the \(i\)-th line (connect nodes into lines that are parallel with \(X\) and from below to upward), if the value of \(X\) coordinate axis \(x\) is subtracted by \(n/2+a+i\), and is marked as \(x^{\prime}=x-(n/2+a+i)\), where \(x^{\prime}\) is from 1 to max(\(1\_n/2-a-1-i\)). In the meantime, for each node in the area, the value of the \(Y\) coordinate axis is \(y\), that it is subtracted by the minimum value of the \(X\) coordinate axis, with 1 added, and is marked as \(y^{\prime}>1\). Hence, the shortest distance from each node in the area to the center ring node is \(x^{\prime}+y^{\prime}\sqrt{2}\), where \(x^{\prime}\) is from 1 to \(n/2-a-1;y^{\prime}\) are from \(n/2+a-b+1\) to \((x^{\prime}-b-1)\), and \(x^{\prime}\geq y^{\prime}\). Connecting nodes into lines that are parallel to the \(Y\) coordinate axis, there are \(n/2-a-1\) lines orthogonal to the \(X\) coordinate axis. From inside to outward, with the number of nodes in the \(i\)-th line recorded as \(t\_i\), the sum of \(x\) and \(y\) is min(\(n/2+a+2\_n\)) \(+n/2+a-b+1+i\) in each node in the \(i\)-th line. This is because \(x\) is from \(n/2+a+2\) to \(n\), and \(y\) is from \(n/2+a-b+1\) to \((x-b-1)\). There are eight identical ER-3 areas in the network, so its distance sum is \(D_{ER\_3}=8\times\sum_{i=1}^{n/2-a-1}t\_i(x^{\prime}+y^{\prime}\sqrt{2})\). Combined with the above analysis, the distance sum \(D_{ER}\) from the nodes in the external area ER to the center ring node is shown as Equation (2):  
\[D_{ER}=4\times[2(a-b)+1]\times D_{ER\_1}+4\times D_{ER\_2}+8\times\sum_{i=1}^ {n/2-a-1}t\_i(x+y\sqrt{2}) \tag{2}\]  
The internal area (IR) situation of the center ring is discussed below, and is shown in Figure 5. The node in this part meets that sum of the value its \(X\) coordinate axis and \(Y\) coordinate axis is \(x+y<2\times(n/2+a)-b\), and \(n/2\leq x\), \(y\leq n/2+a-1\). The shortest distance sum from all nodes in IR-1 to the center ring nodes is recorded as \(D_{IR\_1}\), and the shortest distance sum from all nodes in IR-2 to the center ring nodes is recorded as \(D_{IR\_2}\). 1. if \(a=1\), there is only one node in IR, and the area IR-1 does not exist. Thus, \(D_{IR\_1}=0\), \(D_{IR\_2}=1\). 2. if \(b\leq 1\), there is no existing IR-1 area in the network, and \(D_{IR\_1}=0\). As a result, the shortest distance sum from all nodes in area IR-2 to the center ring node is \(D_{IR\_2}=\sum_{i=1}^{n-1}i[2\times(2a-(2i-1))+2\times(2a-(2i+1))]\). 3. if \(b=2\), there is only one node in area IR-1, and then \(D_{IR\_1}=\sqrt{2}\). 4. if \(b>2\), the situation of IR-1 is similar to the ER-2. The distances from nodes on different lines that are parallel \(l\) line to the center ring nodes are equally similar: \(1\), \(\sqrt{2}\), \(1+\sqrt{2}\), \(2\sqrt{2}\), \(1+2\sqrt{2}\), \(3\sqrt{2}\), \(1+3\sqrt{2}\), and so on. In IR-1, there are \(b+2\) lines that parallel the line \(l\).