开发者

SQL script initializing a database for the first time

开发者 https://www.devze.com 2023-03-29 17:31 出处:网络
I am writing Web app. My program creates relations itself when it is needed, basically when the program is deployed and run first t开发者_开发问答ime. But I see that it is very common to create SQL sc

I am writing Web app. My program creates relations itself when it is needed, basically when the program is deployed and run first t开发者_开发问答ime. But I see that it is very common to create SQL script and run it to initialize data-base for the first time. Is it compulsory to do this?


No, it is not compulsory for the database initialization script to be part of the "first run" of your application; preparing the database can be a deployment step. In fact, depending how long it takes to initialize the database, you might specifically want to avoid initializing the database on the first run, and instead make sure it is deployed and initialized before the first time the application is accessed.

0

精彩评论

暂无评论...
验证码 换一张
取 消