Most O/RM frameworks provide a means to initialize and seed a database. Via Code. For example, Entity Framework allows you to create a custom database initializer and implement a seed method to provide seed data (If you just want to have it generate the database, creating a seed function is not necessary).
If you're not using an O/RM, you can use the built-in function of your Database to generate a create script. For example, here is a walkthrough of how to do it with SQL Server
Yet another option would be to put your database scripts into source control (if you're manually managing the database), of course you'd need a way to have the scripts compiled into a single execution, also taking care to order the scripts properly in order to properly handle dependencies between the tables.