Fish have a tendency to school with other fish that resemble them. Clown Loaches (Botia macracantha) will sometimes school with Tiger Barbs (Capoeta tetrazona) because of the similarity in their color and pattern. My Siamese Algae Eaters (Crossocheilus siamensis) often school with my Red-tailed Rasboras (Rasbora borapetensis) because they also look similar. Because of the dissimilarity in their appearance, my Tiger Barbs do NOT school with my Red-tailed Rasboras.
Zebra Danios (Brachydanio rerio) and other 'danios' probably won't school with Tiger Barbs because they don't look anything alike.