How quickly can a bad team rebuild? For struggling baseball franchises, the answer can be pretty discouraging.

Baseball isn’t football, where overnight transformations are so ingrained in the sport that it’s a surprise if some team doesn’t go from last to first each season. Baseball isn’t basketball, where one player can be the difference between the best record in the NBA one year and the second-worst record the next, and where adding two players (in the case of the 2006-07 Celtics, Ray Allen and Kevin Garnett) can turn a 24-58 team into a champion.

In baseball, one player can only make so much of a difference. When Alex Rodriguez left the Seattle Mariners for the Texas Rangers after the 2000 season, he was the best player in baseball. In his first year with the Rangers, they improved from 71 wins all the way to 73. Meanwhile, the Mariners were so devastated by his departure that in 2001 they tied the all-time major league record with 116 regular-season wins.

Building a winner in baseball takes a group effort, and group efforts almost always take time. You can accomplish almost anything in three years — the Detroit Tigers proved that between 2003 and 2006, when they went from losing an American League-record 119 games to winning the pennant. From one season to the next, however, it’s best to temper your expectations.

The Atlanta Braves, who went 65-97 in 1990 and went to the World Series in 1991, defined the limits of improvement. No team that lost more than 97 games in a season has ever made the playoffs the following year.

This season, several teams have tried to test those limits. The Cleveland Indians went 69-93 last season, then started 2011 on a 30-15 tear. Now they’re struggling to stay above .500 and to keep up with the Tigers in the AL Central race. The Pittsburgh Pirates, losers of 105 games last season, were 53-47 and tied for first place on July 25. Three weeks later, they were 13 games out. Icarus didn’t drop from the heavens that fast.

And then there are the Arizona Diamondbacks.

Last year the Diamondbacks lost 97 games, and management lost their jobs. On July 2, the team fired A.J. Hinch, the former catcher hired as manager barely a year earlier. General manager Josh Byrnes, who piloted Arizona to the NLCS in 2007, was sent packing the same day. Kirk Gibson took over managing duties, and the Diamondbacks hired former Padres GM Kevin Towers to replace interim GM Jerry Dipoto, who replaced Byrnes.

Arizona started this season 17-23 before winning 13 of 14 games, a streak that vaulted the Diamondbacks into first place in the NL West. They trailed the San Francisco Giants for the division lead most of the season and recently regained first with a six-game winning streak.

For any other team, this sort of abrupt reversal of fortune might be noteworthy. For the Diamondbacks, it’s business as usual.

When the franchise came into existence in 1998, owner Jerry Colangelo refused to let it suffer through losing seasons like every other expansion team. Before the Diamondbacks had played their first game, Colangelo had already shelled out contract money for a crop of star free agents, including Jay Bell, Matt Williams, and Andy Benes. That year the Diamondbacks went 65-97, so management went out and spent more to sign Steve Finley and Randy Johnson before the next season. In 1999, Johnson won the first of four straight Cy Young Awards, and Bell, Williams, and Finley each hit at least 34 home runs. The Diamondbacks won 100 games, becoming the second (and, so far, last) team to reach the postseason a year after losing 97 games. More impressive, Arizona’s 35-game improvement remains the biggest single-season turnaround in modern major league history.

Colangelo’s win-now approach and willingness to open his pocketbook led to the Diamondbacks’ 2001 world championship, but that title came at a cost. Most of the contracts the Diamondbacks handed out were back-loaded with deferred compensation, and when the rent came due, the team collapsed like a mortgage-backed security. By 2004, the Diamondbacks had plunged to a 51-111 record, and Colangelo was forced to sell his stake in the team. The 111 losses were the most by an NL team since the 1965 Mets went 50-112. The two-year, 47-game free fall was the most by any franchise since Connie Mack sold off all his stars on the Philadelphia A’s during World War I.

Three years later, in 2007, the Diamondbacks won 90 games and the NL West title. By 2010, they were back in the cellar. And this year, they are trying to become just the third team ever — but the second Diamondbacks squad — to go to the playoffs a year after losing 97 games. If the Diamondbacks were any more bipolar, they’d have quit their prime-time sitcom to spend more time with their goddesses.

Unlike the Pirates, whose success had all the statistical markings of a stone-cold fluke, the Diamondbacks look like a genuine contender. They’re the only team in the NL West that has outscored its opponents. Their improvement is genuine, and in their improvement there are lessons to be learned:

Bullpens are unpredictable.

Last season, the Diamondbacks had one of the worst bullpens in recent memory. Chad Qualls, who began the season as the team’s closer, had an 8.29 ERA by the time he was dumped in late June. His replacement, Juan Gutierrez, was better but not good — he finished with a 5.08 ERA. The Diamondbacks’ bullpen as a whole had a 5.74 ERA. Not surprisingly, the team was hopeless in tight ballgames; it went 2-14 in extra-inning affairs.

If your team has a flaw, however, you probably want it to be its bullpen. Relievers may not be reliable, but they are replaceable. It helps that Towers built a reputation for building quality bullpens on the cheap while he was with the Padres.

Last winter, the Diamondbacks signed J.J. Putz, the once-dominant Seattle Mariners closer, to a modest two-year, $10 million contract. They also traded incumbent third baseman Mark Reynolds, whose bad defense and record-setting strikeout totals had worn out his welcome in Maricopa County. In exchange, they got setup man David Hernandez from the Baltimore Orioles. Putz has 29 saves and a 2.91 ERA; Hernandez has a 2.83 ERA and filled in ably as closer when Putz was on the DL. The bullpen ERA has dropped nearly two runs, to 3.82. Last season the Diamondbacks lost 15 games that they led after seven innings. So far this year, they have lost only five.

