# Spatial asymmetry of optically excited spin waves in anisotropic
ferromagnetic film

N. E. Khokhlov<EMAIL_ADDRESS>https://ioffe.ru/ferrolab/ Ia. A.
Filatov  A. M. Kalashnikova  Ioffe Institite, 26 Politekhnicheskaya, 194021,
St. Petersburg, Russia

###### Abstract

We analytically discuss and micromagnetically prove the ways to tune the
spatial asymmetry of the initial phase, amplitude, and wavevectors of
magnetostatic waves driven by ultrafast laser excitation. We consider that the
optical pulse heats a thin ferromagnetic metallic film and abruptly decreases
the saturation magnetization and the parameter of uniaxial anisotropy. The two
corresponding terms of laser-induced torque have different azimuthal
symmetries, with the 4-fold symmetry of the demagnetization-related term, and
the isotropic distribution of the anisotropy-related term. As a result, the
initial phase and amplitude of excited magnetostatic waves have a non-trivial
azimuthal distribution tunable with the angle between the external magnetic
field and anisotropy axis, and the laser spot diameter. Moreover, the
variation of these parameters tunes the distribution of wavevectors, resulting
in additional asymmetry between the spectral components of the waves
propagating in different directions.

Spin waves, magnonics, micromagnetics, ultrafast magnetism

##  Introduction

Magnonics is an emerging accompaniment to electronics, where spin waves (SW),
$i.e.$ collective oscillations of spins, transfer information across magnetic
nanostructures without charge currents [1]. This perspective field promises to
solve a series of problems inherent for traditional electronics, such as high
Joule energy losses, while bringing extra degrees of freedom characteristic
for, $e.g.$ photonics. Practical interest in magnonics is mainly due to its
applications in telecommunications, since characteristic frequencies of SW lie
in the range from sub-GHz to tens of THz. Here, magnonics has an obvious
advantage, since typical wavelengths of SW are several orders of magnitude
smaller than the ones for electromagnetic waves of similar frequencies.
Moreover, the SW possess an extended flexibility of tuning their
characteristics through the variation of external magnetic field, material
properties, waveguide geometry, and even external stimuli [2, 3, 4, 5]

To achieve an efficient control over SW, it is necessary to identify means to
actively tune such main SW characteristics as amplitude, phase, wavevector,
frequency, etc. Control of the parameters of SW is possible, for example, when
the waves are excited by femtosecond laser pulses [6, 7]. Since the first
experiments with laser excitation of SW, the all-optical pump-probe technique
has been used as a powerful toolbox for the detailed investigation of SW,
including capture of the wavefront and frequency evolution in the space domain
[8, 9, 10], frequency chirping in the time domain [11], reconstruction of SW
dispersion [12, 13]. Furthermore, the shape and size of the excitation laser
spot play a critical role in the formation of SW pattern [14, 6]. As an
example, an elongated laser pump spot leads to the formation of a quasi-plane
wavefront of SW pulse. This approach unveiled several fundamental processes,
inherent to SW and hardly accessible with traditional antennae techniques: bi-
reflection of spin waves [15], coherent oscillation between phonons and
magnons [16], etc. On the other hand, the phase of SW could be tuned with
double-pump excitation, where the time delay between optical pulses reveals
the control other the initial phase of the wave [17, 18, 19], or by using
competing excitation mechanisms in single-pump experiments [20]. Thus, single-
pulse optical excitation should offer possibilities to generate SW with
complex spatial asymmetry patterns of their initial phases, amplitudes, and
wavevectors, critical for the design of reconfigurable magnonic logic gates
[2].

Here, we present an approach to tune the asymmetry of the initial phase,
amplitude and wavevectors of SW at single-pulse optical excitation. We use a
combination of two SW driving mechanisms, ultrafast demagnetization and
ultrafast suppression of magnetic anisotropy, which are inherent to optical
excitation of a thin ferromagnetic metallic film. We analytically show that
two types of laser-induced torque maintain different space symmetries,
resulting in a non-trivial symmetry of the total torque and parameters of the
excited SW. Using micromagnetic simulations, we further examine, how the
spatial asymmetry of initial phase, amplitude, and wavevectors of the SW vary
with the strength of the external magnetic field, its angle with respect to
the anisotropy axis, and with the laser spot’s diameter. Moreover, the
variation of these parameters reshape the distribution of the SW amplitudes
over a range of wavenumbers in certain directions.

##  I Analytical consideration

###  I.1 Model of spin waves excitation by a laser pulse

Figure 1:  (a) Geometry of the system. Arrows: H0 – external magnetic field, M
– magnetization, e.a. – easy anisotropy axis, $\delta\textbf{M}$ – magnetic
dipole accounting for ultrafast demagnetization in analytical considerations.
(b) Spatial distribution of the torque $T_{H}+T_{u}$, corresponding to the
contributions of the Zeeman and anisotropy terms in the total laser-induced
torque. The distribution is obtained analytically with Eq. (7). (c) Spatial
distribution of term $T_{dM}$, corresponding to laser-induced demagnetization
term in total torque. The distribution is obtained analytically with Eq. (8).
(d) Spatial distribution of total laser-induced torque
$T(r,\varphi)=T_{H}+T_{u}+T_{dM}$. (e) Azimuthal distribution of
$T(r,\varphi)$ at $r=0.2\,\mu$m (f) Radial distribution of $T(r,\varphi)$ at
$\varphi=0,\pm\pi/4$. On panels (b-f) magnetic field is of magnitude
$\mu_{0}H_{0}=100$ mT, $\varphi_{a}=\pi/12$, $\sigma=1\mu$m. Values of
$M_{s},K_{u},\Delta M_{s},\Delta K_{u}$ used for calculations are listed in
Sec.II.1; $\delta M=10^{-17}$ A/m on (c-f).

We consider a laterally infinite ferromagnetic thin film with in-plane
uniaxial anisotropy (Fig.1, a). The saturation magnetization of the material
is $M_{s}$, uniaxial anisotropy parameter is $K_{u}$. An external magnetic
field $\textbf{H}_{0}$ is in-plane, and the angle between the easy anisotropy
axis and $\textbf{H}_{0}$ is $\varphi_{a}$. The angle between magnetization M
and $\textbf{H}_{0}$ is $\varphi_{m}$. Cylindrical coordinate system
$(r,\varphi,z)$ is chosen for analytical considerations so that
$\textbf{H}_{0}$ directed along $\varphi=0$ and $z$ axis is normal to the film
surface. Cartesian coordinate system $(x,y,z)$ is chosen for micromagnetic
modeling and complements the cylindrical one with $x$ axis aligned along H0
and $z$ axis being along the film normal.

The impact of the laser pulse is considered as a relative reduction of the
magnetic parameters $M_{s}$ and $K_{u}$, as it was experimentally observed for
metallic thin films [21, 22, 23, 24]. In experiments, the initial reduction of
the parameters occurs in less than 2 ps [21, 22]. The process is at least an
order of magnitude faster than the typical period of the excited precession in
ferromagnets and low-energy spin waves considered in this work. Thus, we use
the instantaneous laser-induced reduction of $M_{s}$ and $K_{u}$ in the
following consideration. The maximum values of the reduction are assumed to be
$\Delta M_{s}$ and $\Delta K_{u}$ for the parameters $M_{s}$ and $K_{u}$,
respectively. After the reduction, the magnetic parameters recover to their
equilibrium values with a characteristic time of hundreds of picoseconds [22,
23, 24]. The time is an order of magnitude longer than the period of the
considered low-energy SWs. Therefore, this recovery process leads to time
evolution of SW frequency inside pump spot [23], but does not affect the
initial asymmetry of phase and amplitude of SW, which is of prime interest
here. Therefore, we used a Heaviside step function $\Theta(t)$ for the
temporal laser-induced evolution of $M_{s}$ and $K_{u}$ with $t=0$ as the time
moment of pulse arrival, which is an appropriate approximation to describe the
experimental data [7]. The spatial profiles of $\Delta M_{s}$ and $\Delta
K_{u}$ are assumed to be round with a Gaussian distribution
$G(r)=\exp\left[-0.5(r/\sigma)^{2}\right]$ similar to the typical intensity
distribution of the pump in all-optical experiments [25, 7, 9, 26, 27]. Here
$\sigma$ characterizes the radius of the pump spot. The thickness of the film
is taken to be less than the penetration depth of light at pump’s wavelength
to prevent excitation of standing spin waves observed experimentally for thick
films [8, 28]. Hence, the variation of $\Delta M_{s}$ and $\Delta K_{u}$ along
$z$ axis can be neglected. The resulting spatial-temporal profile of magnetic
parameters is

$P(r,\varphi,t)=P-\Delta PG(r)\Theta(t)=P(r,t),$ (1)

where $P$ stands for $M_{s}$ or $K_{u}$. We omit the dependence on the pump’s
polarization, as we consider the laser-induced thermal change of magnetic
parameters at normal incidence of the pump, which is valid for experiments
with metallic thin films [25, 29, 23, 24, 30].

It should be noted that the minimum accessible value of $\sigma$ corresponds
to the diffraction limit and is of a hundred nanometers. Typically, the range
of wavenumbers for optically excited SW propagating laterally has the upper
limit of $\sqrt{2}/\sigma$ [29, 25, 31, 14]. Thus, wavenumbers lesser than 10
rad/$\mu$m are reported in optical experiments, which corresponds to the
magnetostatic type of SW. Nonetheless, exchange perpendicular standing SW are
accessible by optical excitation in flat metal films [8, 28] and complex
dielectric structures [32] along with the recently demonstrated optically
excited high-speed exchange SW in antiferromagnetic dielectric [33]. Such
waves do not propagate laterally in the experiments and are omitted from the
consideration below.

###  I.2 Azimuthal symmetry of the laser-induced torque

The lateral symmetry of the laser-induced SW is defined by the symmetry of
initial torque T($r,\varphi$), acting on M at time moment right after the pump
excitation $t=0+$ [13, 6]. Non-zero T($r,\varphi$) in the considered system is
the result of an abrupt change of the total Gibbs energy $F$ due to pump-
induced ultrafast heating and can be found as [34]:

$\textbf{T}=\frac{\partial F}{\partial\varphi_{m}}.$ (2)

Here $F$ contains the terms, corresponding to change of: (i) Zeeman energy
$F_{H}$ due to ultrafast demagnetization; (ii) uniaxial magnetic anisotropy
energy $F_{u}$ due to change of anisotropy parameter; (iii) magnetostatic
energy $F_{dM}$ due to spatial distribution of laser-induced demagnetization
[13]. The total free energy is the sum of the above terms:
$F=F_{H}+F_{u}+F_{dM}$. Hence, the total torque T is a sum of the
corresponding terms $\textbf{T}_{H},\textbf{T}_{u}$, and $\textbf{T}_{dM}$,
defined in accordance with Eq. (2).

The terms $F_{H}$ and $F_{u}$ have the following forms in the considered
geometry:

$\displaystyle F_{H}=-\mu_{0}M_{s}H_{0}\cos\varphi_{m},$ $\displaystyle
F_{u}=K_{u}\sin^{2}(\varphi_{a}-\varphi_{m}).$ (3)

Here, angle $\varphi_{m}$ depends on $\varphi_{a}$, as the system is in
equilibrium without laser excitation at $t<0$:

$\textbf{T}(t<0)=\textbf{T}_{H}+\textbf{T}_{u}\\\
=[\mu_{0}M_{s}H_{0}\sin\varphi_{m}-K_{u}\sin(2\varphi_{a}-2\varphi_{m})]\hat{\textbf{z}}=0,$
(4)

