Morpheus Schema

Document Sample
Morpheus Schema Powered By Docstoc
					                           fc62851d-0204-4ca3-a105-ac1b298f61ef.doc Page 1                                              1/8/2011


                                                    Table of Contents

1.Main Entities .................................................................................................................... 2
  1.1.Transforms ................................................................................................................ 2
     1.1.1 Fields .................................................................................................................. 2
     1.1.2 Related Tables .................................................................................................... 2
  1.2. Web Services ........................................................................................................... 3
     1.2.1.Fields .................................................................................................................. 3
  1.3. Data Types ............................................................................................................... 3
     1.3.1 Fields .................................................................................................................. 3
     1.3.2 Related Tables .................................................................................................... 4
  1.4 Lookup Tables .......................................................................................................... 4
     1.4.1 Fields .................................................................................................................. 4
     1.4.2 Related tables ..................................................................................................... 4
  1.5 User Tables ............................................................................................................... 4
     1.5.1 Fields .................................................................................................................. 4
     1.5.2 Related tables ..................................................................................................... 5
  1.6. Domains ................................................................................................................... 5
     1.6.1.Fields .................................................................................................................. 5
  1.7. Authors/Users .......................................................................................................... 5
     1.7.1 Fields .................................................................................................................. 5
  1.8.User Queries.............................................................................................................. 6
     1.8.1 Fields .................................................................................................................. 6
  1.8.Feature and Usage Requests ..................................................................................... 6
                  fc62851d-0204-4ca3-a105-ac1b298f61ef.doc Page 2                 1/8/2011




1.Main Entities
1.1.Transforms

Transforms are conversions from
(1) One form of representation to another e.g. 30 F-> 30 Fahrenheit
(2) Homonymous constructs with different meanings
e.g. Salary(French) -> Salary (American)
or
(3) Computations
e.g. Given interest rate and future payments compute Net Present Value

Transforms can be
(1) Morpheus transforms, created in Transform Construction Tool
(2) Pre-written Java transforms
(3) Web services

1.1.1 Fields

Id: Unique id
Name: Name assigned by the user.
Author Id: Author of the transform
Description: Textual field describing the functionality provided by the transform
Date Created: Date the transform was created
Input Data Type: Input to transform
Input Representation: Representation of input data type (See Section 1.3)
Output Data Type: Output of transform
Output Representation: Representation of output data type
Cost: Cost of transform, meaning not specified, can be lines of code, size, cost of a web
service
XML:
Src : Source code of the transform, stored as a binary object
Language: Language of the source code of this transform
IsMorpheus : Specifies if transform was created in Morpheus *

1.1.2 Related Tables

Transform-Input Table: Lists the input table(s) used by a transform
Transform-Domain: Maps transforms to domain(s)
Transform-Specialization:
Transform-Objects:
                   fc62851d-0204-4ca3-a105-ac1b298f61ef.doc Page 3                 1/8/2011


* Incomplete transforms (that have not been finalized by users in a session) will be stored
in the Transforms table



1.2. Web Services

Web services can be considered as transforms used as black boxes. The main difference
between these transforms and those referred as “Transforms” is that there may be more
than one data type and more than one output data type for an external transform. We can
treat these as simple transforms by registering each functionality of a web service as a
distinct transform.

However web services differ from other transforms in a number of ways. So our proposal
is to store them in Transforms table yet create another table to store their metadata such
as their WSDL

We might add a IsWebService field in transforms to distinguish those from ordinary
transforms

1.2.1.Fields

Id: Unique id
WSDL:XML document, typically used to generate server and client code, and for
configuration
Last valid: Date the web service last worked . May be checked on a periodical basis with
web interface of POSTGRES.


1.3. Data Types

Data types are entities given as an input and retrieved as outputs from a transform. Data
types are generic types, i.e. they are likely to have multiple representations that denote
the same meaning.

1.3.1 Fields

