DefinitionA Database mockup is a copy of the objects and rows that are affected by the DMLs in your SQL Script. Mockups are not copies of the entire database nor the entire table. If your DML only affects 1 record in 1 table, only 1 record and only 1 table will be created in your "Simulated Database". SQL Simulator can create 2 types of Mockups.
Before we get started.......Please click here to read the technical overview of how SQL Simulator works. What are Preview Mockups?Preview Mockups show you the objects and rows affected by your SQL script before it is executed against the database. For example lets say I have the following SQL: update color set color_name = 'yellow' where color_id = 1; You process this SQL in the SQL Simulator and have it generate a preview mockup. This is the result you will see in the simulated database
You may be thinking shouldn't the color_name = 'yellow'. The reason you see 'black' is because the simulator is showing you the current value as it exists in production. Your script has not been run yet. These are the objects and rows affected by your script. FYI your production database is not updated. What are Postview Mockups?Preview Mockups show you the objects and rows affected by your SQL script after it is executed against the database. For example lets say I have the following SQL: update color set color_name = 'yellow' where color_id = 1; You process this SQL in the SQL Simulator and have it generate a postview mockup . This is the result you will see in the simulated database
The value in color_name = 'yellow' this time. This is because the Simulator is showing you what the value of your column would be after your sql script has run. FYI your production database was not updated. The above examples are fairly simple and straight forward. However you can do more complex scripts(Especially Foreign Keys). Feel free to try more complex SQL Scripts with SQL Simulator. You can give it a try for free by clicking here.
0 Comments
Leave a Reply. |