where $\hat{\textbf{z}}$ is a unit vector along $z$ axis.

The exact analytical expression for $F_{dM}(r,\varphi)$ cannot be obtained in
the general case due to its long-range dipole-dipole nature, but could be
found numerically with micromagnetic simulations. To simplify the analytical
consideration, we use an approximation from Ref. [13]. In particular, we
assume that pump-induced demagnetization produces a magnetic dipole
$\delta\textbf{M}$ with orientation opposite to M placed at $r=0$ (Fig. 1 a)
and having temporal dependence $\Theta(t)$. Thus, $F_{dM}$ could be
represented as Zeeman energy of M in magnetic field $\textbf{H}_{dM}$ produced
by the dipole $\delta\textbf{M}$:

$F_{dM}=-\mu_{0}\textbf{M}\cdot\textbf{H}_{dM},$ (5)

where $\textbf{H}_{dM}$ has a form [35]:

$\textbf{H}_{dM}=\frac{1}{4\pi}\left[3\frac{(\delta\textbf{M}\cdot\textbf{r})\textbf{r}}{r^{5}}-\frac{\delta\textbf{M}}{r^{3}}\right].$
(6)

For the following consideration of the spatial distribution
$\textbf{T}(r,\varphi)$ we notice that H0, M, and the effective anisotropy
field are aligned in $xy$ plane at a time $t\leq 0$. Thus, right after the
excitation T has non-zero $z$-component only, $i.e.$
$\textbf{T}=T\hat{\textbf{z}}$. Since the SW initial phase and amplitude
distribution is defined by T at $t=0+$, we address directly to its $z$
component $T(r,\varphi)$ below.

Equations (1-4) give the next spatial distribution of torque $T_{H}+T_{u}$ at
$t=0+$:

$T_{H}(r,\varphi)+T_{u}(r,\varphi)\\\ =-\left[\mu_{0}\Delta
M_{s}H_{0}\sin\varphi_{m}-\Delta
K_{u}\sin(2\varphi_{a}-2\varphi_{m})\right]G(r)\\\ =T_{H}(r)+T_{u}(r).$ (7)

The equation gives an azimuthally isotropic spatial distribution of torque
$T_{H}+T_{u}$ with Gaussian dependence on $r$ (Fig.1b). Whereas, Eqs.(2,5,6)
give:

$T_{dM}(r,\varphi)=\\\ -\frac{3\mu_{0}}{4\pi r^{3}}\delta M\left[M_{s}-\Delta
M_{s}G(r)\right]\sin{(2\varphi-2\varphi_{m})}.$ (8)

The distribution of this torque is azimuthally anisotropic with 4-fold
symmetry of $\sin{(2\varphi)}$ (Fig.1 c). In addition, $T_{dM}$ has a radial
multiplier of $r^{-3}$ in contrast to the pure Gaussian profile of other
torques. Furthermore, the magnitude of $\delta M$ depends on the size of
demagnetized area, $i.e.$ on radius of the pump $\sigma$.

We note, the equations of $F_{dM}$ and $T_{dM}$ account for the
demagnetization twice, in $\Delta M$ and $\delta M$ both. It affects the
magnitude of the torque $\textbf{T}_{dM}$, but not on its direction and
spatial symmetry. Thus, we discuss the asymmetry of total torque qualitatively
in this section. The quantitative analysis based on micromagnetic calculations
is presented in Sec. II.

To summarize, the pump-induced torque $T(r,\varphi)$ is a linear combination
of azimuthally isotropic and anisotropic terms (7,8). This means that there
can be a combination of the parameters, when the torques (7) and (8) cancel
each other out in a direction $\varphi_{i}$, while they add up at
$\varphi_{i}\pm\pi/2$. It produces a pronounced asymmetry of the total torque
(Fig.1 d,e). Furthermore, the ratio of the torques (7,8) is defined by the
values of $\Delta M_{s},\Delta K_{u},$ and $\varphi_{a}$, which, in turn, are
tunable with the magnitude and orientation of $\textbf{H}_{0}$. We demonstrate
the tuning with micromagnetic simulations in Sec. IIB. Finally, all this
affects the pattern of excited SW, as discussed in Sec. II.4.

###  I.3 Radial profile of the laser-induced torque

In addition to the difference of azimuth dependencies, terms $T_{H}+T_{u}$ and
$T_{dM}$ possess distinct radial distributions. While $T_{H}+T_{u}$ [Eq. (7)]
follows the Gaussian distribution, $T_{dM}$ [Eq. (8)] has an additional factor
$r^{-3}$. In combination with the distinct symmetry of these two
contributions, this leads to the existence of an angle $\varphi_{i}$, where
the total torque $T(r,\varphi_{i})\neq 0$ and preserves its sign at any $r$,
while $T(r,\varphi_{i}\pm\pi/2)=0$ at solitary $r=r_{i}$ and changes sign at
this point (Fig.1f). The value of $r_{i}$ is variable with the pump’s spot
radius $\sigma$, as the latter tunes $G(r)$ in Eqs. (7) and (8), while the
factor $r^{-3}$ in Eq. (8) remains unchanged. Therefore, upon excitation with
the round laser spot having Gaussian radial distribution, the total induced
torque acquires non-Gaussian radial profile (Fig.1d,e). This, in turn, affects
the SW pattern in reciprocal space, since the latter is controlled by the
spatial distribution of the driving torque [6].

In the next section, we present results of the micromagnetic modeling to
confirm the above analytical predictions about the SW asymmetry tuning with
the magnitude and orientation of external field H0 and the pump’s spot radius
$\sigma$.

##  II Micromagnetic modeling

###  II.1 Comparison with analytical predictions

To illustrate the analytical considerations of the previous section, we
performed micromagnetic simulations with the parameters of the material close
to those of permalloy at room temperature [36, 37]: $M_{s}=800$ kA/m,
$K_{u}=1$ kA/m3, exchange stiffness $A=1.3\cdot 10^{-11}$ J/m, Gilbert damping
parameter $0.01$. Following experimental observations, the power law

$\frac{K_{u}(\textbf{r},t=0+)}{K_{u}(\textbf{r},t<0)}=\left[\frac{M_{s}(\textbf{r},t=0+)}{M_{s}(\textbf{r},t<0)}\right]^{a}$

is preserved for metallic films in experiments with femtosecond laser heating
[22, 23, 24]. Here, we assume the power $a=3$ corresponding to the case of
uniaxial anisotropy [38]. The demagnetization magnitude $\Delta M_{s}$ is
taken to be 10 % to be close to typical experimentally observed values, which
gives $\Delta K_{u}=27.1\%$. In simulations, we used the thickness of the film
of 10 nm. A cell size of $5\times 5\times 10$ nm3 is chosen to be smaller than
both the magnetostatic exchange length $\sqrt{2A/(\mu_{0}M_{s}^{2})}=5.7$ nm
and the magnetocrystalline exchange length $\sqrt{A/K_{u}}=360$ nm [39] in
lateral directions. The infinite size of the film along $x$ and $y$ axes is
modeled with 2D periodic boundary conditions. Micromagnetic simulations are
performed using the Object Oriented MicroMagnetic Framework (OOMMF) [40].

To compare the simulation results with analytical predictions for the symmetry
of the term $T_{H}+T_{u}$, we set $\varphi_{a}\neq 0,\pm\pi/2$, and assume
$\Delta M_{s}=0$ to eliminate the contribution of $T_{dM}$. For simulation of
$T_{dM}(x,y)$, we assume $\varphi_{a}=0$ to get $T_{H}+T_{u}=0$, as
$\varphi_{m}=0$ in this case, following the Eq. (4). The symmetries of modeled
torques $T_{H}+T_{u}$ and $T_{dM}$ fully comply with the analytical model
(Fig. 2a,b). Moreover, the total torque $T$ has an asymmetric azimuthal
distribution with non-monotonic radial dependence for certain $\varphi$,
$e.g.$ $\varphi=-\pi/4$ (Fig.2 c), as predicted in Sec. IB,C.

Figure 2:  Micromagnetic modeling of spatial distribution of normalized
$z$-component of initial torque $T$ at $t=0+$, $\mu_{0}H_{0}=100$ mT, and
$\sigma=1\mu$m with next sets of parameters: (a) $\varphi_{a}=\pi/12,\Delta
M_{s}=0,\Delta K_{u}\neq 0$; (b): $\varphi_{a}=0,\Delta M_{s}\neq 0,\Delta
K_{u}\neq 0$; (c): $\varphi_{a}=\pi/12,\Delta M_{s}\neq 0,\Delta K_{u}\neq 0$.

###  II.2 Phase and amplitude asymmetry of the laser-induced torque

As follows from Eqs. (7) and (8), it is possible to tune the space symmetry of
$T$ through the magnitude and orientation of the external field ${\bf H}_{0}$.
In particular, $H_{0}$ and angle $\varphi_{a}$ affect the magnitude of torque
$T_{H}+T_{u}$ (7), while the magnitude of $T_{dM}$ (8) is insensitive to
$\varphi_{a}$. For example, if M is parallel to H0 at $\varphi_{a}=0$, then
the isotropic contribution $T_{H}+T_{u}$ in T is absent (Fig.2 b), as
$\varphi_{m}=0$ in Eqs. (4,7). Alternatively, $T_{H}+T_{u}$ tends to zero in
Eq. (7), if M is almost aligned with the easy anisotropy axis
($\varphi_{m}=\varphi_{a}$) at rather low $H_{0}$, again resulting in a
dominant 4-fold symmetry of the total torque, as shown in Fig.3a. A similar
situation occurs if $\varphi_{a}$ is close to $\pi/2$, and $H_{0}$ is high
enough to set $\varphi_{m}=0$ in Eq. (4), $i.e.$ $H_{0}>2K_{u}/(\mu_{0}M_{s})$
(Fig.3 d). In turn, the azimuthally isotropic contribution $T_{H}+T_{u}$
becomes more prominent at $\varphi_{a}\approx\pi/2$ in a low field
$H_{0}<2K_{u}/(\mu_{0}M_{s})$ (Fig.3 b) and at intermediate values of
$\varphi_{a}$ even in a high field (Fig.3 c). Thus, fine control of an
external magnetic field magnitude as well as its direction with respect to the
anisotropy axis enables a direct manipulation of symmetry of phase and
amplitude patterns of optically excited SW in anisotropic thin films.

Figure 3:  Micromagnetic modeling of spatial distribution of normalized
$z$-component of initial torque $T$ at $t=0+$, $\sigma=2\,\mu$m, and various
external fields $\textbf{H}_{0}$: (a) $\varphi_{a}=\pi/12$, $\mu_{0}H_{0}=3$
mT; (b) $\varphi_{a}=17\pi/36$, $\mu_{0}H_{0}=3$ mT; (c) $\varphi_{a}=\pi/12$,
$\mu_{0}H_{0}=100$ mT; (d) $\varphi_{a}=17\pi/36$, $\mu_{0}H_{0}=100$ mT.

###  II.3 Wavevector asymmetry and impact of laser spot’s diameter

