shabados / database

A digital representation of Sikh Bani and other Panthic texts with a public logbook of sangat-sourced corrections.
https://docs.shabados.com/database
GNU General Public License v3.0
66 stars 25 forks source link

Add immutable ids for subsection data #1338

Open sarabveer opened 4 years ago

sarabveer commented 4 years ago

Currently subsections are useless as subsection names are not unique

bhajneet commented 4 years ago

How does this issue affect the average user?

sarabveer commented 4 years ago

Not sure about the average user, but this is required for v5. Otherwise subsections are useless as many share the same name.

sarabveer commented 4 years ago

@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

saihaj commented 4 years ago

View in Slack

Harjot1Singh commented 4 years ago

Yep you've got it, see lines or shabads as an example, they both have order_id and id.

Harjot1Singh commented 4 years ago

@Sarabveer Would you not prefer to have subsection: "Jap"?

sarabveer commented 4 years ago

@Harjot1Singh subsection names arent unique, which is why this issue was opened.

sarabveer commented 2 years ago

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.