First Guide to SQL Anywhere Studio
PART 2. Getting Results with SQL Anywhere Studio
CHAPTER 9. Designing Databases with SQL Modeler
The structure of your database, such as the tables, relationships, views and triggers, is called the database schema. You use SQL statements to create and arrange these elements to your liking, but using these without a graphical tool can be confusing.
SQL Modeler gives you a graphical view of the structure of your database. Better, you can modify the structure of a database or create an entirely new one simply by drawing new tables or entering information. Once your design is complete, SQL Modeler can generate a SQL script to create your new database automatically.
The following diagram, which shows the structure of the sample database, is easily created using precisely this technique.
The performance of your database depends heavily on your design. In general, you should store information about different distinct types of objects, such as employees or products, in separate tables.
You can identify relationships between these tables using references, meaning that foreign keys in one table identify particular rows in another table. Many-to-one and one-to-many relationships can be represented by a reference. Many-to-many relationships require a two references and another table.