The analytical model in Sec. I.3 predicts the shaping of the spatial
distribution of the driving torque $T$ beyond the Gaussian distribution of the
absorbed laser fluence. In particular, the pump’s radius $\sigma$ defines the
ratio between the terms $T_{H}+T_{u}$ and $T_{dM}$ in the total initial torque
$T(r,\varphi)$ even if the laser spot is round. Indeed, the variation of
$\sigma$ varies not only the spatial distribution of torque $T(x,y)$ (Fig.
4a,b), but also its spectrum in reciprocal space $\widetilde{T}(\textbf{k})$
(Fig. 4c,d). As predicted analytically, the distributions demonstrate a
solitary radial coordinate $r_{i}$ in a direction $\varphi_{i}$ at which the
total torque switched its sign ($\varphi_{i}\approx-\pi/4$ in Fig. 4a,b). This
results in the highly non-monotonic distribution of the magnitude of
$\widetilde{T}(k)$ along the direction $\varphi_{i}$ with local spectral
density maximum at $k>0$ (red lines in Fig. 4c,f). At a direction
$\varphi_{i}+\pi/2$ the distribution $\widetilde{T}(k)$ is also non-monotonic,
but possess the single maxima at smaller wavenumber $k$ (blue lines in Fig.
4c,f). Thus, driving torque in reciprocal space $\widetilde{T}(\textbf{k})$
appears to be asymmetric.

Figure 4:  (a,b) Micromagnetic modeling of spatial distribution of normalized
$z$-component of initial torque $T$ at $t=0+$, $\mu_{0}H_{0}=100$ mT,
$\varphi_{a}=\pi/12$, and $\sigma=1\mu$ m (a) and 2 $\mu$ m (b). (c,d)
Normalized two-dimensional fast Fourier transforms (FFT) of $T(x,y)$ on panels
(a) and (b), respectively. (e,f) Normalized radial distributions of FFT($T$)
at $\varphi=\pm\pi/4$ (blue and red lines) and Fourier transform of Gaussian
function $G(r)$ (gray dashed lines) at $\sigma=1\mu$ m (e) and 2 $\mu$ m (f).

Moreover, maxima of the spectral density $\widetilde{T}(\textbf{k})$ are
shifted to higher $k$ as compared to a Gaussian distribution of the symmetric
driving torque (Fig. 4e,f). It means that the combination of torques
$T_{H}+T_{u}$ and $T_{dM}$ leads to a higher excitation efficiency for SW with
higher wavenumbers $k$, in contrast to Gaussian distribution with the maximum
excitation efficiency at $k=0$. Principally, the combination of the parameters
could bring $\widetilde{T}(\textbf{k})$ to almost uniaxial pattern in
reciprocal space. It resembles the situation where $\widetilde{T}(\textbf{k})$
is tunable with different values of $\sigma$ along $x$ and $y$ axes, $i.e.$ by
varying the shape of the pump’s spot [6] to get a quasi-plane SW pattern in
real space [41, 16].

###  II.4 Asymmetry of the laser-indiced spin waves

Figure 5:  Micromagnetic modeling of SW propagation at $\mu_{0}H_{0}=100$mT.
(a-d) Spatial distributions of the out-of-plane component of magnetization
$M_{z}(x,y)$ at $t=1$ ns at various values of $\varphi_{a}$ and $\sigma$,
shown on panels. (e-h) Two-dimensional fast Fourier transforms of $M(x,y)_{z}$
on panels (a-d), respectively.

Finally, we demonstrate how the spatial symmetry of the spin waves changes
upon tuning of the initial torque’s symmetry, discussed above. We consider the
spatial distribution of the out-of-plane component $M_{z}$ and its two-
dimensional Fourier transform (Fig. 5). In particular, the intermediate value
of $\varphi_{a}\neq 0,\pm\pi/2$ gives the asymmetric patterns of SW (Fig. 5
a,b) in correspondence with the discussion in Sec. II.2. Moreover, in
agreement with the consideration in Sec. II.3, the asymmetry of SW pattern
varies with the diameter of the pump spot. The variation is seen clearly in
reciprocal space: the wider spot (Fig. 5 f) excites SW with almost uniaxial
distribution of wavevectors with the axis close to $k_{x}=-k_{y}$
($\varphi=-\pi/4$ in real space), while the smaller spot (Fig. 5 e) results in
a more complex symmetry. It reproduces the interplay between isotropic and
anisotropic terms in T (Sec. II.3). Notably, the quasi-uniaxial
$\widetilde{T}(\textbf{k})$ at $\sigma=2\,\mu$m and $\varphi_{a}=\pi/12$ (Fig.
4d) reveals the elongated SW pattern in real space (Fig. 5b), as predicted. On
the contrary, there is the 4-fold symmetry of SW pattern in real space for
various $\sigma$ if $\varphi_{a}$ is close to $\pi/2$ (Fig. 5 c,d). It is in
good agreement with the discussion in Sec. II.2, as the isotropic contribution
$T_{H}+T_{u}$ diminishes when the angle and/or magnitude of $\textbf{H}_{0}$
favors the alignment of M with $\textbf{H}_{0}$. Thus, the distribution of
$\widetilde{M}_{z}(\textbf{k})$ in reciprocal space is close to the 4-fold
symmetry as well (Fig. 5 g,h) in consistence with $\sin(2\varphi)$-symmetry of
term $T_{dM}$ (8). The deviation of pattern $\widetilde{M}_{z}(\textbf{k})$
from pure $\sin(2\varphi)$-symmetry, $i.e.$ with maxima along
$\varphi=\pm\pi/4$, is due to anisotropic dispersion of magnetostatic waves.
In particular, the waves possess different signs of group velocity along $x$
and $y$ directions [42] with the formation of caustics in intermediate
$\varphi\neq\pm\pi/4$ defined by $H_{0}$. Notably, the caustics’ formation is
recently observed also in experiments with a comb of ultrashort laser pulses
[26, 27].

## Conclusion

We show analytically, that the symmetry of laser-excited SW is defined not
only by the shape of the optical pump’s spot but also by the symmetries of
contributions to the excitation torque. This enables the tuning of SW pattern
with orientation and magnitude of the external magnetic field, and the size of
the pump’s spot without variation of its shape. The results of analytical
considerations are in good agreement with micromagnetic modeling using
realistic geometric and magnetic parameters of a thin ferromagnetic metallic
film at femtosecond laser fluence. Hence, the discussed effects could be
measured in the experiments with time-resolved scanning magneto-optical Kerr
microscopy [7, 25, 11, 9, 29, 8, 43]. In particular, the technique obtains the
spatial-temporal distribution of out-of-plane component of magnetization
$M_{z}$ after laser excitation with sub-micrometer and sub-picosecond
resolution in space and time. The distribution $M_{z}(x,y,t)$ contains
information about the initial torque T, discussed here. From a practical
perspective, our results add a degree of freedom in the design of
reconfigurable magnonic circuits [3]. In particular, we show how the variation
of the external magnetic field and laser spot diameter allows us to actively
control the initial phase, amplitude, and wavenumbers of SW in different
directions. As a final remark, we note that the heat-induced change of
magnetic anisotropy is a general mechanism inherent to materials of various
nature and is not limited to metals only [44, 45], which further expands the
practical perspectives of the effects considered. Furthermore, the proposed
analytical approach is rather general and allows the consideration of
additional contributions that arise from $e.g.$ opto-magnetic effects in
nonmetallic media [46, 47, 20]. Nevertheless, full consideration of stray
fields in complex geometries $e.g.$ near the boundaries of waveguides or
magnetic defects (domain boundaries, skyrmions, etc.) possible in numerical
modeling or with more specific theoretical approaches [48, 49, 50, 37, 51,
52].

## ACKNOWLEDGMENTS

