Object-Role Modeling Fundamentals by Halpin Terry
Author:Halpin, Terry
Language: eng
Format: epub
Publisher: Technics Publications
Published: 2015-04-08T00:00:00+00:00
Figure 3.1 An ORM schema for Table 3.1, including value constraints
In principle, value constraints could be declared for CountryCode and CountryName, but the value lists would be very large (about 240 values in each list), and they would be somewhat unstable, since countries sometimes change their name, and over time some countries can be removed from or added to the official lists. So we’ll leave the conceptual schema as shown in Figure 3.1. When this is mapped to a relational schema, the code and name fact types for Country map to the table scheme Country(countryCode, countryName) with CountryCode as the primary key, and CountryName as a secondary key. We can now populate this table with the relevant data (e.g. based on country codes and names from the ISO 3166 standard). Such a table may be used in many databases, and is often called a reference table.
Although value constraints may seem fairly trivial, they are useful for picking up data entry errors, especially those that result from accidentally hitting the wrong key. Figure 3.2 provides a more comprehensive sample of value constraint settings for object types. These value constraint settings may also be applied to roles.
Ranges specified as n..m are assumed to be closed, so the end values n and m are included. For example, 0..100 includes 0 and 100 as well as the numbers in between. To exclude the start value n from the range, prepend a left parenthesis, and to exclude the last value m from the range, append a right parenthesis. So a range of the form (n..m excludes n but includes m; a range of the form n..m) includes n but excludes m; and a range of the form (n..m) excludes both n and m. This is useful if the underlying data type is a real number (e.g. float or decimal). On an ORM diagram, ranges are always displayed inside braces. For example, the range displayed as {(0..100} covers the positive (above 0) numbers up to 100. If desired, a square bracket may be used to explicitly indicate inclusion (the default). For example, “(0..100” and “(0..100]” mean the same. You may also combine enumerations and/or ranges into a single constraint, as in Figure 3.2(c).
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12571)
Hello! Python by Anthony Briggs(9916)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9796)
The Mikado Method by Ola Ellnestam Daniel Brolund(9779)
Dependency Injection in .NET by Mark Seemann(9340)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8298)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7763)
Grails in Action by Glen Smith Peter Ledbrook(7696)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7078)
Microservices with Go by Alexander Shuiskov(6846)
Practical Design Patterns for Java Developers by Miroslav Wengner(6767)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6705)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6414)
Angular Projects - Third Edition by Aristeidis Bampakos(6110)
The Art of Crafting User Stories by The Art of Crafting User Stories(5641)
NetSuite for Consultants - Second Edition by Peter Ries(5573)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5378)
Kotlin in Action by Dmitry Jemerov(5064)
