MySQL Workbench Modeling
This is the errata for the MySQL Workbench: Data Modeling & Development. While you try to eliminate all errors when you write a book and it appears the errors are minimal. However, re-reading the book and taking input from those who also read it, I find things missed or opportunities to improve clarity. This errata includes corrections of mistakes, suggestions for change, and improvements to the base text. If the book is successful, I’m sure they’ll make it into the next edition.
If you’re reading or read the book, please feel free to let me know of any uncaught error or suggestion that you may have. Thanks, Michael
Errata:
(Acknowledgment and corrections to MySQL Workbench: Data Modeling & Development)
Change Key:
removed text
added text
Chapter 1
Page 6:
The following provides instructions for Fedora 20, and it replaces the instructions for Fedora 16 from the textbook:
Install and Configure MySQL Products
- Download the MySQL Yum Repository and launch the downloaded RPM.
- Install MySQL on Fedora, Version 20, which you can find with the following command:
shell> rpm -qa | grep mysql mysql-community-release-fc20-5.noarch |
The fc20-5
changes with point releases, but assuming that you’re installing the fc20-5
release:
shell> sudo yum localinstall mysql-community-release-fc20-5.noarch |
- Install MySQL on Fedora with the following command:
shell> sudo yum install mysql-server |
- Start the MySQL service on Fedora with the following command:
shell> sudo service mysqld start |
- Secure the MySQL installation with the following command:
shell> mysql_secure_installation |
- Set the MySQL Service to start with the Fedora operating system with the following command (not
chkconfig
):
shell> sudo systemctl enable mysqld.service |
Restart the Fedora operating system to effect the changes.
- Reset the MySQL configuration file to enable external connections through Port 3306 with the following changes to the my:
Remark out the socket
line, like this:
#socket=/var/lib/mysql/mysql.sock |
Add the bind-address
and port
lines below after you know the actual IP address of the server to the my.cnf
file in the /etc
directory.
You substitute the actual IP address for the nnn.nnn.nnn.nnn
on the bind_address
line with the actual IP address returned by the ifconfig
command, like this:
shell> ifconfig |
Then, add these two lines to the my.cnf
file.
bind-address=nnn.nnn.nnn.nnn port=3306 |
- Restart the mysqld service with the following syntax:
shell> sudo service mysqld restart |
You can check whether MySQL is listening on Port 3306 with this syntax:
shell> sudo netstat –anp | grep 3306 |
Chapter 2
Chapter 3
Page 156:
The end of the chapter should show you how to change from the default Crow’s Foot relationship notation to one of the other options. The following should be added after the last sentence before the Summary section:
Not everyone wants to see their ERDs rendered in the default Crow’s Foot relationship notation. You have the option to convert MySQL Workbench’s default Crow’s Foot (IE) diagram to one of the other supported formats – Classic, Connect to Columns, UML, and IDEF1X. As mentioned earlier, the Crow’s Foot notation is also known as the Information Engineering Model method.
It quite simple to change the relationship notation. You open the Model Overview window, click on the Model menu choice. In the dialog, click on the Relationship Notation menu option. Click on one of the choices in the nested menu, like Column to Columns.
It’s up to you to choose a relationship notation that fits your business needs. I’d recommend the Crow’s Foot, or Information Engineering, model or the UML model.
Creating User Defined Types
You can create your own user defined types and use MySQL Workbench to model problems for the Oracle Database 11g. Click on the Model menu option, and in the menu window click on the User Defined Types choice, as shown in the following:
Choosing the User Defined Type option, launches the following form. You can enter customized user defined types in the User Defined Types module:
You enter user defined types by entering a name value and choosing valid MySQL type value before clicking the Add button. When you’ve added your last user defined type, click the OK button instead of the Add button. The next screen shot shows how you can create Oracle Database 11g native data types, specifically the NUMBER
and VARCHAR2
data types.
While this has shown that you can create User Defined Types, you should note that MySQL Workbench lets you create Oracle, PostgreSQL, and SQL Server ERD model through user defined types. The following is an example of a table with Oracle’s NUMBER
and VARCHAR2
data types to prove the flexibility of MySQL Workbench:
User Defined Types let you use MySQL Workbench to create Oracle ERD models.
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Appendix A
Appendix B
Appendix C