There are many way to attach an .mdf file (primary database file) without an .ldf file (transaction log file), the following are two examples:
EXEC sp_attach_single_file_db @dbname='TestDb',
CREATE DATABASE SYSNEWBIE ON
(FILENAME = N'C:\DB_Folder\SYSNEWBIE_DB.mdf')
I hope it will be useful for you, see you soon!