N.E.Kh. and Ia.A.F. acknowledge financial support from the Russian Science
Foundation (Project 22-22-00326, https://rscf.ru/en/project/22-22-00326/).

## COMPETING INTERESTS

The authors declare no competing interests.

## author contributions

Nikolai E. Khokhlov: Conceptualization, Methodology, Investigation, Software,
Writing- Original draft preparation (equal), Writing- Reviewing and Editing
(equal). Iaroslav A. Filatov: Data curation, Visualization, Writing – Original
draft preparation (equal); Alexandra M. Kalashnikova: Supervision; Writing –
Reviewing and Editing (equal).

## Data availability statement

The data that support the findings of this study are available from the
corresponding author upon reasonable request.

## References

  * Kruglyak  _et al._ [2010] V. V. Kruglyak, S. O. Demokritov, and D. Grundler, Magnonics, Journal of Physics D: Applied Physics 43, 264001 (2010).
  * Chumak  _et al._ [2022] A. V. Chumak, P. Kabos, M. Wu, C. Abert, C. Adelmann, A. O. Adeyeye, J. Åkerman, F. G. Aliev, A. Anane, A. Awad, C. H. Back, A. Barman, G. E. W. Bauer, _et al._ , Advances in magnetics roadmap on spin-wave computing, IEEE Transactions on Magnetics 58, 1 (2022).
  * Grundler [2015] D. Grundler, Reconfigurable magnonics heats up, Nature Physics 11, 438 (2015).
  * Grachev  _et al._ [2023] A. Grachev, S. Sheshukova, M. Kostylev, S. Nikitov, and A. Sadovnikov, Reconfigurable dipolar spin-wave coupling in a bilateral yttrium iron garnet structure, Phys. Rev. Appl. 19, 054089 (2023).
  * Gubanov  _et al._ [2023] V. A. Gubanov, V. V. Kruglyak, S. E. Sheshukova, V. D. Bessonov, S. A. Nikitov, and A. V. Sadovnikov, Frequency-selective spin-wave propagation in magnonic waveguide with a local laser-heated region, Phys. Rev. B 107, 024427 (2023).
  * Satoh  _et al._ [2012] T. Satoh, Y. Terui, R. Moriya, B. A. Ivanov, K. Ando, E. Saitoh, T. Shimura, and K. Kuroda, Directional control of spin-wave emission by spatially shaped light, Nature Photonics 6, 662 (2012).
  * Au  _et al._ [2013] Y. Au, M. Dvornik, T. Davison, E. Ahmad, P. S. Keatley, A. Vansteenkiste, B. Van Waeyenberge, and V. V. Kruglyak, Direct excitation of propagating spin waves by focused ultrashort optical pulses, Physical review letters 110, 097201 (2013).
  * Kamimaki  _et al._ [2017a] A. Kamimaki, S. Iihama, Y. Sasaki, Y. Ando, and S. Mizukami, Micro-focused pulse laser-induced propagating spin waves in permalloy films with different thicknesses, IEEE Transactions on Magnetics 53, 1 (2017a).
  * Iihama  _et al._ [2016] S. Iihama, Y. Sasaki, A. Sugihara, A. Kamimaki, Y. Ando, and S. Mizukami, Quantification of a propagating spin-wave packet created by an ultrashort laser pulse in a thin film of a magnetic metal, Phys. Rev. B 94, 020401(R) (2016).
  * Filatov  _et al._ [2020] I. A. Filatov, P. Gerevenkov, M. Wang, A. Rushforth, A. Kalashnikova, and N. Khokhlov, Spectrum evolution of magnetostatic waves excited through ultrafast laser-induced heating, in  _Journal of Physics: Conference Series_, Vol. 1697 (IOP Publishing, 2020) p. 012193.
  * Filatov  _et al._ [2022] I. A. Filatov, P. I. Gerevenkov, M. Wang, A. W. Rushforth, A. M. Kalashnikova, and N. E. Khokhlov, Spectrum evolution and chirping of laser-induced spin wave packets in thin iron films, Applied Physics Letters 120, 112404 (2022).
  * Hashimoto  _et al._ [2017] Y. Hashimoto, S. Daimon, R. Iguchi, Y. Oikawa, K. Shen, K. Sato, D. Bossini, Y. Tabuchi, T. Satoh, B. Hillebrands, _et al._ , All-optical observation and reconstruction of spin wave dispersion, Nature communications 8, 15859 (2017).
  * Hashimoto  _et al._ [2018] Y. Hashimoto, T. H. Johansen, and E. Saitoh, Phase-resolved spin-wave tomography, Applied Physics Letters 112, doi.org/10.1063/1.5018091 (2018).
  * Jäckl  _et al._ [2017] M. Jäckl, V. I. Belotelov, I. A. Akimov, I. V. Savochkin, D. R. Yakovlev, A. K. Zvezdin, and M. Bayer, Magnon accumulation by clocked laser excitation as source of long-range spin waves in transparent magnetic films, Phys. Rev. X 7, 021009 (2017).
  * Hioki  _et al._ [2020] T. Hioki, Y. Hashimoto, and E. Saitoh, Bi-reflection of spin waves, Communications Physics 3, 1 (2020).
  * Hioki  _et al._ [2022] T. Hioki, Y. Hashimoto, and E. Saitoh, Coherent oscillation between phonons and magnons, Commun Phys 5, 115 (2022).
  * Wong  _et al._ [2014] K. L. Wong, L. Bi, M. Bao, Q. Wen, J. P. Chatelon, Y.-T. Lin, C. A. Ross, H. Zhang, and K. L. Wang, Unidirectional propagation of magnetostatic surface spin waves at a magnetic film surface, Applied Physics Letters 105, 232403 (2014).
  * Kolosvetov  _et al._ [2022] A. Kolosvetov, M. Kozhaev, I. Savochkin, V. Belotelov, and A. Chernov, Concept of the optomagnonic logic operation, Phys. Rev. Applied 18, 054038 (2022).
  * Kolosvetov and Chernov [2023] A. Kolosvetov and A. Chernov, Nor and majority optomagnonic logic gates, IEEE Transactions on Magnetics , 1 (2023).
  * Yoshimine  _et al._ [2014] I. Yoshimine, T. Satoh, R. Iida, A. Stupakiewicz, A. Maziewski, and T. Shimura, Phase-controllable spin wave generation in iron garnet by linearly polarized light pulses, Journal of Applied Physics 116, 043907 (2014).
  * Beaurepaire  _et al._ [1996] E. Beaurepaire, J.-C. Merle, A. Daunois, and J.-Y. Bigot, Ultrafast spin dynamics in ferromagnetic nickel, Phys. Rev. Lett. 76, 4250 (1996).
  * Carpene  _et al._ [2010] E. Carpene, E. Mancini, D. Dazzi, C. Dallera, E. Puppin, and S. De Silvestri, Ultrafast three-dimensional magnetization precession and magnetic anisotropy of a photoexcited thin film of iron, Phys. Rev. B 81, 060415(R) (2010).
  * Gerevenkov  _et al._ [2021] P. I. Gerevenkov, D. V. Kuntu, I. A. Filatov, L. A. Shelukhin, M. Wang, D. P. Pattnaik, A. W. Rushforth, A. M. Kalashnikova, and N. E. Khokhlov, Effect of magnetic anisotropy relaxation on laser-induced magnetization precession in thin galfenol films, Phys. Rev. Materials 5, 094407 (2021).
  * Shelukhin  _et al._ [2020] L. Shelukhin, N. A. Pertsev, A. Scherbakov, D. Kazenwadel, D. Kirilenko, S. Hämäläinen, S. van Dijken, and A. Kalashnikova, Laser-induced magnetization precession in individual magnetoelastic domains of a multiferroic ${\mathrm{co}}_{40}{\mathrm{fe}}_{40}{\mathrm{b}}_{20}/{\mathrm{ba}\mathrm{ti}\mathrm{o}}_{3}$ composite, Phys. Rev. Appl. 14, 034061 (2020).
  * Khokhlov  _et al._ [2019] N. E. Khokhlov, P. I. Gerevenkov, L. A. Shelukhin, A. V. Azovtsev, N. A. Pertsev, M. Wang, A. W. Rushforth, A. V. Scherbakov, and A. M. Kalashnikova, Optical excitation of propagating magnetostatic waves in an epitaxial galfenol film by ultrafast magnetic anisotropy change, Physical Review Applied 12, 044044 (2019).
  * Muralidhar  _et al._ [2021] S. Muralidhar, R. Khymyn, A. A. Awad, A. Alemán, D. Hanstorp, and J. Åkerman, Femtosecond laser pulse driven caustic spin wave beams, Phys. Rev. Lett. 126, 037204 (2021).
  * Khramova  _et al._ [2023] A. E. Khramova, M. Kobecki, I. A. Akimov, I. V. Savochkin, M. A. Kozhaev, A. N. Shaposhnikov, V. N. Berzhansky, A. K. Zvezdin, M. Bayer, and V. I. Belotelov, Tuning the directionality of spin waves generated by femtosecond laser pulses in a garnet film by optically driven ferromagnetic resonance, Phys. Rev. B 107, 064415 (2023).
  * Van Kampen  _et al._ [2002] M. Van Kampen, C. Jozsa, J. Kohlhepp, P. LeClair, L. Lagae, W. De Jonge, and B. Koopmans, All-optical probe of coherent spin waves, Physical review letters 88, 227201 (2002).
  * Kamimaki  _et al._ [2017b] A. Kamimaki, S. Iihama, Y. Sasaki, Y. Ando, and S. Mizukami, Reciprocal excitation of propagating spin waves by a laser pulse and their reciprocal mapping in magnetic metal films, Phys. Rev. B 96, 014438 (2017b).
  * Shelukhin  _et al._ [2022] L. A. Shelukhin, R. R. Gareev, V. Zbarsky, J. Walowski, M. Münzenberg, N. A. Pertsev, and A. M. Kalashnikova, Spin reorientation transition in CoFeB/MgO/CoFeB tunnel junction enabled by ultrafast laser-induced suppression of perpendicular magnetic anisotropy, Nanoscale (2022).
  * Chernov  _et al._ [2017] A. Chernov, M. Kozhaev, I. Savochkin, D. Dodonov, P. Vetoshko, A. Zvezdin, and V. Belotelov, Optical excitation of spin waves in epitaxial iron garnet films: Mssw vs bvmsw, Optics letters 42, 279 (2017).
  * Chernov  _et al._ [2020] A. I. Chernov, M. A. Kozhaev, D. O. Ignatyeva, E. N. Beginin, A. V. Sadovnikov, A. A. Voronov, D. Karki, M. Levy, and V. I. Belotelov, All-dielectric nanophotonics enables tunable excitation of the exchange spin waves, Nano letters 20, 5259 (2020).
  * Hortensius  _et al._ [2021] J. Hortensius, D. Afanasiev, M. Matthiesen, R. Leenders, R. Citro, A. Kimel, R. Mikhaylovskiy, B. Ivanov, and A. Caviglia, Coherent spin-wave transport in an antiferromagnet, Nature physics 17, 1001 (2021).
  * Cullity and Graham [2009] B. Cullity and C. Graham,  _Introduction to Magnetic Materials, 2nd Edition_ (IEEE Press, 2009).
  * Coey [2010] J. M. Coey,  _Magnetism and magnetic materials_ (Cambridge university press, 2010).
  * Zhao  _et al._ [2016] Y. Zhao, Q. Song, S.-H. Yang, T. Su, W. Yuan, S. S. P. Parkin, J. Shi, and W. Han, Experimental investigation of temperature-dependent gilbert damping in permalloy thin films, Sci. Rep. 6, 22890 (2016).
  * Han  _et al._ [2009] D.-S. Han, S.-K. Kim, J.-Y. Lee, S. J. Hermsdoerfer, H. Schultheiss, B. Leven, and B. Hillebrands, Magnetic domain-wall motion by propagating spin waves, Appl. Phys. Lett. 94, 112502 (2009).
  * Zener [1954] C. Zener, Classical theory of the temperature dependence of magnetic anisotropy energy, Physical Review 96, 1335 (1954).
  * Abo  _et al._ [2013] G. S. Abo, Y.-K. Hong, J. Park, J. Lee, W. Lee, and B.-C. Choi, Definition of magnetic exchange length, IEEE Trans. Magn. 49, 4937 (2013).
  * Donahue and Porter [1999] M. Donahue and D. G. Porter, OOMMF user’s guide, version 1.0, NIST Interagency Report No. 6376, National Institute of Standards and Technology, Gaithersburg, MD (1999), http://math.nist.gov/oommf.
  * Yoshimine  _et al._ [2017] I. Yoshimine, Y. Y. Tanaka, T. Shimura, and T. Satoh, Unidirectional control of optically induced spin waves, Europhysics Letters 117, 67001 (2017).
  * Damon and Eshbach [1961] R. W. Damon and J. R. Eshbach, Magnetostatic modes of a ferromagnet slab, Journal of Physics and Chemistry of Solids 19, 308 (1961).
  * Shichi  _et al._ [2015] S. Shichi, N. Kanazawa, K. Matsuda, S. Okajima, T. Hasegawa, T. Okada, T. Goto, H. Takagi, and M. Inoue, Spin wave isolator based on frequency displacement nonreciprocity in ferromagnetic bilayer, Journal of Applied Physics 117, 17D125 (2015).
  * Kalashnikova  _et al._ [2021] A. M. Kalashnikova, N. E. Khokhlov, L. A. Shelukhin, and A. V. Scherbakov, Ultrafast laser-induced control of magnetic anisotropy in nanostructures, Zhurnal Tekhnicheskoi Fiziki 91, 1848 (2021).
  * Shelukhin  _et al._ [2018] L. A. Shelukhin, V. V. Pavlov, P. A. Usachev, P. Y. Shamray, R. V. Pisarev, and A. M. Kalashnikova, Ultrafast laser-induced changes of the magnetic anisotropy in a low-symmetry iron garnet film, Physical Review B 97, 014422 (2018).
  * Kirilyuk  _et al._ [2010] A. Kirilyuk, A. V. Kimel, and T. Rasing, Ultrafast optical manipulation of magnetic order, Rev. Mod. Phys. 82, 2731 (2010).
  * Kalashnikova  _et al._ [2015] A. M. Kalashnikova, A. V. Kimel, and R. V. Pisarev, Ultrafast optomagnetism, Usp. Fiz. Nauk 185, 1064 (2015).
  * Vasiliev  _et al._ [2007] S. Vasiliev, V. Kruglyak, M. Sokolovskii, and A. Kuchko, Spin wave interferometer employing a local nonuniformity of the effective magnetic field, Journal of Applied Physics 101, 113919 (2007).
  * Khokhlov  _et al._ [2021] N. Khokhlov, A. Khramova, I. A. Filatov, P. Gerevenkov, B. Klinskaya, and A. Kalashnikova, Néel domain wall as a tunable filter for optically excited magnetostatic waves, Journal of Magnetism and Magnetic Materials 534, 168018 (2021).
  * Gerevenkov  _et al._ [2023] P. Gerevenkov, I. Filatov, A. Kalashnikova, and N. Khokhlov, Unidirectional propagation of spin waves excited by femtosecond laser pulses in a planar waveguide, Phys. Rev. Appl. 19, 024062 (2023).
  * Hertel  _et al._ [2004] R. Hertel, W. Wulfhekel, and J. Kirschner, Domain-wall induced phase shifts in spin waves, Phys. Rev. Lett. 93, 257202 (2004).
  * Lan and Xiao [2021] J. Lan and J. Xiao, Skew scattering and side jump of spin wave across magnetic texture, Phys. Rev. B 103, 054428 (2021).


11institutetext: Abou-Bekr Belkaid University & LRIT Laboratory
Tlemcen, Algeria
11email: {abdelkrim.boudaoud, houari.mahfoud<EMAIL_ADDRESS>
# Towards a Complete Direct Mapping From Relational Databases To Property
Graphs

Abdelkrim Boudaoud  Houari Mahfoud  Azeddine Chikh

###### Abstract

It is increasingly common to find complex data represented through the graph
model. Contrary to relational models, graphs offer a high capacity for
executing analytical tasks on complex data. Since a huge amount of data is
still presented in terms of relational tables, it is necessary to understand
how to translate this data into graphs. This paper proposes a _complete
mapping_ process that allows transforming any relational database (schema and
instance) into a property graph database (schema and instance). Contrary to
existing mappings, our solution preserves the three fundamental mapping
properties, namely: _information preservation, semantic preservation_ and
_query preservation_. Moreover, we study mapping any _SQL_ query into an
equivalent _Cypher_ query, which makes our solution practical. Existing
solutions are either incomplete or based on non-practical query language.
Thus, this work is the first complete and practical solution for mapping
relations to graphs.

###### Keywords:

Direct mapping, Complete mapping, Relational database, Graph database, SQL,
Cypher

##  1 Introduction

Relational databases (RDs) have been widely used and studied by researchers
and practitioners for decades due to their simplicity, low data redundancy,
high data consistency, and uniform query language (SQL). Hence, the size of
web data has grown exponentially during the last two decades. The
interconnections between web data entities (e.g. interconnection between
YouTube videos or people on Facebook) are measured by billions or even
trillions [5] which pushes the relational model to quickly reach its limits as
querying high interconnected web data requires complex SQL queries which are
time-consuming. To overcome this limit, the graph database model is
increasingly used on the Web due to its flexibility to present data in a
normal form, its efficiency to query a huge amount of data and its analytic
powerful. This suggests studying a mapping from RDs to graph databases (GDs)
to benefit from the aforementioned advantages. This kind of mapping has not
received more attention from researchers since only a few works [12, 13, 3, 4]
have considered it. A real-life example of this mapping has been discussed in
[12]: “ _investigative journalists have recently found, through graph
analytics, surprising social relationships between executives of companies
within the Offshore Leaks financial social network data set, linking company
officers and their companies registered in the Bahamas. The Offshore Leaks PG
was constructed as a mapping from relational database (RDB) sources_ ”. In a
nutshell, the proposed mappings suffer from at least one of the following
limits : a) they do not study fundamental properties of mapping; b) they do
not consider a practical query language to make the approach more useful; c)
they generate an obfuscated schema.

