User-defined types and aggregates are written as entire classes. The developer
compiles the code and creates an assembly.
The assembly is uploaded into a SQL Server database, where it is stored in the
system catalogs using the CREATE ASSEMBLY data definition language (DDL)
statement.
Transact-SQL (T-SQL) objects, such as routines, types, and aggregates are then
created and bound to entry points in the assembly that has been already
uploaded by using the CREATE PROCEDURE/FUNCTION/TRIGGER/TYPE/AGGREGATE
statements.
The created routines can be used like T-SQL routines by applications.