Question: 2- MySQL Database Scripting 2. Write a complete script in mysql to create a new database (also called 'schema' in MySQL) Bookstore. This database or
2- MySQL Database Scripting
2. Write a complete script in mysql to create a new database (also called 'schema' in MySQL) Bookstore. This database or schema should contain exactly the same pair of tables, Book and Subject, as given. That is, your script must contain SQL DDL statements of CREATE DATABASE and CREATE TABLE(s), plus SQL DML INSERT statements to insert 30 books and 12 subjects into these two tables, respectively. All constraints, including data types, primary keys, not null, and the foreign key must be included in your script.
3. You should test your script by executing the entire page as a whole to see if it can create Bookstore database without errors. For this test, use the 3rd icon, the yellow lighting without 'I', to execute the entire script of statements as one batch. If it runs with no errors, you can click 'Schemas' tab in Navigator and right-click on the white space area inside Schemas tab and select 'Refresh All' to view your Bookstore in detail (very similar to how it works in SSMS).


Object Explorer TX SIB-PCYSQLEXPRESS...tore - dbo.Subject SIB-PCSQLEXPRESS....tore d Column Name Data Type Connect \ ? E SIB-PCLSQLEXPRESS (SQL Server 13.0.4001Subjectcode To Null vachar(3) vhar(15) Databases Subject ? ?? System Databases I?? Database Snapshots Bookstore ? Database Diagrams Tables ?'i. System Tables FileTables ' External Tables ? dbo.Book E dbo.Subject ?_? Views E) I?ll External Resources Synonyms Programmability ? Service Broker
Step by Step Solution
There are 3 Steps involved in it
To create a MySQL script for the Bookstore database with tables Book and Subject follow these steps Step 1 Create the Database sql CREATE DATABASE IF ... View full answer
Get step-by-step solutions from verified subject matter experts
