To connect to the SharePoint Foundation 2010 database through SQL Server Management Studio (SSMS), you need to use ‘SERVERNAME\Sharepoint’ if you have used the default express instance install. Alternatively, you can go to your Site Administration page, click on ‘Manage content databases’ under Application Management and click on the database name (WSS_Content). When the page loads, you should see the Database server listed.
For more info, see http://weblogs.asp.net/jevgeni/archive/2010/01/14/connecting-to-sharepoint-foundation-2010-internal-database.aspx