Automatic create SQL database and table relationship
You could use database diagrams, drag and drop your tables and use the designer to create the relationships for you. Open SSMS, expand the server, expand Databases, expand the database you want and it should be the first folder. If it asks to install things, say yes and away you go.