700 likes | 938 Views
BCIS 4620 INTRODUCTION TO DATABASE PROCESSING Class 7. Spring 2009 Dr. Jack D. Becker. CLASS 5 -- Semantic-Object Data Modeling and Normalization-- SO Diagrams. Announcements Semantic Object Model [SOM] Appendix E; Kroenke Normalization (Review Chapter 5 K) Homework #4 Review (NX COBSQL)
E N D
BCIS 4620INTRODUCTION TO DATABASE PROCESSINGClass 7 Spring 2009 Dr. Jack D. Becker
CLASS 5 -- Semantic-Object Data Modeling and Normalization-- SO Diagrams • Announcements • Semantic Object Model [SOM] • Appendix E; Kroenke • Normalization (Review Chapter 5 K) • Homework #4 Review (NX COBSQL) • COBOL with Embedded SQL statements • Homework 5 Preview – SOM & Alameda
Announcements • CLASS #6 -- Announcements, misc.., etc. • Class Announcements • CISO meetings • BUSI xxx? THURS; 5-6:20 p.m. • Cabinets on 3rd Floor BCIS: • Name MUST be on Spine/Edge of 3-Ring Notebooks
Homework #4 • SQL/DS Essentials • Use SQLCOBOL.SQLCOB as the programming template. • Basic Control Break Report • Class Notes: Chapters 4 & 5 Data Types (Handout) • REFRESH.DBSINPUT?? • EMP, DEPT • VIEW (may wish to create your own) • STATISTICS?? • EXEC SQL. Embedded SQL in COBOL
K: Appendix E -- The Semantic Object Model (S-O Model) • OBJECTIVES: • Define Semantic Objects & TableDesigner™ • Define 7 Basic Types Of Semantic Objects • Use Semantic Object Diagrams To Build A Data Model (College Example) • Compare S-O Model To E-R Model • Bottom-up Vs Top-down… • Semantic Object Model Vs Object-oriented Programming • S-O Model Represents An Alternative View Of The Users' Model [Fig E.1]
S-O MODEL CHARACTERISTICS • S-O Model More Bottom-Up-Oriented than the E-R Model • Both Are a Type of "Pseudo-Code“ or "Flowchart" Tool For DB Design • David Kroenke primary developer of the SO Model (1994). • The Model Is Robust But Lacks Standards. • NOT Widely Used Yet in CASE Tools.
S-O MODEL DEFINITIONS • * Semantic Object • * Object Identifier (primary key) • * Object Properties or Attributes • * Semantic Object Links • * Formulas
S-O MODEL DEFINITIONS • * Semantic Objects -- Represented by a Rectangle (See Fig E.2.a) • A named collection of Properties that sufficiently describes a distinct entity (Things, Objects (Nouns) Of Importance To The Users' Data Model) • E.g., Employee, Customer, Inventory, Order, Etc. • Instance Of A Semantic Object (Fig E.3) • Employee “Jack Becker” • Semantic Object Classes -- • Collections Of Same Types Of Objects
S-O MODEL DEFINITIONS • * Semantic Objects are Distinct Entities -- • There are NO “weak” semantic objects! • See Fig 3.2: Line_Item would be property of ORDER, not a distinct entity. • Semantic Objects are ALWAYS independent!! • Names in CAPITAL letters • Semantic Objects: • Must Exist In The Minds Of The Users-- • This is Why They Are Called Semantic Objects
S-O MODEL DEFINITIONS • Object Identifier: • Identifies A Unique Object Instance (Key) • May Be a Group or Composite (concatenated) Key (OrderNum, LineNum), (Cust_Name, Cust_Addr) • ID NameMixedCase • ID UniqueId when underlined
S-O MODEL DEFINITIONS • * Properties (Or Attributes) -- Fig E.2 Characteristics Of Semantic Objects: • Simple Data Values (S) • Multi-Valued (MV or 1.N) • Composite or Group Attributes (G) • Object attributes or Semantic Object Links(SOLs); • (see below) • Paired attributes: If an object contains another object, the second object will contain the first [SOLs are reciprocal] • USE Mixed Case for Naming Convention: DeptId
S-O MODEL DEFINITIONS • * Semantic Object Link (SOL) (Fig E.3) • Special Type of Property • Recursiveness • Represented by a rectangle inside of the SO • Establishes a relationship between two SOs • * Formulas (F) • Formula Functions: SUM, COUNT, MIN, MAX, AVG • Formula Expressions: e.g., • Monthly_Salary = Salary / 12
Figure E.2 (a) & (b) SOLs Cardinalities shown
S-O MODEL DEFINITIONS (Misc.) • Property Domains • Set Of All Possible Values Of A Property • Semantic Object Views (Fig. E.4) • Subset Of Properties Of S-O Required By A Particular Application Or User. Synthesis Of Multiple Objects • Views Required To Build Complete Object Diagram.
S-O DIAGRAMS Guidelines • Picture Of User’s Defined Objects • Non-Standard notation • Rectangles for Objects; NAMES in Capital letters inside rectangle • Object Properties written in MixedCase • SOL -- Written in Capital letters inside their own rectangles within the SO • Groups (Composites) properties are bracketed or braced on Right-hand side
S-O DIAGRAMS Guidelines (continued) • Multi-valued property Cardinalities are shown as Subscripts: • 1.1, 1.N, 0.1, 0.N, etc. (also, MV) • Actually Minimum and Maximum Cardinality for each property (ID, S, G, or SOL) • Min.Max The minimum and maximum allowable occurrences for each property. • 0.1 means that the property may have no instances, but at most 1. • 1.N means that the property must have at least one instance, and could have many instances.
S-O DIAGRAMS Guidelines(continued) • Creating SO Data Models • Bottom-Up Vs Top-Down • Examine Screens, reports, or objects in the Users’ environment • EXAMPLE: • University Administrative DB (See Chap. 5) • Start with College Object [Entry Object] • Object Specifications: Object Definitions and Domain Definitions
7 Types of Semantic Objects • SO Types • Simple Object • Composite Object • Compound Object • Association Object • Hybrid Object (Most Common) • Parent/Subtype or Generalization Objects • Archetype/Version Object • Semantic Object Cardinalities • A single-value attribute is an attribute whose maximum cardinality is 1 • A multi-value attribute is one whose maximum cardinality is greater than 1 • A non-object attribute is a simple or group attribute
7 Types of Semantic Objects (continued) • Simple Object (Fig E.5) • Contain Only Single-Valued, Non-Object Properties • Composite Object (Fig E.7) • Contains One Or More Non-Object Properties, MV Properties; Properties May Be A Group • Compound Object (Fig E.9 – E.18 • Contains At Least One Object Property; SOL • Association Object (Fig E.25- E.26) • An Object Which Relates Two Or More Objects
Figure E.7 Composite Object“contain one or more multi-value, non-object attributes”
7 Types of Semantic Objects(continued) • Hybrid Object • Combination Of Objects Of Other Types • Generalization And Subtype Objects (Fig E.27) • Special Case Of Compound Object. • Super-Type Objects Contain The Sub-Type Objects. • Sub-Type Objects Inherit The Properties Of The Super-Type Object. • Can Have Several Layers (Fig B.29)
Parent/Subtype Objects • A subtype acquires, or inherits, all of the attributes of its parent • Subscript P indicate the first attribute of a subtype, the parent attribute • Identifiers of the subtype are the same as the identifiers of the parent • Subtype attributes have subscript 0.ST or 1.ST • 0 or 1 is the minimum cardinality and ST indicates that the attribute is a subtype • An object may contain more than one subtype attribute
Archetype/Version Objects • An archetype object is a semantic object that produces other semantic objects that represent versions, releases, or editions of the archetype
S-O DIAGRAMS Guidelines • 6 STEPS IN SO DIAGRAMMING: • 1. Identify Key Semantic Object(s) In Business Case; Start with “Entry Object” • 2. Populate Semantic Object with Properties or Attributes • 3. Identify Properties that are PK or FK • 3. Identify Properties that are MV or SOL • 5. Ask What Queries Will Be Made By Users? • 6. Iteratively Design The SO Model
7 Types of Semantic Objects SO Types: • Simple Object • Composite Object • Compound Object • Association Object • Hybrid Object (Most Common) • Parent/Subtype or Generalization Objects • Archetype/Version Object
INTERMISSION • SEE YOU IN 10 MINUTES
RECALL the 3 DATA MODELS • Hierarchical Model (single parents; single physical pointers) • Relational Model (tables with embedded keys) • Network Model (multiple parents; multiple physical pointers) • Semantic Objects do NOT assume relational models; however TableDesigner does!
TableDesigner™DEMO (Version 1.1)[See Appendix E: SOM: Handout/Class Notes] • Files ==> Albums (.apm) • Objects (SOL); Items; Groups; Domains (F3) • Profile Manager Window; Model Designer Window • Properties (F6); or right click • ID (**; unique); Single Value; Group; SOL • Group Properties (Edit/Modify Object) • Arrange Objects • Generate SQL statements • Generate Database (F2)