This article summarizes the results of several of our studies on medication safety in pregnancy based on the Norwegian Mother and Child Cohort Study (MoBa). Medications investigated include antidepressants, NSAIDs, codeine, triptans, paracetamol and certain herbals. A major advantage of these studies is that MoBa has information on prescribed medications, over-the-counter medications and herbal medications. Moreover, MoBa enables the possibility of including a disease comparison group, and long-term follow-up into childhood. The size of MoBa enables designs like the sibling-design, which offers important advantages over studies comparing unrelated individuals. The possibility of linking MoBa to nationwide registries like the NorPD and the National Patient Registry enables validation of medication exposures and childhood diagnosis. Pharmacoepidemiological studies are vital to our understanding of the safety of medications in pregnancy, but great care must be taken in the analysis and interpretation of observational data to avoid problems of confounding and bias.