maggie
maggie

Reputation: 193

show relationships like Access

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?

Upvotes: 1

Views: 1597

Answers (3)

Twelfth
Twelfth

Reputation: 7180

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 :)

Upvotes: 1

littlegreen
littlegreen

Reputation: 7420

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.

Upvotes: 1

Oded
Oded

Reputation: 498914

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.

Upvotes: 3

Related Questions