I'm going to take example on a movie called wall.e where there is a huge ship that transports 700 000 humans to flee into outer space, because the earth where these humans lived is too polluted. The ship is an "executive starliner" and holds in its inside a normal city. (If you want to see the space ship, tap in google or whatsoever "axiom Pixar".
But then how could gravity be maintained? In the movie, we clearly see that there isn't any rotation that could create a sort of gravity, since the city inside is horizontal and the spaceship doesn't rotate, it just always move forwards.
As it always moves forward, we could've thought that the ship is providing a sort of gravity because it is moving very fast. But then the city would've been built on the back wall of the ship. But no it isn't.
I've thought of a solution but it doesn't seem concrete. I've thought that few small black holes could be maintained on the bottom of the ship, and like black holes are extremely dense, the ship could obtain a earth-like gravity.They would be displayed in a way that everywhere in the city has the same gravity, not stronger, nor less.
(please don't ask how the the black holes could be created)
The problem is, for the city that's located higher then the small black holes, the gravity is earth like. But for the machines or structures that are maintaining the black holes and are closer to them, the gravity must be way stronger, how could they resist?
If you have other solutions that don't include the two scenarios (rotation and movement) I've shown in the beginning, please feel free to comment and give your solution.
Also remember that it has to be theoretically possible, not necessarily feasible. Thanks for your help! :-)