Automatic storage of persistent objects in a relational schema
First Claim
Patent Images
1. A method for a computer to translate an object class hierarchy into a relational schema, comprising in combination the steps of:
- providing said computer with a computer memory;
providing in said computer memory a first computer program having at least one class hierarchy organization of object-oriented information and being in source code form, said class hierarchy organization comprising at least one parent class of objects having a first attribute and one derived class including at least one of said objects of said parent class, said derived class having a second attribute, said derived class inheriting said first attribute from said parent class;
analyzing said first computer program with a second computer program to locate automatically said class hierarchy organization;
using said second computer program to create automatically from said located class hierarchy organization a first source code routine in said computer memory for defining a first table structure, corresponding to said parent class, including a first table name, said first table structure including;
a first instance identifier field for storing a unique first instance identifier for each particular object instance of one of said objects, anda first attribute field for storing an attribute instance of said first attribute for said each perpendicular object instance,said first instance identifier field and said first attribute field composing a record of said first table structure;
using said second computer program to create automatically from said located class hierarchy organization a second source code routine for defining a second table structure, corresponding to said derived class, including a second table name, said second table structure including;
a second instance identifier field for storing a second instance identifier which identifies said particular object instance of said one of said objects included said derived class,and a second attribute field for storing an attribute instance of said second attribute for said particular object instance of said one of said objects included in said derived class,said second instance identifier field and said second attribute field composing a record of said second table structure; and
referencing said second identifier field to said first identifier field.
12 Assignments
0 Petitions
Accused Products
Abstract
A translator for translating objects defined in an object-oriented programming environment to a relational database schema permits persistent storage of object instances as records in a relational database. Object instances are mapped to entity tables with object instances represented by entity records. Simple attributes are mapped to primitive typed attribute columns and class valued attributes are represented by foreign keys into entity attribute tables. Derived attributes are represented by joins of the parent and child entity records.
-
Citations
27 Claims
-
1. A method for a computer to translate an object class hierarchy into a relational schema, comprising in combination the steps of:
-
providing said computer with a computer memory; providing in said computer memory a first computer program having at least one class hierarchy organization of object-oriented information and being in source code form, said class hierarchy organization comprising at least one parent class of objects having a first attribute and one derived class including at least one of said objects of said parent class, said derived class having a second attribute, said derived class inheriting said first attribute from said parent class; analyzing said first computer program with a second computer program to locate automatically said class hierarchy organization; using said second computer program to create automatically from said located class hierarchy organization a first source code routine in said computer memory for defining a first table structure, corresponding to said parent class, including a first table name, said first table structure including; a first instance identifier field for storing a unique first instance identifier for each particular object instance of one of said objects, and a first attribute field for storing an attribute instance of said first attribute for said each perpendicular object instance, said first instance identifier field and said first attribute field composing a record of said first table structure; using said second computer program to create automatically from said located class hierarchy organization a second source code routine for defining a second table structure, corresponding to said derived class, including a second table name, said second table structure including; a second instance identifier field for storing a second instance identifier which identifies said particular object instance of said one of said objects included said derived class, and a second attribute field for storing an attribute instance of said second attribute for said particular object instance of said one of said objects included in said derived class, said second instance identifier field and said second attribute field composing a record of said second table structure; and referencing said second identifier field to said first identifier field. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. An apparatus for translating information represented as an object-class hierarchy into a relational table schema, comprising in combination:
-
central processing means; computer memory means, operatively coupled to said central processing means, for temporary storage of information; a computer program, stored in said computer memory means in source code form, including at least one data organization in the form of said object class hierarchy, said object class hierarchy being for object-oriented data and including at least one parent class of objects having a first attribute and one derived class of at least one of said objects having a second attribute, said derived class inheriting said first attribute from said parent class; schema translator means, stored in said computer memory, for locating automatically said object class hierarchy in said computer program and for translating said object class hierarchy into said relational table schema; said schema translator means including first table means for defining automatically in said relational table schema a first table structure, corresponding to said parent class, including a first table name, said first table structure including; a first instance identifier field for storing a first instance identifier which identifies a particular object instance of said one object, and a first attribute field for storing an attribute instance of said first attribute for said one object, said first instance identifier field and said first attribute field comprising a record of said first table structure; said schema translator means further including second table means for defining automatically in said relational table schema a second table structure, corresponding to said derived class, including a second table name, said second table structure including; a second instance identifier field for storing a second instance identifier which identifies said particular object instance of said one object, and a second attribute field for storing an attribute instance of said second attribute for said one object, said second instance identifier field and said second attribute field comprising a record of said second table structure; and said schema translator means further including reference means for said relational table schema to reference said second instance identifier field to said first instance identifier field. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27)
-
Specification