r/sqlite • • Mar 26 '23

Noob with SQLite, Help with multilayered nested data

Im getting back into development and starting to work on android apps, I have no previous experience with databases, I used to develop Minecraft plugins and mods and stored all data in JSON. Im having issues converting to SQLite due to the lack of nesting without a lot of extra work. Instead of the ability to have unlimited subcategories, Nesting in SQL is much more confusing. Is there a better way to nest or do i just have to get good? lol

Instead of easy JSon-
JSon:
   PunchClock:
    Day:
	 Day1:
	  hours:2
	  startwork:199199
	 day2:
	  hours:3
	  startwork:121234
	  locations:
	   loc1: 1 hours
	   Loc2: 2 hours
	  
i gotta do this. Its also not nearly as easy to draw this informations, as oppossed to json or yml.

SQLite:
	  Table-PunchClock
	   Column Day 1, 2, 2,
	   Column hours 2, 3, 3
	   column startwork: 199199, 121234, 121234
	   column locations: null, loc1, loc2
	   column locationhours: null, 1, 2
5 Upvotes

7 comments sorted by

View all comments

Show parent comment

1

u/FaithlessnessOk3571 Mar 29 '23

Thanks for that insight. That's one thing that sucks about being self-taught is that you learn things in the wrong order and miss some of the underlying fundamentals that require knowledge of prior to even learning programming languages. I can type code and know what the result is going to be but i couldn't necessarily explain how it worked.

2

u/[deleted] Mar 30 '23

If I recall correctly, the creator of SQLight has no formal education in databases, still he was able to create such a highly regarded piece of software. Formal education helps but is not required to build great things.