Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 183211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:04:32+00:00 2026-05-11T15:04:32+00:00

Huge database in mssql2005 with big codebase depending on the structure of this database.

  • 0

Huge database in mssql2005 with big codebase depending on the structure of this database.

I have about 10 similar tables they all contain either the file name or the full path to the file. The full path is always dependent on the item id so it doesn’t make sense to store it in the database. Getting useful data out of these tables goes a little like this:

SELECT a.item_id , a.filename FROM (     SELECT id_item AS item_id     , path AS filename     FROM xMedia      UNION ALL      -- media_path has a different collation     SELECT item_id AS item_id     , (media_path COLLATE SQL_Latin1_General_CP1_CI_AS) AS filename     FROM yMedia      UNION ALL      -- fullPath contains more than just the filename     SELECT itemId AS item_id     , RIGHT(fullPath, CHARINDEX('/', REVERSE(fullPath))-1) AS filename     FROM zMedia      -- real database has over 10 of these tables ) a 

I’d like to create a single view of all these tables so that new code using this data-disaster doesn’t need to know about all the different media tables. I’d also like use this view for insert and update statements. Obviously old code would still rely on the tables to be up to date.

After reading the msdn page about creating views in mssql2005 I don’t think a view with SCHEMABINDING would be enough.

How would I create such an updateable view?

Is this the right way to go?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T15:04:33+00:00Added an answer on May 11, 2026 at 3:04 pm

    You can modify partitioned views, provided they satisfy certain conditions.

    These conditions include having a partitioning column as a part of the primary key on each table, and having a set on non-overlapping check constraints for the partitioning column.

    This seems to be not your case.

    In your case, you may do either of the following:

    • Recreate you tables as views (with computed columns) for your legacy soft to work, and refer to the whole table from the new soft
    • Use INSTEAD OF triggers to update the tables.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 161k
  • Answers 161k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It's generally a bad idea to tie up a dynamic… May 12, 2026 at 11:45 am
  • Editorial Team
    Editorial Team added an answer So, it turns out that on a couple queries before… May 12, 2026 at 11:45 am
  • Editorial Team
    Editorial Team added an answer Override the setter for "mylist" and insert your values into… May 12, 2026 at 11:45 am

Related Questions

Sometimes two image files may be different on a file level, but a human
I have a fairly huge database with a master table with a single column
I'm building a toy database in C# to learn more about compiler, optimizer, and
I am working on a project, which is having huge database. [ around 32gb

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.