This paper aims to provide a _complete mapping_ (_CM_) from RDs to GDs by
investigating the fundamental properties of mapping [13], namely :
_information preservation_ (IP), _query preservation_ (QP), and _semantic
preservation_ (SP). In addition to data mapping, we study the mapping of SQL
queries to Cypher queries which makes our results more practical since SQL and
Cypher are the most used query languages for relational and graph data
respectively.

Contributions and Road-map. Our main contributions are as follows : 1) we
formalize a _CM_ process that maps RDs to GDs in the presence of schema; 2) we
propose definitions of _schema graph_ and _graph consistency_ that are
necessary for this mapping; 3) we show that our _CM_ preserves the three
fundamental mapping properties (_IP_ , _SM_ , and _QP_); 4) in order to prove
_QP_ , we propose an algorithm to map SQL queries into equivalent Cypher
queries. To our knowledge, this work is the first complete effort that
investigates mapping relations to graphs.

Related Work. We classify previous works as follows:
Mapping RDs to RDF Data. Squeda et al. [11] studied the mapping of RDs to RDF
graph data and relational schema to OWL ontology’s. Moreover, SQL queries are
translated into SPARQL queries. They were the first to define a set of mapping
properties : information preservation, query preservation, semantic
preservation and monotonicity preservation. They proved first that their
mapping is information preserving and query preserving, while when it comes to
the two remaining properties, preserving semantics makes the mapping not
monotonicity preserving.
Mapping RDs to Graph Data. De Virgilio et al. [3, 4] studied mapping a) RDs to
property graph data (PG) by considering schema both in source and target; and
b) any SQL query into a set of graph traversal operations that realize the
same semantic over the resulted graph data.We remark that the proposed mapping
obfuscates the relational schema since the resulted graph schema is difficult
to understand. Moreover, the mapping does not consider typed data. From the
practical point of view, the graph querying language considered is not really
used in practice and the proposed query mapping depends on the syntax and
semantics of this language which makes hard the application of their proposal
for another query language. In addition, they apply an aggregation process
that maps different relational tuples to the same graph vertex in order to
optimize graph traversal operations. However, this makes the mapping not
information preserving and can skew the result of some analytical tasks that
one would like to apply over the resulted data graph.

Stoica et al.[12, 13] studied the mapping of RDs to GDs and any relational
query (formalized as an extension of relational algebra) into a G-core query.
Firstly, the choice of source and destination languages hinders the
practicability of the approach. Moreover, it is hard to see if the mapping is
semantic preserving since no definition of graph data consistency is given.
Attributes, primary and foreign keys are verbosely represented by the data
graph, which makes this later hard to understand and to query.

O.Orel et al. [10] discussed mapping relational data only into property graphs
without giving attention neither to schema nor mapping properties.

The Neo4j system provides a tool called Neo4j-ETL [1], which allows users to
import their relational data into Neo4j to be presented as property graphs.
Notice that the relational structure (both instance and schema) is not
preserved during this mapping since some tuples of the relational data (resp.
relations of the relational schema) are represented as edges for storage
concerns (as done in [4]). However, as remarked in [12], this may skew the
results of some analytical tasks (e.g. density of the generated graphs).
Moreover, Neo4j-ETL does not allow the mapping of queries. S. Li et al. [8]
study an extension of Neo4j-ETL by proposing mapping of SQL queries to Cypher
queries. However, their mapping inherits the limits of Neo4j-ETL. In addition,
no detailed algorithm is given for the query mapper which makes impossible the
comparison of their proposal with other ones. This is also the limit of [9].

Finally, Angles et al. [2] studied mappings RDF databases to property graphs
by considering both data and schema. They proved that their mapping ensures
both information and semantic preservation properties.

Table 1 summarizes most important features of related works.

Table 1: Comparative table of related works. Type | Work | Mapping |  | Preserved
---
properties
Mapping rules |  |  |  |  |  |  |  |  |
Schema | Instance | IP | QP | SP |  |  |  |  |  |  |
RDs $\rightarrow$ RDF | Sequeda et al. [11] | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |  |  |  |  |  |  |
De vergillio et al. [3, 4] | ✓ | ✓ |  |  |  | ✓ |  |  |  |  |  |  |
Stoica et al. [12, 13] | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |  |  |  |  |  |  |
RDF $\rightarrow$ PG | Angeles et al. [2] | ✓ | ✓ | ✓ |  | ✓ | ✓ |  |  |  |  |  |  |
RDs $\rightarrow$ PG | O.Orel et al. [10] |  | ✓ |  |  |  | ✓ |  |  |  |  |  |  |
S.Li et al. [8] |  | ✓ |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
Our Work | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |  |  |  |  |  |  |  |  |  |  |  |

##  2 Preliminaries

This section defines the several notions that will be used throughout this
paper.

Let $\mathcal{R}$ be an infinite set of relation names, $\mathcal{A}$ is an
infinite set of attribute names with a special attribute $tid$, $\mathcal{T}$
is a finite set of attribute types (_String_ , _Date_ , _Integer_ , _Float_ ,
_Boolean_ , _Object_), $\mathcal{D}$ is a countably infinite domain of data
values with a special value null.

###  2.1 Relational Databases

A _relational schema_ is a tuple $S=(R,A,T,\Sigma)$ where:

  1. 1.

$R\subseteq\mathcal{R}$ is a finite set of relation names;

  2. 2.

$A$ is a function assigning a finite set of attributes for each relation $r\in
R$ such that $A(r)\subseteq\mathcal{A}\backslash\\{tid\\}$;

  3. 3.

$T$ is a function assigning a type for each attribute of a relation, i.e. for
each $r\in R$ and each $a\in A(r)\setminus\\{tid\\}$,
$T(a)\subseteq\mathcal{T}$;

  4. 4.

$\Sigma$ is a finite set of _primary_ (PKs) and _foreign_ keys (FKs) defined
over $R$ and $A$. A _primary key_ over a relation $r\in R$ is an expression of
the form $r[a_{1},\cdots,a_{n}]$ where $a_{1\leq i\leq n}\in A(r)$. A _foreign
key_ over two relations $r$ and $s$ is an expression of the form
$r[a_{1},\cdots,a_{n}]\to s[b_{1},\cdots,b_{n}]$ where $a_{1\leq i\leq n}\in
A(r)$ and $s[b_{1},\cdots,b_{n}]\in\Sigma.$

An _instance_ $I$ of $S$ is an assignment to each $r\in R$ of a finite set
$I(r)=\\{t_{1},\cdots,t_{n}\\}$ of _tuples_. Each _tuple_
$t_{i}:A(r)\cup\\{tid\\}\rightarrow\mathcal{D}$ is identified by
$tid\neq\textsc{null}$ and assigns a value to each attribute $a\in A(r)$. We
use $t_{i}(a)$ (resp. $t_{i}(tid)$) to refer to the value of attribute $a$
(resp. $tid$) in tuple $t_{i}$. Moreover, for any tuples $t_{i},t_{j}\in
I(r)$, $t_{i}(tid)\neq t_{j}(tid)$ if $i\neq j$.

For any instance $I$ of a relational schema $S=(R,A,T,\Sigma)$, we say that
$I$ satisfies a primary key $r[a_{1},\cdots,a_{n}]$ in $\Sigma$ if: 1) for
each tuple $t\in I(r)$, $t(a_{{}_{1\leq i\leq n}})\neq\textsc{null}$; and 2)
for any $t^{{}^{\prime}}\in I(r)$, if $t(a_{{}_{1\leq i\leq
n}})=t^{{}^{\prime}}(a_{{}_{1\leq i\leq n}})$ then $t=t^{{}^{\prime}}$ must
hold. Moreover, $I$ satisfies a foreign key $r[a_{1},\cdots,a_{n}]\to
s[b_{1},\cdots,b_{n}]$ in $\Sigma$ if: 1) $I$ satisfies
$s[b_{1},\cdots,b_{n}]$; and 2) for each tuple $t\in I(r)$, either
$t(a_{{}_{1\leq i\leq n}})=\textsc{null}$ or there exists a tuple
$t^{{}^{\prime}}\in I(s)$ where $t(a_{{}_{1\leq i\leq
n}})=t^{{}^{\prime}}(b_{{}_{1\leq i\leq n}})$. The instance $I$ satisfies all
integrity constraints in $\Sigma$, denoted by $I\vDash\Sigma$, if it satisfy
all primary keys and foreign keys in $\Sigma$.

Finally, a _relational database_ is defined with $D_{R}=(S_{R},I_{R})$ where
$S_{R}$ is a relational schema and $I_{R}$ is an instance of $S_{R}$.

###  2.2 Property Graphs

A _property graph_ _(PG)_ is a multi-graph structure composed of labeled and
attributed vertices and edges defined with $G\\!=\\!(V,E,L,A)$ where: 1) $V$
is a finite set of vertices; 2) $E\subseteq V\times V$ is a finite set of
directed edges where $(v,v^{{}^{\prime}})\in E$ is an edge starting at vertex
$v$ and ending at vertex $v^{{}^{\prime}}$; 3) $L$ is a function that assigns
a label to each vertex in $V$ (resp. edge in $E$); and 4) $A$ is a function
assigning a nonempty set of key-value pairs to each vertex (resp. edge). For
any edge $e\in E$, we denote by $e.s$ (resp. $e.d$) the starting (resp.
ending) vertex of $e$.

