database
database copied to clipboard
Add immutable ids for subsection data
Currently subsections are useless as subsection names are not unique
How does this issue affect the average user?
Not sure about the average user, but this is required for v5. Otherwise subsections are useless as many share the same name.
@saihaj Instead of having something like "subsection": "Jap",
in the json, it would be an immutable id, like "subsection": "HJ6",
You can see all the current defined subsections here in https://github.com/ShabadOS/database/blob/dev/data/compositions.json. Many share the same English name, they aren't unique, so we need immutable ids.
Can probably touch up with @Harjot1Singh on the schema.
Another option is to have subsection defined under section. For example, if I wanted to see "Mahalaa 1" in Sri Raag, it only pulls up Shabads from Sri Raag, not of "Mahalaa 1" from other Raags/sections
-
section
-
id
-> 3 char immutable -
order_id
-> increasing integer
-
-
subsection
-
id
-> 3 char immutable -
order_id
-> increasing integer
-
Yep you've got it, see lines or shabads as an example, they both have order_id
and id
.
@Sarabveer Would you not prefer to have subsection: "Jap"
?
@Harjot1Singh subsection names arent unique, which is why this issue was opened.
Section doesn't need immutable IDs as up to this point, they are unique. However, within a section, there can be multiple subsections sharing the same name. So immutable IDs for subsections are needed if we want to use them, for example, to implement a bookmarks feature (in a Baani) for a Gutka app.