Associative entity navicat data modeler6/22/2023 Each book can be involved in multiple sequential transactions. The following relationships exist between the entities:īooks and Transactions: one-to-many. Relations show the relationships between entities: one-to-many, many-to-one, or many-to-many. (For datatypes, select from the Domain types, except for transaction_date, which uses a Logical type.)Ģ.1.5 Creating Relations Between Entities (Suggestion: Draw the box below and centered between the Books and Patrons boxes.) The Entity Properties dialog box is displayed.Ĭlick General on the left, and specify as follows:Ĭlick Attributes on the left, and use the Add (+) icon to add the following attributes, one at a time. In the main area (right side) of the Data Modeler window, click the Logical tab.Ĭlick in the logical model pane in the main area and in the Logical pane press, diagonally drag, and release the mouse button to draw an entity box. Create the Transactions entity as follows: For example, a patron returning two books and checking out three books causes five transactions to be recorded (two returns and three checkouts). Each record is a single transaction, regardless of how many books the patron brings to the library desk. The Transactions entity describes each transaction that involves a patron and a book, such as someone checking out or returning a book. Click Add to start each definition, and click Apply after each definition. In the Domains Administration dialog box, add domains with the following definitions. (These added domains will also be available after you exit Data Modeler and restart it later.)Ĭlick Tools, then Domains Administration. You therefore decide to add appropriate domains, so that you can later use them to specify data types for attributes when you create the entities. Titles (books, articles, and so on) can be up to 50 characters. Other identifiers are numeric, with up to 7 digits (no decimal places). Zip codes (United States postal codes) can be up to 10 characters ( nnnnn- nnnn).īook identifiers can be up to 20 characters. State codes (United States) are 2-character standard abbreviations. Street address lines can be up to 40 characters. The first and last names of persons can be up to 25 characters each. In planning for your data needs, you have determined that several kinds of fields will occur in multiple kinds of records, and many fields can share a definition. You will perform the following major steps: (For information about the approaches, see Section 1.4, "Approaches to Data Modeling".) This simplified tutorial uses only a subset of the possible steps for the Top-Down Modeling approach. If the instructions do not mention a particular dialog box, tab, or field, then do not specify anything for it. For more advanced tutorials and other materials, see Section 1.11, "For More Information About Data Modeling". The model is deliberately oversimplified and would not be adequate for any actual public or organizational library. This tutorial uses the same entities as for the tutorial provided with the SQL Developer online help. In this tutorial, you will use Data Modeler to create models for a simplified library database, which will include entities for books, patrons (people who have library cards), and transactions (checking a book out, returning a book, and so on). 2 Data Modeler Tutorial: Modeling for a Small Database
0 Comments
Leave a Reply. |