Welcome, Guest
Username: Password: Remember me

TOPIC: SQL primary keys

SQL primary keys 17 Jul 2012 04:39 #2804

  • e-struct
  • e-struct's Avatar
  • Offline
  • Senior Member
  • Posts: 76
  • Thank you received: 4
  • Karma: 5
I don't find a way to define the primary keys for my SQL tables in order to make them linked between them. How do I achieve that ?
Can you drive me to the documentation on this particular point ?
Seems a real good documentation in missing in your tool.
Thanks..
You tool looks very promising.
Last Edit: 17 Jul 2012 04:39 by e-struct.
The administrator has disabled public write access.

Re: SQL primary keys 17 Jul 2012 10:16 #2807

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
The primary key is always 'id' for every table. You cannot redefine it for the moment.

When you want to create links, you need to instance a 'Foreign Key' data field
and then, drop a 'Table' in the drop zone of this FK field.

have a look on the videos if you don't understand.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: SQL primary keys 17 Jul 2012 18:42 #2812

  • e-struct
  • e-struct's Avatar
  • Offline
  • Senior Member
  • Posts: 76
  • Thank you received: 4
  • Karma: 5
Does it matter to have more than one Foreign Keys linked to multiple tables ?
The videos are not so explicit on this particular point...
Is there any good pdf doc available describing this in detail ?
- Any good tool is always based on a strong documentation :whistle:
Can you also explain what is FK integrity in properties dialog ?
Thanks a lot.
Last Edit: 17 Jul 2012 18:43 by e-struct. Reason: completing question....
The administrator has disabled public write access.

Re: SQL primary keys 19 Jul 2012 09:53 #2819

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
If you want to create a many to many relation, you can. But it is not handled in forms or layouts if you want to see theses cross reference values.
Ex : multiple select, checkboxes, or list of all related datas. Not available for the moment.

Coding it is not difficult when you understand how the model works.

I will start to write a documentation when the V2.0 will be released. For the moment the source is a bit obsolete.

FK integrity means for example :
if you have items within a category.
When you delete a category, it will delete all contained items.
Or it can leave the items and reset category fk to 0 (null)
Or nothing happens (you must be careful when you delete objects that are referenced by others)
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.106 seconds

Get Started