0

basically my whole career is based on reading question here but now I'm stuck since I even do not know how to ask this correctly.

I'm designing a SQLITE database which is meant for the construction of data sheets out of existing data sheets. People like reusing stuff and I want to manage this with a DB and an interface. A data sheet has reusable elements like pictures, text, formulas, sections, lists, frontpages and variables. Sections can contain elements -> This can be coped with recursive CTEs - thanks "mu is too short" for that hint. Texts, Formulas, lists etc. can contain variables. At the end I want to be able to manage variables which must be unique per data sheet, manage elements which are an ordered list making up the data sheet. So selecting a data sheet I must know which elements are contained and what variables within the elements are used. I must be able to create a new data sheet by re-using elements and/or creating new ones if desired.

I came so far to have (see also link to screen shot at the bottom)

a list of variables

which (several of them) can be contained in elements

a list of elements

elements make up the

a list of data sheets

Reading examples like

Store array in SQLite that is referenced in another table

How to store a list in a column of a database table

give me already helpful hints like that I need to create for each data sheet a new atomic list containing the elements and the position of them. Same for the variables which are referenced by each element. But the troubles start when I want to have it consistent and actually how to query it.

How do I connect the the variables which are contained within elements and the elements that are contained within the data sheets. How do I check when one element or variable is being modified, which data sheets need to be recompiled since they are using the same variables and/or elements?

The more I think about this, the more it sounds like I need to write my own search tree based on an object oriented inheritance class structure and must not use data bases. Can somebody convince me that a data base is the right tool for my issue?

I learned data bases once but this is quite some time ago and to be honest the university was not giving good lectures since we never created a database by our own but only worked on existing ones.

To be more specific, my knowledge leads to this solution so far without knowing how to correctly query for a list of data sheets when changing the content of one value since the reference is a text containing the name of a table:

screen shot since I'm a greenhorn

Update:

I think I have to search for unique connections, so it would end up in many-to-many tables. Not perfectly happy with it but I think I can go on with it.

still a green horn, how are you guys using correct high lightning for sql?

  • Your question is amorphous and broad. If you are stuck on the design of your database then ask about that. If you have a schema already but need help with code, then ask for this. – Tim Biegeleisen Jun 12 '17 at 09:47
  • Yes, the more I dive into this, the less I'm convinced that a relational DB is the right tool. I thought it would make data integrity easier, searches faster, control of queries through over the world better, but apparently I'm stuck with some basic issues in the concepts. – Prometeusz Jasinski Jun 12 '17 at 10:01

0 Answers0