views:

36

answers:

3

Is there a way to show table relationships as can be done in Access? Consider two tables:

Services
   serviceid
   application id

Application
   application id 
   application name 

I have already set up the diagram.

When opening the table service id I want to see the related application details like in Access.

Is this possible?

+3  A: 

First of all, you an always use access to connect to SQL Server and see relationships through it.

The built in database diagram feature will also show relationships, as you describe. You can find it under the database in question in the diagrams node.

Here is an article about different options to produce an ERD.


Update:

In order to see results, I would suggest using access to connect to SQL Server, as described in the link above.

The SQL Server GUI does not have this facility, and if you want to see results from several tables you need to write the SQL queries that will generate the wanted data.

Oded
i dont want too see the column names and the reltionship iwant to see the table data
maggie
@maggie - You need to execute SQL in order to do that.
Oded
@Oded. I think maggie means via the UI. In Access you can click the `+` symbol to expand the related rows from the child table.
Martin Smith
thank you, just needed to know if there was otherway
maggie
+1  A: 

You could also create a VIEW:

CREATE VIEW ServicesApplication AS
    SELECT S.ServiceID, S.ApplicationID, A.ApplicationName
    FROM Services AS S
    LEFT JOIN Applications AS A
    ON S.ApplicationID = A.ApplicationID

That way you can always access the coupled data easily by manipulating the ServicesApplication view instead of the separate tables.

littlegreen
+1  A: 

SQL 2008 doesn't have anything built in to provide that functionality. Almost sounds like you're looking to trouble shoot an application by looking at database entries...if thats true I'd recommend learning tsql well enough to write these statements as you need and not rely on another application to provide a visual interface. heh, if I'm completely wrong with that, ignore me :)

If you still want the 3rd party application route...I beleive TOAD has that functionality within it, though I've never connected it to a MS SQL 2008 server before. There are other third party applications out there that will provide this functionality, though I imagine they aren't all free. If you're looking for a free solution and already have Access going, Oded probably has the best idea here...connect MS access to the SQL 2008 server (linked tables) and use MS access to provide the features you want from ms access :)

M.E.