###  2.3 SQL queries and Cypher queries

We study in this paper the mapping of relational data into PG data. In
addition, we show that any relational query over the source data can be
translated into an equivalent graph query over the generated data graph. To
this end, we model relational queries with the SQL language [7] and the graph
queries with the Cypher language [6] since each of these languages is the most
used in its category. To establish a compromise between the expressive power
of our mapping and its processing time, we consider a simple but very
practical class of SQL queries and we define its corresponding class of Cypher
queries. It is necessary to understand the relations between basic SQL queries
and basic Cypher queries before studying all the expressive power of these
languages.

The well-known syntax of SQL queries is “Select $I$ from $R$ where $C$” where:
a) $I$ is a set of items; b) $R$ is a set of relations names; and c) $C$ is a
set of conditions. Intuitively, an SQL query selects first some tuples of
relations in $R$ that satisfy conditions in $C$. Then, the values of some
records (specified by $I$) of these tuples are returned to the user.

On the other side, the Cypher queries considered in this paper have the
syntax: “$Match$ patterns $Where$ conditions $Return$ items”. Notice that a
Cypher query aims to find, based on edge-isomorphism, all subgraphs in some
data graph that match the pattern specified by the query and also satisfy
conditions defined by this latter. Once found, only some parts (i.e. vertices,
edges, and/or attributes) of these subgraphs are returned, based on items
specified by $Return$ clause. Therefore, the $Match$ clause specifies the
structure of subgraphs we are looking for on the data graph; the $Where$
clause specifies conditions (based on vertices, edges and/or attributes) these
subgraphs must satisfy; and finally, the $Return$ clause returns some parts of
these subgraphs to the user as a table.

Figure 1: Example of data graph.

###### Example 1

Fig.1 depicts a data graph where vertices represent entities (i.e. $Doctor$,
$Patient$, $Diagnostic$ and $Admission$); inner information (called
attributes) represent properties of this vertex (e.g. $Speciality$); and edges
represent relationships between these entities. For instance, an $Admission$
vertex may be connected to some $Patient$, $Doctor$ and $Diagnostic$ vertices
to specify for some patient: a) his doctor; b) information about his admission
at the hospital; and c) diagnostics made for this patient. $\square$

The following Cypher query returns the name of each patient who is admitted at
some date :

$MATCH\>(a:Admissions)<-[:Admissions-Patients]-(p:Patients)$

$WHERE\>a.Admi\\_date\>=\>"30/11/2021"$

$RETURN\>p.Name$

$\square$

###  2.4 Direct Mapping (_DM_)

Inspired from[12, 13, 11], We define in this section the _direct mapping_ from
a relational database into a graph database and we discuss its properties.
Given a relational database $D_{R}$ composed of $S_{R}$ and $I_{R}$, a direct
mapping consists of translating each entity in $D_{R}$ into a graph database
without any user interaction. That is, any $D_{R}$=($S_{R}$, $I_{R}$) (with
possibly empty $S_{R}$), is translated automatically into a pair of property
graphs ($S_{G}$, $I_{G}$) (with possibly empty $S_{G}$), that we call a graph
database. Let $\mathcal{D}_{R}$ be an infinite set of relational databases,
and $\mathcal{D}_{G}$ be an infinite set of graph databases. Based on these
notions, we give the next definition of direct mapping and its properties.

###### Definition 1

A _direct mapping_ is a total function $DM:\mathcal{D}_{R}\to\mathcal{D}_{G}$.
$\square$

Intuitively, for each $D_{R}\in\mathcal{D}_{R}$, $DM(D_{R})$ produces a graph
database $D_{G}\in\mathcal{D}_{G}$ that aims to represent the source
relational database (i.e. instance and optionally schema) in terms of a graph.

We define next fundamental properties that a direct mapping must preserve
[11], namely: _information preservation_ , _query preservation_ and _semantic
preservation_. The two first properties ensure that the direct mapping does
not lose neither information nor semantic of the relational database being
translated. The last property ensures that the mapping does not hinder the
querying capabilities as any relational query can be translated into a graph
query.

####  2.4.1 Information Preservation

A direct mapping _DM_ is _information preserving_ if no information is lost
during the mapping of any relational database.

######  Definition 2 (Information preservation)

A direct mapping _DM_ is _information preserving_ if there is a computable
inverse mapping $DM^{-1}:\mathcal{D}_{G}\to\mathcal{D}_{R}$ satisfying
$DM^{-1}(DM(D_{R}))=D_{R}$ for any $D_{R}\in\mathcal{D}_{R}$. $\square$

####  2.4.2 Query Preservation

Recall that both SQL and Cypher queries return a result modeled as a table
where columns represent entities requested by the query (using Select clause
in case of SQL, or Return clause in case of Cypher), while each row assigns
values to these entities. In addition, the result of both SQL and Cypher
queries may contain repeated rows.

Let $I_{R}$ be a relational instance and $Q_{s}$ be an SQL query expressed
over $I_{R}$. We denote by $[Q_{s}]_{I_{R}}$ the result table of $Q_{s}$ over
$I_{R}$. Similarly, $[Q_{c}]_{I_{G}}$ is the result table of a Cypher query
$Q_{c}$ over an instance graph $I_{G}$. Moreover, we denote by
$[Q_{s}]^{*}_{I_{R}}$ (resp. $[Q_{c}]^{*}_{I_{G}}$) the refined table that has
no repeated row.

A direct mapping _DM_ is _query preserving_ if any query over the relational
database $D_{R}$ can be translated into an equivalent query over the graph
database $D_{G}$ that results from the mapping of $D_{R}$. That is, query
preservation ensures that every relational query can be evaluated using the
mapped instance graph.

Since SQL and Cypher languages return results in different forms, proving
query preservation consists to define a mapping from the SQL result to the
Cypher result. This principle was proposed first in [13] between relational
and RDF queries. Therefore, we revise the definition of query preservation as
follows:

######  Definition 3 (Query preservation)

A direct mapping _DM_ is _query preserving_ if, for any relational database
$D_{R}$=($S_{R}$,$I_{R}$) and any SQL query $Q_{s}$, there exists a Cypher
query $Q_{c}$ such that: each row in $[Q_{s}]^{*}_{I_{R}}$ can be mapped into
a row in $[Q_{c}]^{*}_{I_{G}\in DM(D_{R})}$ and vice versa. By mapping a row r
into a row r’, we assume that r and r’ contain the same data with possibly
different forms. $\square$

####  2.4.3 Semantics Preservation

A direct mapping _DM_ is _semantics preserving_ if any consistent (resp.
inconsistent) relational database is translated into a consistent (resp.
inconsistent) graph database .

######  Definition 4 (Semantic preservation)

A direct mapping _DM_ is semantic preserving if, for any relational database
$D_{R}=(S_{R},I_{R})$ with a set of integrity constraints $\Sigma$,
$I_{R}\models\Sigma$ iff: $DM(D_{R})$ produces a consistent graph database.
$\square$

Notice that no previous work have considered semantic preservation over data
graphs. That is, no definition of graph database consistency have been given.
We shall give later our own definition.

##  3 Complete Mapping (_CM_)

In this section, we propose a complete mapping _CM_ that transforms a complete
relational database (schema and instance) into a complete graph database
(schema and instance). We call our mapping _Complete_ since some proposed
mappings (e.g [10]) deal only with data and not schema.

######  Definition 5 (_Complete Mapping_)

A complete mapping is a function $CM:\mathcal{D}_{R}\to\mathcal{D}_{G}$ from
the set of all RDs to the set of all GDs such that : for each complete
relational database $D_{R}$ = $(S_{R},I_{R})$, $CM(DR)$ generates a complete
graph database $D_{G}=(S_{G},I_{G})$. $\square$

In order to produce a complete graph database, our _CM_ process is based on
two steps, _schema mapping_ and _instance mapping_ , which we detail
hereafter.

###  3.1 Schema Graph and Instance Graph

Contrary to relational data, graph data still have no schema definition
standard. Hence, we extend the property graph definition in order to introduce
our schema graph definition.

######  Definition 6 (_Schema Graph_)

A _schema graph_ is an extended property graph defined with
$S_{{}_{G}}=(V_{{}_{S}},E_{{}_{S}},L_{{}_{S}},A_{{}_{S}},Pk,Fk)$ where: 1)
$V_{{}_{S}}$ is a finite set of vertices; 2) $E_{{}_{S}}\subseteq
V_{{}_{S}}\times V_{{}_{S}}$ is a finite set of directed edges where
$(v,v^{{}^{\prime}})\in E_{{}_{S}}$ is an edge starting at vertex $v$ and
ending at vertex $v^{{}^{\prime}}$; 3) $L_{{}_{S}}$ is a function that assigns
a label to each vertex in $V_{{}_{S}}$ (resp. edge in $E_{{}_{S}}$); 4)
$A_{{}_{S}}$ is a function assigning a nonempty set of pairs ($a_{i}:t_{i}$)
to each vertex (resp. edge) where $a_{i}\in\mathcal{A}$ and
$t_{i}\in\mathcal{T}$; 5) Pk is a partial function that assigns a subset of
$A_{s}(v)$ to a vertex $v$; and finally 6) for each edge $e\in E_{{}_{S}}$,
$Fk(e,s)$ (resp. $Fk(e,d)$) is a subset of $A_{{}_{S}}(e.s)$ (resp.
$A_{{}_{S}}(e.d)$). $\square$

The functions $Pk$ and $Fk$ will be used later to incorporate integrity
constraints over graph databases.

######  Definition 7 (_Instance Graph_)

Given a schema graph
$S_{{}_{G}}=(V_{{}_{S}},E_{{}_{S}},L_{{}_{S}},A_{{}_{S}},Pk,Fk)$, an instance
$I_{G}$ of $S_{G}$, called an _instance graph_ , is given by a property graph
$I_{{}_{G}}=(V_{{}_{I}},E_{{}_{I}},L_{{}_{I}},A_{{}_{I}})$ where:

  1. 1.

$V_{{}_{I}}$ and $E_{{}_{I}}$ are the set of vertices and the set of edges as
defined for schema graph;

  2. 2.

for each vertex $v_{i}\in V_{{}_{I}}$, there exists a vertex $v_{s}\in
V_{{}_{S}}$ such that: a) $L_{{}_{I}}(v_{i})=L_{{}_{S}}(v_{s})$; and b) for
each pair $(a:c)\in A_{{}_{I}}(v_{i})$ there exists a pair $(a:t)\in
A_{{}_{S}}(v_{s})$ with _type_($c$)=$t$. We say that $v_{i}$ corresponds to
$v_{s}$, denoted by $v_{i}\sim v_{s}$.

  3. 3.

for each edge $e_{i}=(v_{i},w_{i})$ in $E_{{}_{I}}$, there exists an edge
$e_{s}=(v_{s},w_{s})$ in $E_{{}_{S}}$ such that: a)
$L_{{}_{I}}(e_{i})=L_{{}_{S}}(e_{s})$; b) for each pair $(a:c)\in
A_{{}_{I}}(e_{i})$ there exists a pair $(a:t)\in A_{{}_{S}}(e_{s})$ with
_type_($c$)=$t$; and c) $v_{i}\sim v_{s}$ and $w_{i}\sim w_{s}$. We say that
$e_{i}$ corresponds to $e_{s}$, denoted by $e_{i}\sim e_{s}$. $\square$

