Recent

Author Topic: [CLOSED] Firebird-SQL  (Read 5157 times)

rvk

  • Hero Member
  • *****
  • Posts: 6163
Re: Firebird-SQL
« Reply #15 on: April 09, 2023, 12:40:17 am »
He could also just create fields for those KEY_NAMEs in SAMPLES itself
if for every record in SAMPLES there is only one record per KEY_NAME.

But that goes against the principle of normalizing the database  ::)

Zvoni

  • Hero Member
  • *****
  • Posts: 2327
Re: Firebird-SQL
« Reply #16 on: April 09, 2023, 06:13:42 am »
I think he wrote early on, that he can‘t do that since the „column“-name (key) might change
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

rvk

  • Hero Member
  • *****
  • Posts: 6163
Re: Firebird-SQL
« Reply #17 on: April 09, 2023, 09:10:00 am »
I think he wrote early on, that he can‘t do that since the „column“-name (key) might change

Yes
Yes, this design is ugly. I've not implemented yet. Just thinking over. Problem is the "property" names may change, so that I cannot fix fields at design time.

But when that happens... ANY SQL with fixed values of KEY_NAME will become invalid too.

Yes, you can put those fields in a json blob, but you'll loose the ability to do a select on them (if you used the values).

And putting only the key_names there is kind of useless because a simple
Code: SQL  [Select][+][-]
  1. SELECT DISTINCT KEY_NAME FROM SAMPLE_DATA
will retrieve the key names too after which you can build the SQL.



egsuh

  • Hero Member
  • *****
  • Posts: 1292
Re: Firebird-SQL
« Reply #18 on: April 10, 2023, 07:25:15 am »
Thanks a lot for all the advices.
There would be many projects, and the key_names will differ from project to project, but the same within each project.
I can manage it by creating or altering a view for each project. Record numbers would not be "very" large. Possibly there might be several hundred K projects, but in most cases hundreds or thousands, at most. Only have to write "saving" procedures. Many thanks again. 

 

TinyPortal © 2005-2018