Madeleine P. Brennan maintains Dyker Heights Intermediate School 201 in Brooklyn as something of a time capsule.

Female secretaries, guidance counselors and assistant principals are asked to wear dresses or skirts; teachers may wear slacks, but not dungarees; men all wear ties. The marble staircase shines; the hallways are painted a classic pale blue. Each year before Christmas, there is Rhinestone Week, in which Mrs. Brennan encourages staff members to rummage through their grandmothers’ things for old costume jewelry to wear.

But the prize artifact of the past is Mrs. Brennan herself, who has been principal of the school for 48 years, longer than most of her teachers have been alive — longer, experts believe, than any other principal in the country. When she first arrived to work at this imposing brick building in March 1963, John F. Kennedy was president, ZIP codes were not yet in use, and the nearby Verrazano-Narrows Bridge was still under construction.

She has outlasted more than a dozen schools chancellors, who made what she described as “little changes here and there,” and watched a student body dominated by the children of Italian immigrants transform into one that is 45 percent Asian-American and 18 percent Hispanic.