A CD-ROM (pressed CD) has long longevity; I am sure you're talking about CD-R, though. CD-Rs have been disappointing, with cheap discs improperly stored giving out after just a year or two. A high-quality CD (the absolute best being the archival gold discs from
MAM-A), stored in proper conditions will last for many years (most of the discs I burned in 1998-99 are fine, but other than MAM-A, blank discs have gone down in quality since then); nonetheless, it's a good idea to copy to fresh discs every couple of years.
I'd do a combination of both external hard disks and CD-R or DVD-R. Never keep just one copy of critical files.
tooki