define seed script and give example of 1 for cakephp on mysql

3k views Asked by At

Read this article via Hacker monthly magazine feb 2011.

There is a part talking about seed scripts.

  1. Define what a seed script is.

  2. Please give a simple example of a seed script for a webapp that runs on cakephp using MySQL as database.

Keep jargon to minimum. Metaphors and analogies are welcome.

Personally I usually keep a separate sql dump data that i change everytime i change schema. This method works for me. If there is a better way, I want to know.

1

There are 1 answers

1
Leo On BEST ANSWER

A seed script is a script that generates dummy data, possibly using random values or a look up table of acceptable values. The script will create the SQL queries required to insert the data into the database and may also execute the query.