It is genearlly accepted that film and TV is made out of order when it comes to storyline. Strictly speaking, the Star Wars films would be numbered as such:
1: A New Hope
2: The Empire Strikes Back
3: Return of the Jedi
4: The Phantom Menace
5: Attack of the Clones
6: Revenge of the Sith
That numbering follows the production order. However, it is intended that the films are to be viewed in Episode order. Since the SFDB is an information resource, and each film has an entry space for production date anyway, it would be more useful to the reader for the films to be listed in story order. We're not the IMDB, we're SF fans, and as such the story takes precedence over the more mundane concerns of the order in which the story was made. As such, the older trilogy would be listed as 4, 5 and 6.
Similarly, for the Star Trek series, Enterprise should come first.
The conventions for this will match commonly used "production order" numbering. That is to say, each episode gets a three-digit code. The first digit is the season number, the last two are the episode number in story order. So " Infection" would be 103. Chrysalis would be 122.