Sgt Aaron Gormley told Denis Vaughan Buckley SC, prosecuting, that he was appointed liaison officer to the O'Reilly family after the murder.
He said that in one statement, Joe O'Reilly told him he met Rachel while working in Arnotts in 1992, and they became engaged in 1994. They first lived in Santry before moving to Baldarragh in 2003.
"We wanted to live somewhere quieter and safer and also to give the kids some space," he said.
Sgt Gormley said Mr O'Reilly also told him that Rachel had discovered a short time after moving that they owned 40ft more land, but that he didn't care about it. He also told him that Rachel wanted to have a daughter but he did not because they already had two boys whom he loved.
The two of them attended a meeting with social services after an anonymous caller reported Rachel for being rough with the children.
However, during the meeting, the social worker was satisfied that nothing was wrong, but Rachel still enrolled in a parenting course.
Sgt Gormley said Mr O'Reilly told him about his affair with Nikki Pelley. He met her last February or March at a business function. He said Ms Pelley used to work in Viacom and the two struck up a conversation. "We talked for a while and exchanged some jokes," he said. A short time later, they began e-mailing each other with jokes. "As we both knew the same people in Viacom, we talked about that," he said.
"It wasn't for a while that it began to get more serious."
Mr O'Reilly said Ms Pelley lived in Rathfarnham, not far from where he used to play softball. After practice on Tuesday evenings, he would tell Rachel he was staying on the camper bed at work. Later on, he began staying in Ms Pelley's house on Saturday evenings too, as he also had to get up early for training on Sunday.
He said Rachel "knew nothing" about Nikki, except that I had a friend called Nikki. He told gardaí the only other person who knew anything about her was Derek Quaerney.
Mr O'Reilly then told him about Rachel's own family background. "When Rachel was 18, she wanted to get in touch with her birth family." Teresa Green and Patrick Lowe were the parents, although he was not sure who Rachel's birth father was. He said they had three children, Patrick, Thomas and Sandra.
"When we moved to Santry, Thomas and Patrick came to the house," but the contact faded between all of them, he said.
However, contact was rekindled. He got to know Rachel's birth brother, Thomas, who worked as a builder and helped them out with work in their house. "Rachel was more into getting this work done than I was," he explained.
"Rachel also met Pat and Teresa on more than one occasion. I think Teresa and Rachel were beginning to drift" but Thomas, who had joined their softball team, would still call out to the house.
Mr O'Reilly also described his own life with Rachel. He said they were very active and sporty. "From our pastimes, we had a lot of equipment in the house. The softball bats are like baseball bats but metal," he said. Rachel also had hockey sticks "which I last saw under the TV in the kitchen", he said.