Modeling objects in schema

I have adopted a schema with many views and tables. Well, there is no primary key or FK.
How can I come up a ER diagram?
If I can't, how can I explain to my boss?

You can also use Oracle's Data Modeler, its now licence free. Unfortunately any modelling tool uses foreign keys to identify relationships. If these aren't defined then you will need to define these in the model using available documentation and/or consistent columns naming standards. If these are missing then you may be able to determine relationships from queries in the application. Other than that, you're up the proverbial creek in a barbed wire canoe.
Andre

Similar Messages

  • Advice/Recommendation please? How to best handle big models with various schemas?

    Hi
    Using DM 3.3.0.747.
    We have several bespoke applications, each using its own data model in separate schemas.  They do share various entities/tables which are made available in a shared schema.  There are references to these shared tables, etc. (e.g. foreign keys)
    We want to embark on a process to reverse engineer and then maintain these applications' schemas in Data Modeller.
    I would really like your views on how to best approach this.  The main concern is that the bigger the design (or more models/sub-views) the slower actions like saving and loading it becomes.  Once you also have it version controlled more time is added onto saving and synchronising with the sub-version repository and between team members.
    The thinking is to primarily have each application (and hence its own schema) in separate designs (projects), but include tables from the shared/core schema as needed.  Would this be a good/recommended approach?
    How does one address potential changes made (differences introduced) that may conflict between these separate designs?
    e.g. in physical model the schema becomes a user that has permissions, etc.  and that same user may be in multiple designs.  Each design is version controlled, but in the end only exists once in the database.  If each design is synch'ed with the database, DDL generated and executed, this can cause one design to add permissions, etc. that the second DDL from the second design removes or replaces with its own?
    I hope my question/scenario is clear enough.  If not, please revert to me for more clarification.
    Thank you & Regards

    Hi Hans,
    I think it's better to use DM 4.0 and have everything in one design.
    1) You can import all schemas you need into one design (one relational model). Save that design - important to do it before using "remote objects" approach
    2) Use "Create new models based on schema names" wizard available in context menu for relational model in browser. Wizard will create new relational model for each schema in originating model and create there tables and views that
    belong to that schema. All objects in originating model become read-only "remote objects".
    If table (in new model) has a foreign key that refer table in another schema (now that table is moved to another new model) then "remote object" presentation is created for referred table.
    At the end you'll have one large model with read-only remote objects and set of relational models that keep the track of foreign keys between tables in different schemas in database.
    You can keep the originating model (the large one) in order to have global picture or delete it.
    Properties from physical model are also transferred to new models in DM 4.0.
    3) Check "Show 'Select relational models' dialog" in "Preferences>Data Modeler" - upon "open design"  that will bring up dialog allowing to select which model   to be loaded. The choice is persisted and
    applied next time you open design (no need to see that dialog again if no change in what to be loaded).
    4) For each model you can create "DDL generation" configuration (one or more) and exclude remote object from generation in DDL. Permissions should be maintained in model where table is editable and where DDL for that table will be generated.
    The thinking is to primarily have each application (and hence its own schema) in separate designs (projects), but include tables from the shared/core schema as needed.
    I won't recommend it. I know it's possible to have remote object in another design but you'll face following problems:
    1) You cannot use design level domains and definitions in data types model
    2) Remote object from another design are sensible to location of that remote design. You need to maintain the same directory structure everywhere designs (all related) are checked out and they need all to be checked out before dependent design to be open
    3) You need to add remote objects manually while wizard described above will do it for you in the scope of one design
    The main concern is that the bigger the design (or more models/sub-views) the slower actions like saving and loading it becomes.
    The number of models shouldn't be a problem with support of "Select relational models" dialog. Subviews will impact loading if only they are large and are visible when "save" is used.
    Total number of objects in model doesn't impact "save' operation - only modified objects are saved.
    Yes, there is overhead for versioned designs - one more reason to move to DM 4.0 - SVN client 1.7 is used there.
    Philip

  • Mapping UML Model to Database Schema

    Hi All,
    Is it possible to map UML business object model on database schema using Mapping Workbenck? I've done the mapping with imported java classes, but wodering if same could be done with the UML models. I couldn't find any documentation about it either. This feature may be very useful in cases where you want to incorporate TopLink in the design stages of a project.
    Any help will be highly appreciated. Thanks.

    Hi Sharad,
    I agree that incorporating design time practices into this tool might be useful, but is not supported as you described.
    From the perspective of application development, I find it useful to first develop the object model in an IDE such as JDeveloper which supports UML (Which will automatically allow you to deploy the .class files of the project). I point my MW project to the output location of my .class files which seems to work great as I can make changes to the object model in the IDE and easily refresh the contents in the MW.
    I hope this helps.
    Darren

  • Model Object / Business Logic question

    Hello,
    Question about how to architect the model objects and services in our system. We are defining our own Model Object / Transfer Objects without the use of an ORM tool (long story). Some of these model objects have to maintain Association objects such as:
    public class Teacher {
         private List<StudentAssociation> kids;
    public class StudentAssociation {
         private Teacher teacher;
         private Student student;
         private Date fromDate;
         private Date toDate;
         // Getters / Setters ....
    }My question is, where should the logic be to add, remove student associations? Originally we had it defined in the Teacher model object with:
    public void addStudentAssociation(Student student, Date fromDate, Date toDate);
    public void removeStudentAssociation(Student student, Date fromDate, Date toDate);But I am hesitant to put such logic in the Model Object. I always thought those should be pretty empty of any sort of business logic. Instead I want to have a TeacherService that does that and instead just a getter/setter on the Teacher object for the Association List. However, in doing that, I find I have to create a new List of Associations then call the setAssociations method on the Teacher object, which seems kind of strange.
    Is it bad to put the add/remove method in the model object itself? The remove logic has a bit of business logic in it, so it seems weird being there.

    Not sure I can be of much help, but here's my two cents worth:
    You have a teacher object and student object. A teacher doesnt really have an association with a student. I think you need another object such as a class object. I class has a teacher and the students (an association can be a business association, social association, etc). That same teacher may be assigned to other classes (provided they dont occur at the same time since the teacher cant be in the two classes at the same time. Likewise, for a student. Complicating things is the fact that a teacher of one class may be a student in another class. Also, a class may exist that has students but no assigned teacher yet (your original idea wouldn't be able to handle this since you will need a teacher before you add students). Another case, you have a class without students. Still another case, you have people (either future students, or teaching staff that haven't been assigned as teachers yet), but no classes yet., I think it would be best to figure out a database schema first (you can use Oracle Lite, MySql, etc).
    here is an example:
    Assuming you are putting this in a database I would create tables and fields something like this:
    Person ((a person is either a student or teacher, or just someone that is no longer a student or teacher but may be one day))
    personId not null
    firstname not null
    middleName nullable
    lastname not null
    ssn not null
    Class ( a class is where a teacher teaches students))
    classId not null
    nameOfCourse not null
    building nullable (may not be assigned yet)
    room nullable (may not be assigned yet)
    startDate ((when the class starts)) nullable
    endDate ((when the class ends)) nullable
    teacherId ((this is the parentId from the person table)) nullable
    Students
    personId ((this is the personId from the person table))
    classId
    associations:
    a class has 0 or 1 teacher,
    0 or many students
    a teacherId must exist in the person table as a personId
    a studentId must exist in the person table as a personId
    (if you delete a personId in the person table, it cascades deletes any teacherId or studentId of the same value)
    your class has a collection of students. therefore:
    private List<Student> students
    Your class will also have something like
    addStudent(Student student) (throw exception if student already exists) (note you dont pass in the start and
    end date since its the class's responsibility for start and end date, not student)
    isStudent(Student student) (return true if student is already in class, false if not)
    deleteStudent(Student student) ((returns true if student found and deleted, false if student not found to delete)
    Your business logic can check things such as if the start date occurs before the end date (an error), you have a class with no teacher or no students, etc. The first case you can do in the database with constraints if you want, but the second you cant since you want to store info for a class even if a teacher isn't assigned to it yet.
    One way to do this is to have a validate() function in your class object. The validate() function checks such things as a class with no teacher and returns a collection of warnings if it finds anything wrong. All the above is just something off the top of my head. So there may be some issues with my approach that you will have to work out.
    Good Luck!

  • Can i Bind more than one Model object to the Custom controller or not

    Hi All, I trying to bind more than one model object to the custom controller, Both the model objects contains same attribute name called ( output). Both model objects created on to top of the BAPI. So when i bind first model object to the custom controller will work fine. When i am trying to bind the second model object to the same controller. This second model object also having the same attribute name called "output" . So it is giving an error of "Duplicate context element "Detail". Rename or uncheck duplicate elements.
    can i assign more than one model object to the single controller or not?
    But in the reference document, it has given that , we can create model object with more than one bapi.So in this case if both the bapis contains any element with the same name will also be problem. Any body give me the solution.
    Initially we have created one custom controller for each model object. But later i realized that, why con't we use same controller for all the model object. Because, the custom controller context is the public context. this context shared across all the view controllers.
    The concept which I am trying to do is right or wrong?

    Hi Vishal,
    of course, you can bind one controler to many models. When the same name occours you can simply RENAME binded node in controler.
    Regards
    Bogdan

  • Yes, I want to create object-relational schema from DTD.

    Thank you for reply~~
    I want to create object-relational schema from DTD using object type or collections as mentioned.
    In reply, it is impossible.
    But, I read Oracle supports storing an XML document with object-relation. I executed storing sample, but I had to create schema manually.
    Is it really impossible to create OR schema from DTD automatically?

    Yes. You need to create your database schema before insert XML data to it.

  • Using TOAD and SQL Developer to compare db objects in schemas in databases

    Hi All,
    My primary objective was to compare objects in schemas in two different databases and find out the differences,
    Execute DDL's in the database where objects are missing and syn schemas in two different databases.
    So I need to compare schemas in databases. Which tool would be helpful and will be user friendly to make a comparison of database objects existing in schemas in two different databases.
    I'd like to see if I can get a list of pro and cons between Toad and SQL Developer for comparing schemas pros and cons.
    Could you please also help me on navigation in SQL Developer to compare schemas.
    Connect to Source
    Connect to Target
    Compare schemas with different object types
    Find out differences
    Generate DDL's for the missing objects or for the objects in difference report
    Run them in missing instace(Source/Target)
    Make sure both are in sync.
    Thanks All

    Hi,
    Most dba type tools have this kind of functionality - personally i use plsqldeveloper but this is very similar to most other tools on the market. SQL Developer seems to rely on you needing the change management pack licence which you likely dont have and would be quite a large cost to roll out.
    I'd compare plsqldeveloper/toad/sqlnavigator etc and maybe the tools from redgate which look pretty good though i haven't used them.
    Regards,
    Harry

  • Model Instance Vs Model Object

    Hi experts
    can anyone plz explain me the difference between model instance and model objects. is it necessary to create model instance when dealing with WebService model.
    also tell me what do u mean by associating model objects.
    plz explain with reference to the following code :
    <b>public void wdDoInit() {
    //@@begin wdDoInit()
    // create a new model instance (1)
    model = new EmailAdWSModel();
    // create model objects (2, 3)
    Request_SendEmail requestMO = new Request_SendEmail(model);
    SendEmail emailMO = new SendEmail(model);
    // associate model objects (4)
    requestMO.setSendEmail(emailMO);
    // bind executable model object to context node (5)
    wdContext.nodeRequest_SendEmail().bind(requestMO);
    //@@end
    }</b>
    i found this on sample exercises given on sdn:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/301ff0bb-74ca-2910-fa99-eae392695aad
    can any one help me regarding this.
    Thanks in advance.

    Hi krishnan..,
                       To be brief , have a clear idea about model i.e., A model contains number of classes inbuilt in it which u could find after importing a model..
    You must create an instance to the model to access the classes in the model..
    similarly you create objects to the classes in the model to get it referenced..
    As u are used to object oriented programming, i hope u may have a good idea about classes and objects..
    An object is always an instance of a class..and u can never access a class without creating an object to the class..
    as in the coding which u have given..
    "model" is an instance of the model called EmailAdWSModel();
    then u create objects for the classes inside the model and then u access the attributes by referencing the objects of the class.
    hope u would be clear with this concept

  • Physical model attribute "Partition Scheme" not saved. (SS2000)

    Hello,
    I believe this is a bug report.
    Scenario:
    I have a physical model of a SQL Server database. The model contains partitioned tables, 1 partitioning function and 1 partitioning scheme. If I open the physical model properties of an index or a table, set the "Partition Scheme" attribute, save, close and re-open the model, the "Partition Scheme" attribute is lost. If I don't close out and just re-open the properties page, the attribute is retained. Some how, the attribute is lost in the persistence layer.
    If there is a reason the attribute is being reset, please let me know.
    Thank for your help, and all the great products you guys make,
    Kurt
    DataModeler v 3.1.1

    Hi Kurt,
    If there is a reason the attribute is being resetUnfortunately there is a bug causing the problem. Fix will be available in next patch release.
    Philip

  • Can't create connection to export model to reporting schema

    Hi,
    I am using version 3.1.1703. I am trying to export the table and column comments from report manager. I try to export my model to Report Schema but I can't create a connection. When I press the plus to create a connection nothing happens.
    Please help.
    Dean

    Hi,
    Just to note that the log file is normally the file datamodeler.log in the folder datamodeler\datamodeler\log (unless its location has been changed in the Preferences).
    David

  • How to close a model object connection for Adaptive RFC?

    Hi,
    I'm calling two update RFC one after another in a single WebDynpro program. I like to close the session/connection after calling the first RFC. I'm using twp separate JCo connection for calling these two RFCs. Still I find both the RFCs are called in the same session.
    Is there any way to close the JCo session from the code?
    Thanks ,
    Dipankar

    Hi Dipankar
    If you want the framework to control the opening and closing of the connections , then use TASK_SCOPE when initializing the modelobjects ,in which case the connection will remain open, for the lifecycle of a single call.
    The intialization should be as below
    (CompanyCodeList is your model object)
    CompanyCodeList compCode = (CompanyCodeList)WDModelFactory.getModelInstance(CompanyCodeList.class, WDModelScopeType.TASK_SCOPE);
    Bapi_Companycode_Getlist_Input bapIn = (Bapi_Companycode_Getlist_Input) compCode.createModelObject(Bapi_Companycode_Getlist_Input.class);
    wdContext.nodeBapi_Companycode_Getlist_Input().bind(new Bapi_Companycode_Getlist_Input());
    Regards
    Pran

  • Model object not gettting updated with mergeWithReferences()

    I have a model object A that contains list of other models b as a collection.
    I want to update object A using getTopLinkTemplate().mergeWithReferences(a) but it is not updating object a values in the database. The changes seems to be in the cache but when I check db, no changes at all.
    Following debug statements clearly tells that UOW started but didn't run update SQL statement.
    DEBUG [oracle.toplink.transaction] UnitOfWork(30070212)--begin unit of work commit
    DEBUG [oracle.toplink.transaction] UnitOfWork(30070212)--end unit of work commit
    DEBUG [oracle.toplink.transaction] UnitOfWork(30070212)--release unit of work
    DEBUG [oracle.toplink.transaction] UnitOfWork(30070212)--release unit of work
    Please help me update an object.
    BTW, I am first pulling the model object for update, set new values in the model object and then try to merge but in vain.
    Kindly help.
    Zealous
    Edited by: zealous on May 9, 2011 5:19 AM

    Hello,
    How are you reading in A, and what are you changing? Be sure that you read in A using a uow otherwise you might be changing the object in the cache - if you are changing the cache object, merge will be a no-op and nothing will have appeared to change. If you are modifying 1:m relationships, make sure that both sides are changed as the side that owns the foreign key controls the field in the database. If you are removing B's from the A, you will probably need to merge these Bs seperately, as any changes made to them will not get picked up since the merge will not be able to cascade to them once they are dereferenced.
    Best Regards,
    Chris

  • Is it recommended to instantiate Model object from Backing Bean

    Wondering what are the best practices in developing JSF,Spring, Hibernate application.
    Appfuse/Equinox example instantiate Model Object i.e. POJO in the Backing bean. Here is the snippet
    UserForm.java (Backing Bean)
    public class UserForm {
    public User user = new User();
    public UserManager mgr;
    // Getter & Setter methods for user & mgr
    //Persistence
    public String save() {
    mgr.saveUser(getUser());
    addMessage("user.saved", getUser().getFullName());
    return "success";
    I undertand the purpose of having UserManager defined in backing bean but wondering why do we need to have Model (i.e. User) defined in backing bean . Is this a best practice?
    Is it recommended to populate model object with data in the backing bean and then call for business methods like mgr.saveUser(getUser());
    Regards
    Bansi

    Here is some more info
    UserForm is a JSF managed bean,
    User is a hibernate mapped POJO, and
    UserManager is manager class in Spring
    I am wondering about perfomance issues i.e. making DB calls from backing bean getters or setters. DB calls can mean a performance hit, and JSF will call the getters and setters multiple times per page request (which means you'll be doing multiple DB calls).

  • Mapping action script object to mx:model object

    Hi all,
    I am having an action script class and an mx:model element
    with same elements. I want to assign an action script object to
    this mx:model. How can I do that one?
    Let me state it clearly.
    Say, my action script class contains two elements - user and
    rollno with required getter and setter methods.
    And I am having an mx:model element with the following
    format.
    <mx:model id="data">
    <data>
    <user/>
    <rollno/>
    </data>
    </mx:model>
    I want to assign an instance of action script class to this
    model object.
    I tried extending action action script class from Objectproxy
    and used data=actionscriptinstance.
    But it's not working properly.
    Is there anyway I can do this one?
    Thanks in advance

    The quick answer:
    <mx:model id="data">
    <data>
    <user>{ myASObj.user }</user>
    <rollno>{ myASObj.rollNo}</rollno>
    </data>
    </mx:model>
    The bigger question might be, "Why have the mx:Model?"
    The Model tag is all Strings, so you lose data typing.
    Why not just create a value object (VO) for your user data
    and pass that around?
    package samples.user {
    [Bindable]
    [RemoteClass(alias="samples.user.User")]
    public class User {
    public var user:String;
    public var rollNo:int;
    Then when the result data returns, cast to the VO.
    public var user:User = (eventObj.result as User)

  • Insufficient privilege: Can't export objects in schema..user has no privilege on the underlying objects

    I'm using SYSTEM user but
    HDBSTUDIO continues on triggering this error when I try to export the catalog:
    SAP DBTech JDBC: [258]: insufficient privilege: Can't export objects in schema DARTEL_TRANSPORTES. Can't export procedure DARTEL_TRANSPORTES.PAL_TRIPLE_SMOOTH_WRAPPER. user has no privilege on the underlying objects
    When trying to grant the SYSTEM user to that particular object  I get a new error : Could not modify user 'SYSTEM'. Several issues occurred
    Have anyone have struggled with this error before, any help will be highly appreciated
    Kind Regards

    rev 69 too
    tomorrow I will have the webex and let you know
    Something happenned after my customer change the suse's server IP, I had to perform a re-installation of SAP Business One only
    We were supposed to install using the hostname but no one of the installers let me use the hostname
    so it Kind of forced me to use the IP.
    After asking Support about that one of the specialists told me that he prefers to use IP instead of the hostname. So I used IP.
    Maybe this changed something I cannot detect yet. but tomorrow we'll see.
    KR

Maybe you are looking for