Complex sentence: For example, if it is necessary to obtain a random number for use as a primary key, and MySQL does not support that function, a new, external function could be written and compiled to accomplish this task.
Split into simpler sentences: For example, sometimes it may be necessary to obtain a random number for use as a primary key (a function that MySQL does not support). In this case, a new, external function could be written and compiled to accomplish this task.