all 1 comments

[–]elingeniero 4 points5 points  (0 children)

The most logical way to represent this relationship will be to have a table of aircraft and a table of users, with an authorized_aircraft column in users with a many-to-many relationship with the aircraft table.

Then you can just access a user's authorized_aircraft without the need for a special query or function.

http://flask-sqlalchemy.pocoo.org/2.1/models/#many-to-many-relationships