Visio database diagrams, associating columns - database

I'm trying to be a good developer and create some documentation before I start programming my next project.
I have created a database schema diagram in Visio and created relationships between columns.
However, I am looking for a way to make the relationships between columns more clear. I want the arrow to connect column to column.
Is there a way to do this in Visio?

You can use the Visio Drawing tools to force the Relationship Connector to glue to particular Connection Points on the Table Shapes:
Turn on Connection Points in the View menu.
On the standard toolbar find the Connector Tool just to the right of the Pointer Tool. Click on the little arrow and change to the Connection Point Tool.
Hold Ctrl and click on one of the Table Shapes at the point where you want to join the Relationship Connector.
Do the same on the other Table Shape.
Glue the ends of the Relationship Connector to the Connection Points you just added.
You will have broken the relationship. To fix it, select the Relationship Connector and view the definition of the relationship in the Database Properties Window.
Associate the fields again.
(This was tested with Visio Enterprise 2003.)

If you click on the relationship arrows, green midpoints will appear. You can use these to drag the relationship arrow up and down. Be careful not to move the endpoints, though, because Visio will disassociate that connector from the table object.

To my knowledge this is how visio draws it, and it is not possible to get it to point at an exact column. its kinda annoying, but I guess you learn to live with the FK markings

The answer is that it won't, but you can click and drag the lines around. The method I use to get around this is to name the FK relationships and display the names (there is an option to do this in Database->Options) or to label the relationships with the column.

Related

How do I interpret Entity Relationship Diagrams?

I just learnt about ERDs, how to generate them and their purpose today. I tried generating to chart the structure of the database of my website using pygraphviz, pyparsing and pydot but I realised I have no idea how to read this cool-looking diagram.
Can anyone help me interpret this? Any help is very much appreciated!!
Here is the picture:
Here's one tiny part of your picture cropped so I can actually read the text in the image.
Each block with the dark box at the top is one of your database tables.
The Message table (entity) is probably the most reasonable one to talk about. All of the columns of the Message table are listed in the box.
The lines connecting boxes are the relationships between the tables. One of the lines points to the Recipient table(entity). That entity is connected by the received_messages code.
Hence, the diagram is called an entity-relationship diagram. Here's a more detailed explanation I found: What is Entity Relationship Diagram (ERD)?
Generally, you draw independent portions of your database in separate diagrams so it doesn't get so confusing.

Can I Add Related Tables to a PowerApps Canvas App?

I have inherited a PowerApps Canvas app that uses SQL Server as it's data source. The tables involved are Customer, Project and Work Order.
I’m building a Create Work Order Screen that requires the Customer ID, Project ID and Work Order Item IDs. The tables have foreign key relationships. How do I add all required tables as a collective data source? It seems that Canvas PowerApps are limited to single entities but need to confirm this.
Looks like by enabling some Experimental switch, you can achieve this.
Basically you have to add extra screens, Data sources and then simple formula will do the trick for you to set/filter/choose the related records.
Reversing the Relationship: One-to-Many
For every Many-to-One relationship, there is a corresponding One-to-Many when coming from the other direction.  Making the One-to-Many relationship easily accessible is the feature we are introducing this week.
To get started, go to the File menu, App settings, Advanced settings, scroll to end of the list, and turn this switch on:
One-to-Many Relationships for Canvas apps

Are there any tools to auto-generate an ERD diagram from a json representation of a db schema?

I'm working on a QuickBase application and I'd like to be able to generate an image representing the table structure of the application.
I can generate a list of tables and the relationships between them in any fashion needed - I just need a library that will tell me what format to feed my schema and have it spit out an ERD image of the schema.
Does something like this exist? Preferably, it would be something I could script because I'll be using the QuickBase API to generate the schema. Bonus if it will also let me display the fields, unique/primary or otherwise.
QuickBase recently released the relationship diagram in the product. You can view the table relationship and also drag around tables to define your layout. It also gives you feature like table information (links to fields page, number of fields) and option to show the primary key field involved in the relationship.
Here is the link to the help documentation
relationship diagram

How to perform data lineage using Erwin

Data lineage is defined as a kind of data life cycle that includes the data's origins and where it moves over time. This term can also describe what happens to data as it goes through diverse processes. Data lineage can help with efforts to analyze how information is used and to track key bits of information that serve a particular purpose.
I want to know if there is a specific way to perform data lineage using Erwin. I have searched but could not find a place where it clearly says how to perform data lineage. Please help.
Other than the Table editor and then "Where Used" I don't believe there is... it's not going to build the traditional flow chart that other lineage tools create.
Erwin have the ability to natively see this data lineage using 2 different features.
first Design layer. Allow a conceptual/logical model to be drive to another logical or physical model.
Or
Go to your ERwin model properties and make sure that you are supporting the data movement properties capabilities of ERwin. This can be combined with the dimensional features of the ERwin modeling tool.
Once have done this. You will have the ability to go and properly document data movement rules attached to certain tables and in the column properties of the table, the is now the ability to add source to target mapping. The source to target mapping can to use to add content to the answer provided earlier. Looking at the "Where used" properties of a table.
The data lineage however in the are report that provide source to target mapping. Comment of the mapping can be added.
To see this graphically, you will need the new CA web portal. Once the model is publish to portal. Model connections are created and additional semantic, data and other lineage information are now visible graphically. This however is another product in the ERwin solution Suite.
Enabling the Data Movement option under General Model Properties
Will allow you to specify the source table/field and transformation rule for every attribute in your model.
This the only known Erwin option to establish source-to-target lineage for documentation purpose.
Ref :
https://support.ca.com/cadocs/0/CA%20ERwin%20%20Data%20Modeler%20r7%203%2011-ENU/Bookshelf_Files/HTML/ERwin%20Online%20Help/Set_General_Model_Properties.html
Hope this helps.

organize sql server enterprise manager DB Diagram view

As i get more and more tables, using the diagram view becomes harder and harder. is there anyway to have it auto order or sort to align joined tables, etc and avoid having to do it manually
In the diagram view, right click on an empty white space and click arrange tables.
alt text http://img706.imageshack.us/img706/3193/71022491.png
As you get more and more tables, attempting to have a single diagram that shows your entire database becomes almost pointless. We've got multiple diagrams that show functional areas of our application(s). Such as Work in Process, Process History, Security etc. This is much more useful to us.
Randy

Resources