Constraint on views

  • Hi

    I am working on SQL 2000 and I have a database which has no Constraints and relationship. This database is imported from DB4 and there are about 900 tables in all. (This is a active legacy system cant do much about it)

    My approach to help the reporting application working on this database is to create views on the current database and then let the reporting application read from this views and have faster reporting.

    But the problem is I have no relationships in my Physical database so i get none in the views. Is there a way that i can develop relationship in the views and accomplish my Idea.

    Please help me i am stuck

    Regards

    Kiran

  • Sounds like one of those (common) applications where integrity is left completely in the hands of the application. As a developer who is new to the db, you have no idea what the relationships are - they exist purely in the logic of the application that drives the db.

    If you are lucky, the software vendor will be able to give you a database schema, including an ERD, from which you should be able to start developing your views.

    But you'd be surprised how often an ERD is not available. Or maybe you'll get one for software version 2.0, last update 1994, when the system ran on a Paradox platform. In which case you'll have to track down the relationships yourself, through a combination of asking users, vendors and common sense/trial and error. With 900 tables, this will be a nightmare and I do not envy you.

    Regards & good luck

    Phil

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply