0
Completed

Table Relationships without foreign key

paul 9 months ago updated by Eugene 9 months ago 1

I have two tables that are related to each other by a unique Identifier.  However there are no foreign key between the two tables.  When I added the relationship, your tool inserted a foreign key into my tables and could not remove them * selecting and deleting gets ignored).  SO I cannot model my actual database in this tool.

Answer

Answer
Completed

Dear user,

You can use any datatype for  relationship columns.


Here is an example how to design database in 3 phases:

1) Decide What are your entities (Tables): Company and User

2) Decide What kind of relationships between them: 1-*, 1-1, *-*,*-1.

3) Decide What kind of columns and data types you want to use to implement both entities.


This is popular and simple approach and SqlDbm allows you to have relationship between tables w/o any columns and takes care of creating and updating required FK column(s) when PK is added.


But if you already have FK column and you want to add relationship you can merge auto created FK Column with existing one:

Here is an example how to do that using FK RoleName:


I hope it helps,

Let us know if you have any question

Answer
Completed

Dear user,

You can use any datatype for  relationship columns.


Here is an example how to design database in 3 phases:

1) Decide What are your entities (Tables): Company and User

2) Decide What kind of relationships between them: 1-*, 1-1, *-*,*-1.

3) Decide What kind of columns and data types you want to use to implement both entities.


This is popular and simple approach and SqlDbm allows you to have relationship between tables w/o any columns and takes care of creating and updating required FK column(s) when PK is added.


But if you already have FK column and you want to add relationship you can merge auto created FK Column with existing one:

Here is an example how to do that using FK RoleName:


I hope it helps,

Let us know if you have any question