2 ms·
That's exactly it though: having to do dumb tricks is the painful part. There's plenty of things with user-defined order where an explicit index isn't surfaced,
by vore 4y ago
That's exactly it though: having to do dumb tricks is the painful part. There's plenty of things with user-defined order where an explicit index isn't surfaced, like to-do lists, playlists, etc.
- BeefWellington 4y agoA user-defined order is an explicit index. EDIT: To expand further, I would generally model a playlist as its own tables anyways. Something like: CREATE TABLE playlist ( id ID_TYPE_FOR_DB PRIMARY KEY, name varchar(4096), /* Or whatever storage size makes sense */ ) CREATE TABLE playlist_entry ( id ID_TYPE_FOR_DB PRIMARY KEY, song_ref ID_TYPE_FOR_DB FOREIGN KEY REFERENCES songs(id), order INT, /* Or bigint or whatever you want */ )