As for relational schema, a schema graph determines the structure, meta-
information and typing that instance graphs must satisfy. It is clear that an
instance $I_{G}$ of $S_{G}$ assigns a set of vertices (resp. edges) to each
vertex $v_{s}$ (resp. edge $e_{s}$) in $S_{G}$ that have the same label as
$v_{s}$ (resp. $e_{s}$). Moreover, a vertex $v_{i}$ (resp. edge $e_{i}$) in
$I_{G}$ corresponds to a vertex $v_{s}$ (resp. edge $e_{s}$) in $S_{G}$ if the
value $c$, attached to any attribute $a$ of $v_{i}$ (resp. edge $e_{i}$),
respects the type $t$ given for $a$ within $v_{s}$ (resp. $e_{s}$).

Figure 2: Example of schema graph.

###### Example 2

Fig.2 depicts an example of a schema graph where each vertex (resp. edge) is
represented naturally with its label (e.g. vertex _Admissions_ , edge
_Admissions-Doctors_) and a list of typed attributes (e.g. _AdmiNo:Integer_).
As a special case, the value of the attribute $Pk$ on some vertex refers to
the value of the function $Pk$ on this vertex (e.g. $Pk$:$AdmiNo$ on vertex
$Admissions$). Moreover, the values of attributes $s$ and $d$ on some edge $e$
refer to the values of the function $Fk(e,s)$ (resp. $Fk(e,d)$) at this edge
(e.g. $s:Doc\\_No$ and $d:DoctorNo$ on edge $Admissions-Doctors$). The use of
these special attributes ($Pk$, $s$ and $d$) will be detailed later. One can
see that the data graph of Fig.1 is an instance graph of the schema graph of
Fig.2 since each vertex (resp. edge) of the former corresponds to some vertex
(resp. edge) of the latter. $\square$

Finally, a _graph database_ is defined with $D_{G}=(S_{G},I_{G})$ where
$S_{G}$ is a schema graph and $I_{G}$ is an instance of $S_{G}$.

###  3.2 Schema Mapping (_SM_)

Given a relational schema $S_{R}=(R,A,T,\Sigma)$, we propose a schema mapping
(_SM_) process that produces a schema graph
$S_{{}_{G}}=(V_{{}_{S}},E_{{}_{S}},L_{{}_{S}},A_{{}_{S}},Pk,Fk)$ as follows:

  1. 1.

For each relation name $r\in R$ in $S_{R}$, there exists a vertex $v_{r}\in
V_{{}_{S}}$ such that $L_{{}_{S}}(v_{r})=r$;

  2. 2.

For each $a\in A(r)$ with $T(a)=t$, we have a pair $(a:t)\in A_{S}(v_{r})$;

  3. 3.

For each _primary key_ $r[a_{1},\cdots,a_{n}]\in\Sigma$, we have $Pk(v_{r})$ =
“$a_{1},…,a_{n}$”;

  4. 4.

For each _foreign key_ $r[a_{1},\cdots,a_{n}]\to
s[b_{1},\cdots,b_{n}]\in\Sigma$, we have an edge $e=(v_{r},v_{s})\in
E_{{}_{S}}$ such that : a) $L_{{}_{S}}(e)=(s-r)$; b) $Fk(e,s)$=
“$a_{1},…,a_{n}$”; and c) $Fk(e,d)$ = “$b_{1},…,b_{n}$”.

  5. 5.

A special pair $(vid$:$Integer)$ is attached to each vertex of $S_{G}$ for
storage concerns.

Figure 3: Example of schema mapping.

###### Example 3

Fig.3 depicts ($A$) a relational schema and ($B$) its corresponding schema
graph. One can see that our schema mapping rules are respected: $1$) each
relation is mapped to a vertex that contains the label of this relation, its
primary key and a list of its typed attributes; $2$) each foreign key between
two relations (e.g. relations _Admissions_ and _Patients_ in part $A$) is
represented by an edge between the vertices of these two relations (e.g. edge
_Admissions-Patients_ in part $B$). $\square$

###  3.3 Instance Mapping (_IM_)

Given a relational database $D_{R}$ = $(S_{R},I_{R})$, we propose an instance
mapping (_IM_) process that maps the relational instance $I_{R}$ into an
instance graph $I_{{}_{G}}=(V_{{}_{I}},E_{{}_{I}},L_{{}_{I}},A_{{}_{I}})$ as
follows :

  1. 1.

For each tuple $t\in I(r)$, there exists a vertex $v_{t}\in V_{I}$ with
$L_{I}(v_{t})=r$. We denote by $v_{t}$ the vertex that corresponds to the
tuple $t$;

  2. 2.

For each tuple $t\in I(r)$ and each attribute $a$ with $t(a)=c$, we have:
$(a:c)\in A_{I}(v_{t})$ if $a\neq tid$; and $(vid:c)\in A_{I}(v_{t})$
otherwise.

  3. 3.

for each _foreign key_ $r[a_{1},\cdots,a_{n}]\to s[b_{1},\cdots,b_{n}]$
defined with $S_{G}$ and any tuples $t\in I(r)$ and $t^{\prime}\in I(s)$, if
$t(a_{i})=t^{\prime}(b_{i})$ for each $i\in[1,n]$, then: there is an edge
$e=(v_{t},v_{t^{\prime}})\in E_{{}_{I}}$ with $L_{{}_{I}}(e)=r-s$.

###### Example 4

An example of our _IM_ process is given in Fig.4 where part (A) is the
relational instance and part (B) is its corresponding instance graph.
$\square$

Figure 4: Example of instance mapping.

It is clear that the special attribute $vid$ is used to preserve the tuples
identification (i.e. the value of attribute $tid$) during the mapping process.

We notice that our data mapping process is query language independent in the
sense that any query language (e.g. Cypher, Gremlin, PGQL) can be applied over
the resulting data graph.

##  4 Properties of _CM_

We show that our _CM_ satisfies the three fundamental mapping properties [13]:
_information preservation_ , _query preservation_ and _semantics
preservation_.

###  4.1 Information Preservation

First, we explain that _CM_ does not lose any part of the information in the
relational instance being translated :

###### Theorem 4.1

The direct mapping _CM_ is information preserving.

###### Proof

Theorem 4.1 can be proved easily by showing that there exists a computable
mapping $CM^{-1}:D_{G}\rightarrow D_{R}$ that reconstructs the initial
relational database from the generated graph database. Since our mapping $CM$
is based on two steps (schema and instance mappings), then $CM^{-1}$ requires
the definition of $SM^{-1}$ and $IM^{-1}$ processes. Due to the space limit,
the definition of $CM^{-1}$ is given in Appendix 0.A.

###  4.2 Query Preservation

Second, we show that the way _CM_ maps relational instances into instance
graphs allows one to answer the SQL query over a relational instance by
translating it into an equivalent Cypher query over the generated graph
instance.

###### Theorem 4.2

The direct mapping _CM_ is query Preserving.

###### Proof

Proving Theorem 4.2 can be done by providing an algorithm $S2C$ that, for any
SQL query $Q_{s}$, produces an equivalent Cypher query $Q_{c}$ such that: for
any relation database $D_{R}=(S_{R},I_{R})$ and any SQL query $Q_{s}$ over
$I_{R}$, each row in $[Q_{s}]^{*}_{I_{R}}$ can be mapped to a row in
$[Q_{c}]^{*}_{I_{G}}$ where $I_{G}\in CM(D_{R})$ and $Q_{c}=S2C(Q_{s})$. Our
algorithm $S2C$ is summarized in Algorithm 1. Given an SQL query $Q_{s}$ in
input, $S2C$ proceeds as follows: a) analyze and extract clauses from $Q_{s}$;
b) compute for any SQL clause their equivalent Cypher clause; c) combine the
resulted Cypher clauses in $Q_{c}$; and d) return the final Cypher query
$Q_{c}$. Due to space limit, we give a reduced version of our query mapping
algorithm that deals only with simple queries. However, one can easily extend
our algorithm to deal with composed versions (e.g. queries with $IN$ clause).
A running example of query mapping is given in Appendix 0.B.

Algorithm 1 S2C Algorithm

Input: A simple SQL query $Q_{s}$, A relational schema $S_{R}$
Output: Its equivalent Cypher query $Q_{c}$.

1:Rename relations (via $AS$-clause) in $Q_{s}$ if not applied;

2:Extract the Select-clause ($SC$), the From-clause ($FC$) and the Where-
clause ($WC$) from $Q_{s}$;

3:Generate a Match-clause ($mc$) from $FC$:

4:$a$) by translating each relation name $r$ in $SC$ into a vertex with label
$r$; and

5:$b$) by representing each join in $Q_{s}$ with an edge in $mc$ basing on
$S_{R}$;

6:Generate a Where-clause ($wc$) from $WC$ by translating each condition over
a relation (attribute) in $WC$ into a condition over the corresponding vertex
(attribute);

7:Generate a Return-clause ($rc$) from $SC$ by translating each relation
(attribute) in $SC$ into a corresponding vertex (attribute);

8:Generate a Cypher query $Q_{c}$ by combining $mc$, $wc$ and $rc$;

9:Return $Q_{c}$;

###  4.3 Semantic Preservation

Finally, we show that _CM_ is semantic preserving by checking consistency
(resp. inconsistency) of relational database and graph database. Recall that a
direct mapping is semantic preserving if any consistent (resp. inconsistent)
relational database is translated into a consistent (resp. inconsistent) graph
database. While consistency of relational database is well-known, no
definition is given for graph database since there exists no standard for
(schema) graph definition. To overcome this limit, we added the functions $Pk$
and $Fk$ to our schema graph definition in order to make possible the
consistency checking for graph databases.

######  Definition 8 (_Graph consistency_)

For any graph database $D_{G}=(S_{G},I_{G})$, the instance $I_{G}$ is said to
be consistent w.r.t $S_{G}$ if:

  * •

For each vertex $v_{s}\in V_{s}$ with $Pk(v_{s})$=$``a_{1},...,a_{n}"$ and
each vertex $v_{i}\in V_{I}$ that corresponds to $v_{s}$: there exists no pair
$(a_{i}:NULL)\in A_{I}(v_{i})$ with $i\in[1,n]$. Moreover, for each
$v^{\prime}_{i}\in V_{I}\backslash\\{v_{i}\\}$ that corresponds to $v_{s}$,
the following condition must not hold: for each $i\in[1,n]$, $(a_{i}:c)\in
A_{I}(v_{i})\cap A_{i}(v^{\prime}_{i})$.

  * •

For each edge $e_{s}\in E_{s}$ with $Fk(e_{s},s)$=$``a_{1},...,a_{n}"$ and
$Fk(e_{s},d)$=$``b_{1},...,b_{n}"$, if $e_{i}=(v_{1},v_{2})\in E_{I}$ is an
edge that corresponds to $e_{s}$ then we have: $(a_{i}:c)\in A_{I}(v_{1})$ and
$(b_{i}:c)\in A_{I}(v_{2})$ for each $i\in[1,n]$. $\square$

Intuitively, the consistency of graph databases is inspired from that of
relational databases.

###### Theorem 4.3

The direct mapping _CM_ is semantic Preserving.

###### Proof

The proof of Theorem 4.3 is straightforward and can be done by contradiction
based on the mapping rules of _IM_ (Section 3.3). Given a relational database
$D_{R}=(S_{R},I_{R})$ and let $D_{G}=(S_{G},I_{G})$ be its equivalent graph
database generated by _CM_. We suppose that _CM_ is not semantic preserving.
This means that either (A) $I_{R}$ is consistent and $I_{G}$ is inconsistent;
or (B) $I_{R}$ is inconsistent while $I_{G}$ is consistent. We give only proof
of case (A) since that of case (B) can be done in a similar way.

