Modeling the Real World Its all about perspective
Modeling the Real World Its all about perspective. DISCOVER! Texas State Technical College
Modeling the World Why model? Computers are used in the everyday world, thus every computer system must model a real world domain. • Accounting • Finance • Human Resources • Inventory Management • Sales This applies to databases too. DISCOVER! Texas State Technical College
Modeling the World The Evolution of Modeling The Problem… Modeling the system: Early computer models forced the domain representation to fit a structure that didn’t accurately model the real world. The Solution… Object Oriented Approaches: Model the computer systems after the real world. DISCOVER! Texas State Technical College
Modeling the World Early Design Approaches Failings: • Lack of data encapsulation • All the attributes that described a real world object were separate, independent pieces that had to be tracked. They needed to be packaged together. • Weak ability to define relationships • Since there is no tangible object, how do you define relationships with other non-tangible objects? DISCOVER! Texas State Technical College
Modeling the World Object Oriented Design Key Concept: • Everything is viewed and created as independent objects. Implies: • Everything is an object, even actions and events. • Each object is a package of attributes (encapsulated), components, and defined relationships to other types of objects. DISCOVER! Texas State Technical College
Modeling the World Object Oriented Example [Car Engine Simple] Alternator attributes: ns contai Engine • voltage • watts attributes: • max HP • max Torque • fuel capacity • volume • max torque s e g ar co nta ins ch Battery attributes: • voltage total • voltage charged DISCOVER! Texas State Technical College
Modeling the World Object Oriented Example [Car Engine Detailed] Engine Alternator contains attributes: • max HP • voltage • max Torque • watts • fuel capacity • max torque • volume connected contains Terminal attributes: Battery attributes: • voltage total • voltage charged contains Wire Terminal attributes: • Capacity • Type: Positive Wire Terminal • Type: Negative Terminal • Resistance • Type: Positive attributes: contains attributes: connected • Capacity • Resistance attributes: connected • Type: Negative DISCOVER! Texas State Technical College
Modeling the World Object Oriented Example [Inventory] Item Order Of e s ha urc P For attributes: • size • color • category attributes: • Item Identifier • Customer Identifier • Date • Quantity Pla ce db y Customer attributes: • name • address DISCOVER! Texas State Technical College
Modeling the World Object Oriented Example [Department of Motor Vehicles] Vehicle attributes: • VIN Registrant of • Color • Age ner ship • Address • Year ne • Name Ow • Make by Ow • SSN rs hip attributes: Registration attributes: License Plate attributes: • Identifier • Registration # Identifies • Registrant # • Vehicle # • Date Registered • Date Expired • Year Issued DISCOVER! Texas State Technical College
Modeling the World Object Oriented Analysis • Most accurate representation of the real world. • Allows designers to better model the real world. • Leaves control to the designer, simple models will work but can also be as detailed as needed. • Flexible enough to be used in the design of any system. • Traditionally used primarily for programming languages. • C++ • Java • Database design is best visualized as Object Oriented. DISCOVER! Texas State Technical College
Modeling the World Relational Databases • Are the most common and frequently used means of information storage and organization. • Utilize an object oriented perspective and design. • Represent objects through the use of tables. • Represent object attributes through the use of fields. • Represent object relationships through the use of keys. DISCOVER! Texas State Technical College
Modeling the World In Summary… • Relational databases are the most commonly used. • They utilize an object oriented perspective and design. • Object oriented models allow us to better represent the real world • Object oriented models capture real world objects, their attributes, and their relationships to other objects. • Relational databases actualize the components through the use of tables (objects), fields (attributes), and keys (relationships). DISCOVER! Texas State Technical College
- Slides: 12