Id: Unique id
Name: Name assigned by the author. May be modified by the librarian
Author Id: Author creating the data type
Description: Textual field describing the meaning of the data type
Date Created: Date a data type was created
Example: An example of a data type.
XML: XML representation of this data type
IsMorpheus: Specifies if a data type is a user type created in Morpheus Data Type Tool
                   fc62851d-0204-4ca3-a105-ac1b298f61ef.doc Page 4                 1/8/2011


1.3.2 Related Tables

Data Type-Representation: Maps the name(s) of the representation(s) to a data type.
Data Type-Specialization:
Data Type-Domain: Maps domain(s) to a data type




1.4 Lookup Tables

Look up tables describe mapping between two values. They can be user defined or
derived from web services.
Note that both lookup tables and user tables are stored in the same table InputTables and
differentiated from one another by IsUser field

1.4.1 Fields
Id: Unique id
Name: Name of the lookup table
Source: Blank if created by a user, otherwise point to the source of this table
Description: Describes semantics of mappings in this table
Date created: Date this table was created/submitted by a user
Author Id: Id of the user who owns this table
IsUser: False if this is a lookup table

1.4.2 Related tables
All lookup tables are stored in lookup schema in Morpheus Database (not in public
schema)
Input Table DataType: Stored data types which make up fields in an input table. This way
fields of input tables are also treated as data types. Used both for lookup tables and user
tables


1.5 User Tables
User tables are users’ data, they are submitted by users as an input to execute transforms
in batch mode.
They are stored in InputTables table in the schema along with lookup tables. They are
differentiated from lookup tables by IsUser field in InputTables, which is set to true if a
table is a user table.


1.5.1 Fields
Id: Unique id
Name: Name of the lookup table
                   fc62851d-0204-4ca3-a105-ac1b298f61ef.doc Page 5                1/8/2011


Source: Blank
Description: Describes semantics of mappings in this table
Date created: Date this table was created/submitted by a user
Author Id: Id of the user who owns this table
IsUser: True if this is a user table



1.5.2 Related tables
All user tables are stored in “usr” schema in Morpheus Database (not in public schema)
Input Table Datatype: Stored data types which make up fields in an input table. This way
fields of input tables are also treated as data types. Used both for lookup tables and user
tables



1.6. Domains
Domains categorize data types and transforms. A Morpheus Object may have more than
one domain.

1.6.1.Fields
Keyword: Keyword for a full category path. E.g. Financial_Services. Not unique
Path: Full path to category
e.g. Top/Business/Industries/Electronics_and_Electrical/Manufacturing_Services
TreeId: String id showing parent-child relationships in the domain. E.g. 3.1.1
Would mean 3rd categories 1st child’s 1st child category
Id: Primary key

1.7. Authors/Users
Authors are either people whose transforms have been registered in the repository or
those that have registered as users in the system and created transforms/data types
Users register themselves in the Morpheus system. They may additionally have an author
role upon creation of a transform/data type.
We store them in the same table. If an author is not a user, it simply does not have
password, user privileges etc.

1.7.1 Fields
Id:
Name: Name of the user/author
Username: System username of the user
Password: Password of a user
Email: Email of a user
*** Additional field may be applicable when we extent to granting user privileges
                   fc62851d-0204-4ca3-a105-ac1b298f61ef.doc Page 6                1/8/2011


1.8.User Queries
User queries are searches users wish to permanently store. They are stored with a name
and timestamp. Internal representation in the database is SQL queries in text format. (As
discussed in Florida November, 2006, queries are stored, and not actual search results)

Example:
Representation of a query
“Select * from transforms where category = “UFL” INTERSECT select * from
transforms where date_created > 12.12.2005”

Multiple predicates (AND/OR) are handled through UNION/INTERSECT constructs of
SQL language. Optimizations to multiple predicated queries can be addressed within
QueryExecutor interface in the program


1.8.1 Fields
User: Id of user, who saved this query
Name: Name given to user query
Query: SQL representation of the user query, stored as text
Date Created: Time when the user saved the named query
Last Accessed: Date saved query was last accessed by the user


1.8. Feature and Usage Requests

