What are Data Extensions?
Data extensions are tables. Literally, there is a MSSQL database underlying the Salesforce Marketing Cloud account you are logged in. And all tables you create will be in the same schema, that’s why you cannot repeat names even if using different folders from the folder navigation tree.
You will most probably have a database model in each Marketing Cloud implementation. The complexity of your model may vary based on your business domain; keep in mind that SFMC does not support foreign keys creation. You can set your Primary Key (simple or compound) but not Foreign Keys. As a developer you will trust your good habits and you will most probably build a normalized model anyway. End of the day your data integrity will depend on how clean and organized your data imports and data management is.
As an outsider to Marketing Cloud there is one important categorization you need to know. Data extensions are tables, but there is a semantic differentiation in two categories: sendable and not sendable. A sendable data extension will contain contact records, it's basically a table that will hold an audience for a marketing communication. A non sendable data extension is any kind of satellite table necessary for your domain model.
Here some useful general information on data extensions:
- In case you need it, an autoinc field is included by default in any data extension you create. It's not shown in the data extension properties, but you can query it under the name of _CustomObjectKey. You cannot create autoinc fields on your own.
- Your sendable data extension needs to include (unless for a very specific exception) one and only one field with type email address. Do not include more than one, even if the platform does not show any warning message Marketing Cloud will go into an erratic behaviour if you do so.
- Do you need a varchar(max) field? create a text field and leave the length empty.
- There is no license limit on the data extension count or record count in each (I will cover contact builder, data extension association and license implicances in another post).
- If you find yourself in manipulation of big record counts and you face performance issues that you cannot solve by leveraging PKs only, know that you can create non clustered indexes. I will go deeper into this in another article. Here I will say that sadly you cannot create a non clustered index on your own and you would need to open a support ticket to do so.