| What's New? | Search | Site Map | FAQ | Contact |
TSER: A Conceptual Manual
What is TSER?(Not all elements/functionalities are available in this version.) Modeling Approaches:
Models Integration and Expansion:
User/Application Level Views of TSERTo "picture SER", you probably should try the following perspectives:
A modeler could proceed along either of these two lines:
Modeling Level Views of TSER
Modeling Approaches:
Models Integration and Expansion:
The Two-stage Entity-Relationship (TSER) system is an information modeling CASE tool encompassing the following generic concepts: entity-relationship model, object-oriented paradigm, rule-based method and process representation, to support databases and rule-based systems design. Although TSER has its own unique design and methodology which can be used directly and independently, it is also compatible with three common perspectives of modeling that the user may choose to employ; all of which lead to the same data and knowledge capabilities that the system offers. These perspectives are:
TSER ConstructsThe Functional (Semantic) Modeling ConstructsThe first stage features user-oriented semantic-level constructs for object-hierarchy and processes representation. They are used for system analysis and information requirements modeling; referred to in TSER as the Functional (or SER) Level Modeling Constructs; and employed exclusively for capturing semantics. Subject: Primitives: Contains data items (attributes), functional dependencies (among data items), intra-SUBJECT rules (triggers, events, and dynamic definitions of data items belonging to a single SUBJECT), and association hierarchies (explodes as well as generalizes and aggregates SUBJECTs). Specific types of association include : classification (single and multiple inheritance and mandatory relationships), grouping (partial and function-defined inheritance and functional relationship) and process (no inheritance and no integrity implications on information management). Description: Represents functional units of information such as user views and application systems, and is analogous to frame or object. Context: Primitives: Contains inter-SUBJECT rules (characterized by references to data items belonging to multiple SUBJECTs), typically includes directions of flows for logic (decision and control) and data (communication, etc.). It is allowed to contain only descriptive rules used for holding together a set of SUBJECTs or SER models that otherwise do not have direct associations. Description: Represents interactions among SUBJECTs and control knowledge such as business rules and operating procedures and is analogous to process logic. Note: (1) The full contents (as applicable) must be specified for all SUBJECTs at the leaf level of the SUBJECT hierarchy. The class hierarchy implies integrity rules for applications, but its presence is not required. (2) Rules are constructed in the form of (a subset of) predicate logic where all clauses must only consist of the logical operators and the data items that have been declared or defined in the SUBJECTs (except for certain key words such as do and execute.). A data item may be defined to represent an executable routine, algorithm, or mathematical expression. (3) The three types of association of Subjects may exist simultaneously in a model and thereby create three abstraction plains for Subjects; namely, (i) generalization and strong aggregation (the classification type), (ii) ad hoc aggregation (the grouping type), and (iii) simple decomposition similar to Data Flow Diagram and IDEF (the process type). The Structural (Normalized) Modeling ConstructsThe second stage is concerned with providing a neutral normalized representation of data semantics and production rules from functional model for logical database design; and referred to in TSER as the structural (or OER) model. There are four basic constructs described below. Operational Entity (OE): Description: Entities; identified by a singular primary key and (optional) alternative keys and non-prime attributes, and implies Entity Integrity : no component (attribute) of a primary key may accept null value, and no primary key (as a whole) may accept duplicate values. Plural Relationship (PR): Description: Association of entities; characterized by a composite primary key and signifying a many-to-many and independent association, and implies Associative Integrity : each of the PK's component attributes must be a PK of some Entity and its values in the PR must match that in the Entity. Functional Relationship (FR): Description: A many-to-one association that signifies characteristic traits or composition relationships (corresponding to the grouping type of association of SUBJECTs). FRs represent the referential integrity constraints implied by the existence of foreign keys. The arrow side is called the determined side and points to either an OE or a PR, while the other side is called the determinant and is also linked to either an OE or a PR. The primary key of the determined side is included as a non-prime attribute (i.e., a foreign key) of the determinant side. Referential Integrity : the value of every foreign key in the determined must either be null or be identical to some PK value in the determinant. Mandatory Relationship (MR): Description: A one-to-many fixed association of OEs that signifies derived and inheritance relationships (corresponding to the classification type of association of SUBJECTs). MRs represent the existence-dependency constraint, and are symbolized as a double diamond with direction. The "1" side is linked to the owner OE while the arrow side points to the owned OE. Existence Dependency : when the owner instance is deleted, then all owned instances associated will it must also be deleted; and there is a foreign key implied in the owned whose value must match exactly the owner's PK value. Note: (1) In both top-down design and reverse engineering, the structural model
is typically derived automatically from the functional model by using
the TSER normalization and mapping algorithms. In sum, underlying these constructs at both stages are two types of primitives: data items and predicate logic. Therefore, the basic structure of TSER metadata is characterized by (1) data representation as relations, (2) knowledge representation in the form of production rules, and (3) the two representations being tied via data items. Modeling using the TSER constructs:There are two ways a data modeler might want to use TSER to model entities and relationships; one is by using the (OER) Entity-Relationship diagram and the other is using the higher level (SER) Subject-Context diagram. There are outlined below. 1. Using the OER: The definition incorporates cardinality and semantic constraints in this way. There is one type of entity and there are three types of relationships. The entity is defined by a singular key, while the relationships define (1) Plural Relationship (many-to-many) between/among entities, (2) Functional Relationship (many-to-one) between entities, and Mandatory Relationship (one-to-many). One-to-one will be defined as MR if the association is fixed, otherwise FR. MR includes, but are not limited to, the original ER modeling concept of "weak entity"; it signifies fixed association and thereby differenciates it from a mere reverse expression of many-to-one (which will be considered as an FR with the arrow pointing to the one-side). PR's have real data structures (plural keys, with or without additional attributes), but FR's and MR's are integrity constraints, when implemented into a schema. Once an OER diagram is created, save it. Then, create an application subject to represent the whole model and define each and every data item in it, resulting in a single subject SER model. Save it. You are ready to use a schema generator to create a database design now. The data structures and integrity rules will all be included in the schema for actual implementation. 2. Using the SER: There are two types of information you can model at this level; data (along with semantic constraints) and (business/operating) rules. The first is modeled in Subject, and the second both Subject and Context. For data, you define functional dependencies to specify their semantical relationships. As explained - and illustrated with examples - in the online Help (under the heading "functional dependency"), there are a few ways to model cardinality and other relationships. "->" implies many-to-one; "<->" one-to-one, and "<<-" fixed one-to-many (MR). In addition, the LHS can be singular or multiple items; thus, a way to model MVD (or many-to-many without dependent attributes) is to group them and specify an (trivial) one-to-one FD for it such as (a,b) <-> (a,b) when a many-to-many b. A Subject in this approach represents a view, an application, a form, a report, and so on, thus the user does not have to be asked to specify entities and relationships in the way they do with the ER model. The Subjects will be further linked thru Contexts either horizontally (like in DFD) or hierarchically (in an O-O manner), or combined; and the horizontal model can be aggregated up or decomposed down. If you stop here, save the diagram, and then map it to OER to automatically create a normalized ER diagram. You can map more than one SER diagrams/files at one time and they will be consolidated into one OER. Save it as a file. At this point, you can create a DBMS schema as above. (Note, the schema generator assumes both SER and OER files.) 3. Modeling Rules using TSER: If you want to specify business/operating rules, then use SER. A rule can be entered into either a Subject or a Context, depending on whether or not the data items involved in the rule belonging to the same single Subject. If not, then it populates a Context that link all Subjects taking part in the rule. These rules are/can be automatically implemented in some DBMS (e.g., Oracle v.7), but mostly they are only recorded in the application schema or some manual implementation. They are populated into the metadatabase that consolidates all information models for an enterprise, though. Implementation Level Views of TSERThe four types of OER (structural) constructs define four types of integrity rules. They are always included in the suggested schema that TSER produces. Whether or not these rules can be automatically created by TSER for implementation into a database, however, depends on the integrity control facilities provided in the DBMS. In latest systems, the key integrity rules (Entity and PR) are commonly available and TSER is able to incorporate them for the schema generators provided. Referential integrity (FR) and existence rules (MR), on the other hand, are not automatically implementable yet in most cases. As you know, even Oracle v7 that provides triggers (and nominal referential rules) has some basic difficulty in this implementation. At this point, we do what the DBMS's have to offer in their standard facility. When the rule implementation/creation capability is developed (see #2 above), we'd be able to implement all integrity rules and more into the schemas. Example 1: A Simple Hospital ExampleThe basic mechanism of TSER is illustrated in a simple hospital information system where all information resources are put into one subject. The semantics of these data items are represented using the concept of Functional Dependency, which defines the determinent data item(s) on which certain other item(s) uniquely depends - the latter being clustered around, derived from, or identified by the former. An example is that patient-ID determines ("-->") patient address and date-of-birth. Note that neither address nor date-of-birth determine (or uniquely identify) patient-ID since there could be multiple patients who have the same address or date-of-birth. Similarly, the combination of patient-ID, surgeon_ID and Date-of-surgery determines a unique surgery, but the individual elements of this group on their own do not. In this first example, a hospital is modeled from the perspective of surgeries performed on patients, and hence a single subject (SER) of surgery is formed in the first stage. The system then determines a primary key for the subject and decomposes it into basic entities and relationships (OER) according to the dependency theory of data normalization; this is the second stage. An Oracle schema is generated for the OER model afterwards. The SER, OER and the Oracle schema generated for this model are given in figures A,B and the table 1, respectively.
Fig. A: The single-subject SER model for the hospital
Fig. B: The OER model for the hospital Table 1: The Oracle schema definitional statements for the hospital SET AUTOCOMMIT ON; CREATE TABLE date_surg CREATE TABLE p_number CREATE UNIQUE INDEX p_numberNDX ON p_number CREATE TABLE s_number CREATE UNIQUE INDEX s_numberNDX ON s_number CREATE TABLE po_drug CREATE UNIQUE INDEX po_drugNDX ON po_drug REMARK RELATIONS FOR PRs CREATE TABLE p_surgery CREATE UNIQUE INDEX p_surgeryNDX ON p_surgery REMARK ASSOCIATE CONSTRAINTS SET AUTOCOMMIT OFF; Example 2: A University Information SystemTable 2: Details of the University SER Model Here are some details of the above University SER model. These are representative examples and not all details relating to SUBJECTs/CONTEXTs (e.g., inheritance) are presented. SUBJECT NAME: University DESCRIPTION:University Information System SUBJECT NAME: University DESCRIPTION:University Information System SUBJECT NAME: Education DESCRIPTION: Information System for University Education SUBJECT NAME: Student DESCRIPTION: Student Information THEN Request_Record_Verification(STUD_NO) ; SUBJECT NAME: Course DESCRIPTION: Course Information SUBJECT NAME: Teacher DESCRIPTION: Teacher Information SUBJECT NAME: Building DESCRIPTION: Campus Buildings and Rooms CONTEXT NAME: Univ_IS DESCRIPTION: Context relating Administration, Research and Education CONTEXT NAME: Registration DESCRIPTION: Student-Class Registration CONTEXT NAME: Scheduled DESCRIPTION: Student-Class Registration CONTEXT NAME: Residence DESCRIPTION: Student-Class Registration TSER in a Nut ShellIn a nut shell, the SemanticER can be used most easily this way: the Subject is either comparable to Object (in the OO personality) or to Form/application (in a trational requirements analysis methodology). The Context, on the other hand, can be compared to Process which Input/output or these forms/applications and thereby interact plural Subjects. All logic and constraints of the process are represented in production rules in the Context. Rules/triggers can also be included in the Subject if they pertain only to the subject. Functional dependencies are then declared for the data items included in each Subject. The system normalizes (at the level of BCNF with integrity rules) these Subjects into OperationalER. Thus, the resulting ER (in four types: Entity and three Relationships) is comparable to the (final refinement of the) traditional ER which follows some rigorous discipline to ensure relational soundness. The SemanticER does not bear direct resemblance to traditional ER, while OperationalER does. Two of the three Relationships are pure integrity representations (one-to-many and many-to-one) relating Entities and the (Plural) Relationship (many-to-many). |
viu.eng.rpi.edu
is hosted by Professor Cheng Hsu. Copyright © 1997-2008. MetaWorld, Nothing on this site may be commercially used without written consent. |