sqlite table question

I want this kind of sqlite table look this is waht I want
8:30 9:20
class 1 English Abdullah urdu Ahmed
class 2 Urdu Ahmed math Prof Khalid
class 3 Math Prof Khalid islamiat Malik
class 4 Islamiat Malik history Nimra
class 5 History Nimra english Abdullah
8:30 9:20
class 1 English Abdullah urdu Ahmed
class 2 Urdu Ahmed math Prof Khalid
class 3 Math Prof Khalid islamiat Malik
class 4 Islamiat Malik history Nimra
class 5 History Nimra english Abdullah
but when I try I get something like this
No description
4 Replies
FusedQyou
FusedQyou2mo ago
Why is there a ClassName1 and ClassName2 and all that? Are you doing this so you can group classes by the same time? Don't do that I guess your question does point to this You need to join your database based on a second table that specifies the time So this table specifies the time, and then your second table specifies the classes and a reference to the time row in the other table
Muhammad Hammad
Muhammad HammadOP2mo ago
@FusedQyou thanks I got your point yes 2 tables different tables will be a better option
FusedQyou
FusedQyou2mo ago
This is called Normalization btw Its worth learning about this term in databases Basically revolves around reusing data and setting up relations to a level of Normalization that suits your application But in your case, it would be worth to at least get to a level where you split times to classes of you want to group them based on this
Muhammad Hammad
Muhammad HammadOP2mo ago
thanks for informing I am gonna look for this term and learn it, probably useful thing!
Want results from more Discord servers?
Add your server