We suppose that $I_{R}$ is consistent w.r.t $S_{R}$ while $I_{G}$ is
inconsistent w.r.t $S_{G}$. Based on Def. 8 $I_{G}$ is inconsistent if one of
the following conditions holds:

1) There exists a vertex $v_{i}\in V_{I}$ that corresponds to a vertex
$v_{s}\in V_{s}$ where: a) $Pk(v_{s})=``a_{1},...,a_{n}"$; and b)
$(a_{i}:NULL)\in A_{I}(v_{i})$ for some attribute $a_{i\in[1,n]}$. Based on
mapping rules of _IM_ process, $v_{i}$ corresponds to some tuple $t$ in
$I_{R}$ and attributes $a_{1},...,a_{n}$ correspond to a primary key defined
over $I_{R}$ by $S_{G}$. Then (b) implies that the tuple $t$ assigns a $NULL$
value to the attribute $a_{i}$ which makes $I_{R}$ inconsistent. However, we
supposed that $I_{R}$ is consistent.

2) There are two vertices $v_{1},v_{2}\in V_{I}$ that correspond to a vertex
$v_{s}\in V_{s}$ where: a) $Pk(v_{s})=``a_{1},...,a_{n}"$; and b)
$(a_{i}:c)\in A_{I}(v_{1})\cap A_{I}(v_{2})$ for each $i\in[1,n]$. Based on
mapping rules of _IM_ process, $v_{1}$ (resp. $v_{2}$) corresponds to some
tuple $t_{1}$ (resp. $t_{2}$) in $I_{R}$ and attributes $a_{1},...,a_{n}$
correspond to a primary key defined over $I_{R}$ by $S_{G}$. Then (b) implies
that the tuples $t_{1}$ and $t_{2}$ assign the same value to each attribute
$a_{i}$ which makes $I_{R}$ inconsistent. However, we supposed that $I_{R}$ is
consistent.

3) There exists an edge $e_{i}=(v_{1},v_{2})$ in $E_{I}$ that corresponds to
an edge $e=(v_{s},v_{d})$ in $E_{s}$ where: a) $Fk(e,s)=``a_{1},...,a_{n}"$;
b) $Fk(e,d)=``b_{1},...,b_{n}"$; and c) there exists some attribute
$a_{i\in[1,n]}$ with $(a_{i}:c_{1})\in A_{I}(v_{1})$, $(a_{i}:c_{2})\in
A_{I}(v_{2})$, and $c_{1}\neq c_{2}$. Based on mapping rules of _IM_ process,
$v_{1}$ (resp. $v_{2}$) corresponds to some tuple $t_{1}$ (resp. $t_{2}$) in
$I_{R}$, $v_{s}$ (resp. $v_{d}$) corresponds to some relation $s$ (resp. $d$)
in $S_{R}$, the function $Fk$ over edge $e$ refers to a foreign-key
$s[a_{1},...,a_{n}]\rightarrow d[b_{1},...,b_{n}]$ defined over $I_{R}$ by
$S_{G}$. Then (b) implies that the tuple $t_{1}$ assigns a value to some
attribute $a_{i\in[1,n]}$ that is different to that assigned by tuple $t_{2}$
to attribute $b_{i\in[1,n]}$. This means that there is a violation of foreign-
key by tuple $t_{1}$ which makes $I_{R}$ inconsistent. However, we supposed
that $I_{R}$ is consistent.

Therefore, each case of $I_{G}$ inconsistency leads to a contradiction, which
means that if $I_{R}$ is consistent then its corresponding $I_{G}$ cannot be
inconsistent.

By doing proof of part (B) in a similar way, we conclude that if $I_{R}$ is
consistent (resp. inconsistent) then its corresponding instance graph $I_{G}$
must be consistent (resp. inconsistent). This completes the proof of Theorem
4.3.$\square$

##  5 Conclusion and Future works

In this paper, we proposed a complete mapping process that translates any
relational database into an equivalent graph database by considering both
schema and data mapping. Our mapping preserves the information and semantics
of the relational database and maps any SQL query, over the relational
database, into an equivalent Cypher query to be evaluated over the produced
graph database. We plan to extend our model to preserve another mapping
property, called monotonicity [13], which ensures that any update to the
relational database will not require generating the corresponding graph
database from scratch. Also, we will enrich the definition of the relational
schema with more integrity constraints. We are conducting an experimental
study based on real-life databases to check our approach’s efficiency and
effectiveness.

## References

  * [1] Neo4j ETL.  https://neo4j.com/developer/neo4j-etl/.
  * [2] Renzo Angles, Harsh Thakkar, and Dominik Tomaszuk.  Mapping RDF databases to property graph databases.  IEEE Access, pages 86091–86110, 2020.
  * [3] Roberto De Virgilio, Antonio Maccioni, and Riccardo Torlone.  Converting relational to graph databases.  page 1, 2013.
  * [4] Roberto De Virgilio, Antonio Maccioni, and Riccardo Torlone.  R2g: A tool for migrating relations to graphs.  pages 640–643, 2014.
  * [5] Wenfei Fan, Xin Wang, and Yinghui Wu.  Answering pattern queries using views.  IEEE Trans. Knowl. Data Eng., pages 326–341, 2016.
  * [6] Nadime Francis, Alastair Green, Paolo Guagliardo, Leonid Libkin, Tobias Lindaaker, Victor Marsault, Stefan Plantikow, Mats Rydberg, Petra Selmer, and Andrés Taylor.  Cypher: An evolving query language for property graphs.  pages 1433–1445, 2018.
  * [7] Paolo Guagliardo and Leonid Libkin.  A formal semantics of SQL queries, its validation, and applications.  Proc. VLDB Endow., pages 27–39, 2017.
  * [8] Shunyang Li, Zhengyi Yang, Xianhang Zhang, Wenjie Zhang, and Xuemin Lin.  SQL2Cypher: Automated Data and Query Migration from RDBMS to GDBMS.  2021\.
  * [9] Shota Matsumoto, Ryota Yamanaka, and Hirokazu Chiba.  Mapping rdf graphs to property graphs.  pages 106–109, 2018.
  * [10] Ognjen Orel, Slaven Zakošek, and Mirta Baranović.  Property oriented relational-to-graph database conversion.  Automatika, pages 836–845, 2017.
  * [11] Juan F. Sequeda, Marcelo Arenas, and Daniel P. Miranker.  On directly mapping relational databases to RDF and OWL.  pages 649–658, 2012.
  * [12] Radu Stoica, George Fletcher, and Juan F. Sequeda.  On directly mapping relational databases to property graphs.  pages 1–4, 2019.
  * [13] Radu-Alexandru Stoica.  R2pg-dm: A direct mapping from relational databases to property graphs.  Master’s thesis, Eindhoven University of Technology, 2019.

APPENDIX

##  Appendix 0.A Proof of Theorem 4.1

We prove Theorem 4.1 by providing a computable mapping
$CM^{-1}:D_{G}\rightarrow D_{R}$ that reconstructs the original relational
database from the generated graph database. To do so, $CM^{-1}$ must consist
of two processes: 1) $SM^{-1}$ that reconstructs the original relational
schema from the generated graph schema; and 2) $IM^{-1}$ that reconstructs the
original relational instance from the generated instance graph. We provide
hereafter complete definitions of $SM^{-1}$ and $IM^{-1}$.

$SM^{-1}$ transformation rules. Given a schema graph
$S_{{}_{G}}=(V_{{}_{S}},E_{{}_{S}},L_{{}_{S}},A_{{}_{S}},Pk,Fk)$ , the
reversed schema mapping $SM^{-1}$ produces a relational schema
$S_{R}=(R,A,T,\Sigma)$ as follows:

  * •

For each vertex $v_{r}\in V_{s}$, we create a relation $r\in R$ with name
$L_{s}(v_{r})$. We denote by $v_{r}$ the vertex that corresponds to the
relation $r$.

  * •

For each pair $(a:t)\in A_{s}(v_{r})$, we add the attribute $a$ to $A(r)$ with
$T(a)=t$.

  * •

For each $Pk(v_{r})="a_{1},...,a_{n}"$, we add $r[a_{1},..,a_{n}]$ to the set
$\Sigma$.

  * •

For each edge $e=(v_{r},v_{s})$ with $Fk(e,s)$=$``a_{1},...,a_{n}"$ and
$Fk(e,d)=``b_{1},...,b_{n}"$, we add $r[a_{1},\cdots,a_{n}]\to
s[b_{1},\cdots,b_{n}]$ to the set $\Sigma$.

Notice that the special pair $(vid:Integer)$ is ignored by the mapping
$SM^{-1}$ since it has no equivalent part in the relational schema. However,
it allows instance graphs to preserve the tuples identification.

$IM^{-1}$ transformation rules. Given an instance graph
$I_{G}=(V_{I},E_{I},L_{I},A_{I})$, the reversed instance mapping $IM^{-1}$
produces the original relational instance $I_{R}$ as follows:

  * •

For each vertex $v\in V_{I}$ with $L_{I}(v)=r$, we create a tuple $t\in I(r)$
such that:

$t(tid)=c$ where $(vid:c)\in A_{I}(v)$; and

$t(a)=c$ for each $(a:c)\in A_{I}(v)$.

From the definition of _IM_ mapping (Section 3.3), one can verify that for any
two vertices $v_{1},v_{2}\in V_{I}$, if $L_{I}(v_{1})=L_{I}(v_{2})$ then
$v_{1}$ and $v_{2}$ have different values for attributes $vid$. Based on this
remark, tuples generated by $IM^{-1}$ mapping satisfy the following condition:
for any two tuples $t_{1},t_{2}\in I(r)$, $t_{1}(tid)\neq t_{2}(tid)$.

##  Appendix 0.B Running example of query mapping by S2C 1

###### Example 5

Figure 5: Example of (A) an SQL query $Q_{s}$ and (B) its equivalent Cypher
query $Q_{c}$. Figure 6: Table (A) the result of $Q_{s}$ over $I_{R}$ and (B)
the result of its equivalent $Q_{c}$ over $I_{G}$.

Fig. 5 represents (A) an SQL query $Q_{s}$ and (B) its equivalent Cypher query
$Q_{c}$. It is clear to see that each SQL clause is translated into a Cypher
clause as explained by algorithm $S2C$. Precisely, each relation name
(_Admissions_ , _Doctors_ , _Patients_) in _From-Clause_ is translated into a
vertex in $mc$ labeled with name of this relation. Moreover, each join
operation between two relations is mapped to an edge between vertices
corresponding to these relations. Each condition (e.g.
$a.Doc\\_No=b.DoctorNo$) in _Where-Clause_ is translated into an equivalent
condition in $wc$. Finally, the selected items to return are extracted from
the _Select-clause_. The final Cypher query $Q_{c}$ is composed by combining
the three clauses _Match_ ($mc$), _Where_ ($wc$) and _Return_ ($rc$).

Consider the relational instance $I_{R}$ of Fig.4 (A) and its equivalent
instance graph $I_{G}$ in Fig.4 (B). When we apply $Q_{s}$ over $I_{R}$ (resp.
$Q_{c}$ over $I_{G}$), we obtain the result table depicted in Fig.6 (A) (resp.
(B)). It is easy to see that both $Q_{s}$ and $Q_{c}$ return the same
information. $\square$