I have a set of tables which are connected through foreign keys , and almost all of them have the primary keys as auto increment identifier of sql server. The figure is given below .
Now when I am adding a row in storyboard table I need to know the auto generated storyboard Id on inserting the row so that using that I can insert the slides associated with it into slide table.
For this should I query the database for the Id created or is there any other way to use this ? Please tell me how to do this in sql server 2008
I am using asp dot net web service to interact with sql server.

You can use scope_identity(). And if you use SQL Server 2008 or SQL Server 2005 you can use the output clause of the insert statement.