Youth shall prevail.

The one silver lining to the 2004 Diamondbacks’ 111-loss season was that it helped them land the first pick in the 2005 draft. They selected Justin Upton, one of the most talented high school hitters of his generation. Upton reached the major leagues while he was still 19, and in 2009 he hit .300 with 26 homers and 20 steals. Last season he regressed, posting pedestrian batting stats (.273/.356/.442) amid whispers that he was an underachiever like his older brother, B.J., who plays for the Tampa Bay Rays.

Of course, it was possible that at 22 years old, Upton simply had some growing up to do. This year, he’s hitting .306/.379/.564 with 25 homers and a league-leading 34 doubles, and is a viable MVP candidate. He turns 24 later this month. (Mark Trumbo, the Angels’ Rookie of the Year candidate, is nearly two years older than Upton.)

It’s easy to mistake experience for age. After more than three years in the major leagues, Upton might have been considered a finished product before this season. He wasn’t. He’s a budding superstar, and we may soon dispense with the “budding” qualifier. He’s one of the most valuable properties in the game.

Deception can be a substitute for talent.

Prior to this season, Josh Collmenter couldn’t have been more off the radar as a prospect if he had been pitching inside a B-2 Bomber. Despite a respectable 3.38 ERA in the minors last season, he wasn’t ranked among the Diamondbacks’ top 30 prospects by Baseball America. It’s not hard to see why — right-handed pitchers who barely average 87 mph on their fastball are not typically prized commodities.

But Collmenter has one thing going for him: He has one of the most unusual delivery motions in baseball. When most pitchers release the ball, their pitching arm is somewhere between ten and eleven o’clock on a watch dial from the catcher’s perspective. Collmenter contorts his body at the last moment to release the ball from around the one o’clock position — basically, he’s a right-handed pitcher with a left-hander’s release point. Hitters haven’t seen anything quite like his delivery, and it shows.

The Diamondbacks called Collmenter up to their bullpen in mid-April; after he was unscored upon in six of his first seven appearances, he moved into the starting rotation on May 14. He threw six shutout innings in his first outing, and again in his second start. He’s been a rotation stalwart ever since.

Hitters might finally be figuring Collmenter out — in his last two starts, he allowed 11 runs in six innings, raising his ERA from 2.74 to 3.58, before Collmenter rebounded with seven solid innings against the Cubs Astros last Wednesday. But even if he never gets another big league hitter out, he has already exceeded expectations.

When in doubt, make a good trade.

Shortly after taking the reins as interim GM last summer, Towers Dipoto negotiated a trade deadline masterpiece with White Sox GM Kenny Williams. The Sox, clinging to first place at the time, needed another starter, and Towers Dipoto was happy to send them one — underachieving right-hander Edwin Jackson — in exchange for pitching prospects Daniel Hudson and David Holmberg.

Jackson pitched well for the Sox, but his 3.24 ERA in 11 starts was eclipsed by Hudson, whom Arizona immediately brought up from the minors. In 11 starts, Hudson went 7-1 with a 1.69 ERA, allowing only 51 hits and 16 walks in 80 innings. Since 1975, the only NL pitchers to make 10 or more starts with a lower ERA are Dwight Gooden, Greg Maddux, Randy Johnson, and CC Sabathia. Hudson hasn’t been quite as effective this season, but he’s thrown 165 innings with a 3.76 ERA. He and Collmenter give the Diamondbacks two above-average starters who weren’t there for most of last season.

A bird in the hand is worth a lot more than two in the bush.

And here’s the cautionary tale: Instead of battling the Giants for first place in the NL West, the Diamondbacks could be in the driver’s seat. Just days before they acquired Hudson from the White Sox, Arizona traded ace pitcher Dan Haren to the Angels for reasons that remain unclear. Haren was under contract through 2012 with a club option for 2013, and while he appeared to be struggling before the trade, his poor performance was a mirage — his strikeout-to-walk ratio remained at nearly 5-to-1.

The Diamondbacks surrendered six prospects, including future stars Brett Anderson and Carlos Gonzalez, to acquire Haren before the 2008 season. They bought high and sold low, trading him away for three prospects, only one of them elite (Tyler Skaggs), and veteran left-hander Joe Saunders, who filled Haren’s spot in the rotation but could not fill his shoes as a pitcher. Haren has a 2.95 ERA for the Angels and has allowed less than a baserunner per inning. Skaggs might be a star someday, but in 2011, trading Haren might have cost the Diamondbacks a playoff spot.

Even without Haren, and even after losing shortstop Stephen Drew for the remainder of the season with a broken ankle, the Diamondbacks have the talent to fight the Giants for the NL West crown. Not bad for a team that lost 97 games last year. Maybe the Diamondbacks are bipolar. Or maybe they’re just bi-winning.

Rany Jazayerli runs the Rany on the Royals website and co-hosts The Baseball Show with Rany and Joe podcast. He is one of the original founders of Baseball Prospectus, and works as a dermatologist in suburban Chicago.

Previously from Rany Jazayerli:

The Case for Carlos Beltran

The Cleveland Indians’ wheeling and dealing

The Pittsburgh Pirates’ playoff chances

To comment on this story through Facebook, click here.