your 3 core is the one that is bringing electricity to your ceiling rose, the 4 core is for reverse switch - it looks like it you have two switches to control this light.
the best and easiest method would be look at the current setup in your ceiling rose and mark the cables that go together, it should be fairly easy as you have black/red and blue / red. one of the red ones (from three core will be your live, or at least i think it should be) so just draw them on paper and mark (wrap a small piece) with different colour insulation tape around wires - same colour tape on the ones that go together in terminal- forget the earth as it is easy.
the fourth connector on your terminal is for loop, but from your setup it appears you do not have a loop, if you did you would have had a third cable dropping from ceiling - one cable to bring live (or lopped from a ceiling rose), one for switch, and third (optional) loop to next ceiling rose.
by the way, yellow cable in your 4 core cable is used for reverse. saying that, i haven't seen a 4 core cable sticking out of ceiling, i've always used it to run it from one switch to another switch to control one light with two switches.
hope this helps mate. Please remember to turn off electricity at mains before installing new light fitting.
DIY how to tutorial projects and guides - Did you know we have a DIY Projects section? Well, if no, then we certainly do! Within this area of our site have literally hundreds of how-to guides and tutorials that cover a huge range of home improvement tasks. Each page also comes with pictures and a video to make completing those jobs even easier!