Chapter 3 Structure Models.docx

7 Pages
Unlock Document

University of Waterloo
Accounting & Financial Management
AFM 341
Jee Hae- Lim

3 Structure Models - Describe the data and information structures inherent in a business process or processes o Primary purpose is to create blueprint for the development of relational database to support the collection, aggregation, and communication of process information o Data models been used to represent the conceptual contents of database  Charles Bachman developed data structure diagrams (Bachman diagrams)  Peter Chen developed entity relationship modeling - Model of logical database structures must be able to describe: o Entities or things in domain of interest o Relationship o Cardinalities that describe instances of one entity can be related to another o Attributes or characteristics of entities and relationships Unified Modeling Language Class Diagrams - UML class diagram notation for structure models - Object Management Group is a not for profit consortium that maintains and publishes specification for UML - Class diagrams are one type of diagram within UML and similar to entity relationship diagrams Building Blocks for UML Class Diagrams Classes - Any separately identifiable collection of things about which the organization wants to collect and store information o Can represent organization resources, persons, events, and conceptual structures  Implemented as tables in a relational database o Each class in organized into a rectangle with three compartments:  Class name, attributes and operations Associations - Depicts the relationship between two classes o Customers participate in sales , professors teach courses Multiplicities - Describe the minimum and maximum number of times instances in one class can be associated with instances in another class o Indicate whether participation in relationship is optional (0) or mandatory (1) o Max values for a pair of multiplicities for single association describe relationship between classes as one to one, one to many, or many to many Attributes - Data elements that describe the instances in class o Include data type, default value, constraints on the value and other descriptive info - Primary Keys is an attribute that uniquely identifies each instance in a class or row in table o Cannot be null o Cannot change over time o Controlled by organization that assigns it o Shorter is better Other Relationships - Generic relationship = association - Special purpose relationship: o generalization (inheritance) o Aggregation o Composition  Used to clarify relationship in particular model but can also be modeled using associations Other Useful UML Class Model Notation Best Practices in Preparing Class Diagrams - Objective: describe the important elements of a domain of interest clearly, concisely and accurately - Tools to aid in planning, documenting, discussing, implementing and using database systems - Modeling best practices: o Common terminology o Link only when there is clear purpose o Avoid crossing lines o Consistently sized class rectangles o Avoid running association lines close o Simple o Analysis first o Use note for more complex transaction UML Class Models for Relational Database Design Mapping classes to Tables - Basic process for mapping a UML class diagram to a relational database schema: o Map classes to tables o Map class attributes to table fields and assign primary keys o Map associations to foreign keys  Multiplicities determine the foreign key placement  One person can own many autos (one to many relationship)  Primary key for person is posted in Auto as a foreign key o Create new tables to implement many to many relationships  Default primary key for the new table is the combination of the two primary keys for the associated table  In figure 3.7, each auto can be serviced by many dealers and each dealer can service many autos, thus, the “service by” association is implemented by creating a new table with a primary key that includes both auto ID and dealer ID (concatenated key) o Implement relationships among tables - Figure 3.9 implements the class diagram shown in f
More Less

Related notes for AFM 341

Log In


Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.