Note that the details of national navies differ. This is a sketch based on the Royal Navy because you might was well imitate the best, everyone else did.
I am actually writing a scifi novel some 400 years from now, but I am trying to imagine the appropriate evolution of military structure for the space navy.
Navies tend to lag well behind the society they're protecting. They maintained a strict, brutal social order for centuries, only becoming liberal by the necessities of technology and the need to crew their ships with willing, skilled people.
Navies in the Age of Sail, about 1500 to 1860, remained pretty much the same because the technology and tactics remained pretty much the same. Large sailing ships of war required large crews to manage their increasing number of sails and broadside muzzle-loading guns. So long as you had a core of competent seaman to show the new folks the ropes (literally), the crew could be trained on the ship.
Naval society reflected social society. Officers were generally men from the upper class. Everyone else was from the lower classes. They did not mingle. The slightest disrespect by the crew was met with lashing and other corporal punishment. Some particularly skilled crew were sufficiently valued to be considered petty officers: the bosun, master gunner, and carpenter for example. While never socially equal to the commissioned officers, they were at least given some autonomy, respect for their opinion (when asked for) and better quarters. There remained a clear distinction between wardroom officers would eat together, and everyone else. Even a boy midshipman would be treated with more respect than an adult able seaman.
And then technology happened. The launch of HMS Warrior made steam propulsion, iron armor, and rifled, breech-loading guns mandatory. Suddenly skilled engineers were needed to maintain the machinery. The more powerful guns and longer ranges needed skilled gunners. These skilled workers were from the growing middle-class and needed to be attracted from well paying jobs and convinced to remain in the navy. As a result, the class barriers and officer/crew barriers began to break down. This only accelerated with the launch of HMS Dreadnought in 1906. Oil fired steam turbines, radio equipment, electrical generators, and long range gunnery became the norm. More technically savy crew was necessary, and increasingly the traditional officer training was not covering the new technology. The petty officers gained more respect and authority, begrudgingly.
The introduction of naval aviation compounded the issue. Naval pilots were officers, and suddenly there were a lot of them. They were young, they advanced in rank quickly, and they went through a different training program.
The expansion of navies during both World Wars promoted a flood of freshly trained and reserve officers, as well as civilian crew. This further rankled the social order of officers who went through the traditional peacetime academy. Previously looked upon with disdain, reservists were now placed in positions of command by necessity.
All this, the mechanics, gunners, pilots, reserve officers... these people did not grow up with the traditions of the navy and the sea, and increasingly jostled for better treatment.
Technology and expansion make navies more liberal, but only begrudgingly. A space navy would have undergone a transition as the officers and traditions of the water navy give way to the needs of being IN SPAAACE. It's hard to predict what would stay and what would go, but here's some thoughts.
Officers still mess together
If any tradition will remain, it will be the tradition of the wardroom. Officers will eat meals together separate from the crew, even if it's only a notional special table in the galley. This will likely include petty and warrant officers.
The captain may also retain the privilege of having their own mess, again even if this is a better-than-average galley meal brought to their quarters. The captain will likely still maintain the tradition of inviting their officers and crew to eat with them to get to know them in a less-formal setting.
Is your spaceship a submarine or a battleship?
Small ships tend to be more liberal than large ones. A large, roomy ship with 1000+ men on board has plenty of space and opportunity to form stratified societies. The crew and officers are more specialized and disassociated from the life and death of the ship. It's easy to forget that your job six decks down is attached to the job of being a fighting ship. It's easy for officers to be more concerned about spit and polish than maintaining fighting efficiency.
In contrast, it's hard for officers to maintain a haughty detachment when you're 50 men stacked on top of each other in a submarine. Everyone knows that one mistake and everyone drowns 200 meters below the ocean. Every job is critical, even maintaining the toilet.
Rank fault lines
If you choose to keep rank as social stratification, the fault lines are commissioned officers, petty officers, and the rest of the crew. Commissioned officers will have gone through some sort of special academy to bring them all together early on, and the needs of command will tend to separate them from the people they're commanding. Petty officers have gone through a different training regimen, or come up through the crew by merit, and have their own social strata. The rest of the crew who are just doing what their told will be in their own strata.
Or you can go the Star Trek Federation egalitarian route. While rank commands respect, it does not indicate social nor moral superiority. Rank is more a practical and organizational thing. Particularly on Deep Space Nine, officers and crew freely intermingle socially and to get the job done... though even still the officers tend to hang out with the officers.
- Master and Commander by Patrick O'Brian. Despite being fiction, it's some of the best depictions of life in the Royal Navy during the Napoleonic wars. I refer to it as "Jane Austin on a boat".
- At War At Sea by Ronald Spector. This covers the social upheavals of the US Navy in the 20th Century.
- One of Our Submarines by Edward Young Commander, DSO, DSC, RNVR. This is an extremely well written autobiography of one of the first Royal Navy Volunteer Reserve officers to captain a submarine in WWII. It shows the day-to-day issues of a fresh officer in tight quarters.