6

Although there are GUI tools in VS2010 for entering data, writing queries etc against a SQL CE4 db, there doesn't appear to be a way to visualise the database in a digram.

So my Questions are

A) Have i missed something in VS2010 tools for sql Server CE4

b) Can i use SMSS to Diagram SQL CE4 databases. I've tried it but it wouldn't allow open the db. Is there a plugin available?

Thank you.

nulltoken
  • 64,429
  • 20
  • 138
  • 130
MrBliz
  • 5,830
  • 15
  • 57
  • 81

3 Answers3

10

Microsoft does not supply a diagramming tool for SQL Server Compact 4, you could try my VS 2010 add-in http://sqlcetoolbox.codeplex.com (Create Database Graph) or the Data Port Console from http://www.primeworks-mobile.com

ErikEJ
  • 40,951
  • 5
  • 75
  • 115
3

Actually, there IS a diagramming tool for SQL CE right into VS, but it's hard to find.

I only tried this in VS 2012 Preview, but it might work in older versions - please speak up in the comments.

Here's how to get to it:

In 'server explorer' create a normal connection to the SQL CE database. (No diagramming options are visible...)

Then right-click a table -> "Show table data"... Wait for it...

Hit Ctrl-1.

TA-DA!!

Alternatively, Right-click in the window with the tabular data and choose "Pane" from the context menu. (I know, 'Pane' !?)

Finally, from the 'Pane' submenu click the obvious choice - "Diagram".

There you have it.

Designer window

Cristian Diaconescu
  • 34,633
  • 32
  • 143
  • 233
  • 1
    Sadly, this doesn't allow you to save the relationship as a database diagram. It's single use only. – Chris Felstead Aug 17 '12 at 09:10
  • @Chris Quoting the question: "[...]there doesn't appear to be a way to visualise the database in a digram[sic]". A quick way to vhew the relationships was all *I* was after when looking after such a tool (to see what kind of db was generated by EF model-first). I think it brings value, r/o as it is. – Cristian Diaconescu Aug 19 '12 at 19:53
  • this is close, but for me it generates a lot of incorrect relationships, thinking tables with same-name primary keys have 1-1 relationships – Dave Cousineau May 25 '14 at 02:24
0

SDF Viewer is now able to create database diagrams for SQLCE databases

Howard
  • 11
  • 1