Expanding on Yan's answer, there's a very simple syntax if you use the Sql extension - You need both the MDF and LDF (Data + Log files) included for your SQL database, but then attach them by referencing the same filename.
The following assumes a sql express server will be installed locally under the localhost\sqlexpress instance
<Property Id="SQLINSTANCE" Value="SQLEXPRESS" />
<Property Id="SQLSERVER" Value="LOCALHOST" />
<Property Id="DATA_FOLDER" Value="C:\Program Files\Microsoft SQL Server\MSSQL11.SQLExpress\MSSQL\DATA\" />
<Component Id="Sql_Database_Deploy" NeverOverwrite="yes" Directory="[DATA_FOLDER]">
<File Source="Northwind.mdf"></File>
<File Source="Northwind)log.ldf"></File>
<sql:SqlDatabase Id="SqlDatabase" Database="Northwind" Server="[SQLSERVER]" Instance="[SQLINSTANCE]" CreateOnInstall="yes" DropOnUninstall="yes">
<sql:SqlFileSpec Filename="[DATA_FOLDER]Northwind.mdf" Id="Northwind_SqlFileSpec"/>
<sql:SqlLogFileSpec Filename="[DATA_FOLDER]Northwind_log.ldf" Id="Northwind_SqlLogFileSpec"/>
</sql:SqlDatabase>
</Component>
I've omitted authentication from this example for brevity, but you can also specify a Sql user to use for the command using the User element, and referencing the User element's Id within the SqlDatabase attribute.