+Please use usr and lookup schemas for user tables and look up tables respectively
(In PG Admin, you can see these schemas are already in Seoul database)
Also for intermediate tables of database execute, I created a new schema called temp. We
have tables such as temp_input_table. Please store these tables for Database Execute
under “temp” schema.
Example:
CREATE SCHEMA usr
  AUTHORIZATION "admin";

 CREATE TABLE usr.mit_students
 (
   name mitstudent
 )
 WITHOUT OIDS;
 ALTER TABLE usr.mit_students OWNER TO postgres;

+Please advise me on additional fields that you need for representing web services

+There is no way to store a data type with different representations in the current system.
e.g. store mit_student data type with different fields.
Can we address this in DataTypeTool?
                   fc62851d-0204-4ca3-a105-ac1b298f61ef.doc Page 7                1/8/2011



2.0 Notes on Future Amendments to Schemas
2.1 Current Schemas and their Tables
With the current state of the database, tables are not being placed in the correct schemas
when created. Five schemas are being used: javatest, lookup, public, sqlj, usr. Below
shows and lists the tables in each schema.

Schema:        javatest

Description:   The javatest schema is used for PL/Java testing along with the sqlj schema
               and are automatically created.

Tables:        employees1
               employees2
               mdt
               username_test


Schema:        lookup

Description:   The lookup schema holds tables that are accessed by transforms and these
               tables can be defined by users or web services.

Tables:        addressemployee
               Adm_lookup
               Colorrgb
               Country_currenty_codes
               Creditrating
               Employee
               Hr_lookup
               Mit_and_ufl_standings
               Mit_subject_summary
               Mit_web_hits
               Osp_lookup
               Paymenthistory
               Person
               Sales
               Sellerid_cache
               States
               Student_standing
               Survey
               Temp1
               Temp2
               Temp3
                  fc62851d-0204-4ca3-a105-ac1b298f61ef.doc Page 8                   1/8/2011


               Temp_spellchecking
               Testemployee
               Testemployee1
               Top_level_domain_lookup
               Us_airports
               Web_hits_lookup

Issues:        Redundancy with tables temp2 and temp3, some lookup tables are not
               placed in the lookup schema, or there are copies of lookup tables present
               in other schemas, such as public’s schema.

Schema:        public

Description:   public is the location of all the main entities such as transforms that also
               reference and are referenced from other schemas such as the lookup
               schema.

Tables:        adm_lookup
               authors
               dtype_domain
               dtype_representation
               dtype_specialization
               dtypes external_domain
               external_input_dtype
               external_sources
               input_table_domain
               input_table_dtype
               input_tables
               odp_domains
               osp_lookup
               person
               sales
               temp_domain
               temp_domain_dtype
               temp_domain_input_table
               temp_domain_transfrom
               temp_input_table
               temp_input_table1
               temp_output_table
               temp_output_table2
               top_level_domain_lookup
               transform_domain
               transform_input_table
               transform_objects
               transforms
               users
                      fc62851d-0204-4ca3-a105-ac1b298f61ef.doc Page 9              1/8/2011


                usr.MIT_STUDENTS
               usr.SEMESER_HOURS
               usr.StudentNames

Issues:        Any table labeled as “temp_input…”or “temp_output…” will most likely
               be put into a new “execution” schema. Tables labeled “temp_domain…”
               are being used and will be renamed to more appropriate and meaningful
               names. Tables labeled with “external” may be eradicated as well as some
               tables labeled “…_domain.” Tables labeled with “…_lookup” will be
               placed in the lookup schema, and tables labeled with “users” and “usr….”
               will be placed in the current usr schema which is currently empty


Schema:        sqlj

Description:   The sqlj schema is used and created at the same time as the javatest
               schema for execution purposes and testing purposes.

Tables:        classpath_entry
               jar_entry
               jar_repository

Schema:        usr

Description:   This is where the user tables will be stored that users have created.

Tables:        (no tables currently reside in the usr schema)

Issues:        Tables labeled “usr….” and “user” will be placed in the usr schema from
               the public schema.

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:15
posted:1/9/2011
language:English
pages:9