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 6555677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:50:58+00:00 2026-05-25T12:50:58+00:00

i have a question about data visibility in database views. I use Oracle. I

  • 0

i have a question about data visibility in database views.
I use Oracle.
I have a table myscheme.users and a table global.users (myscheme and global are schemes)
There is a view “globalusers” in the global scheme which merges both user tables.

I have a java application that inserts a new user in the myscheme.users table. After that it makes a query for the new user in the globalusers-view to load the newly created user.
As all this happens inside the same transaction. My question is now, why is the newly created user visible in the myscheme.user table but not in the globalusers-view?
When the transaction has been closed, the user is also in the globaluser-view.

My application is running inside a JBoss 5 using hibernate.

The view is defined in that way:

CREATE OR REPLACE VIEW V_USERACCOUNT AS
    SELECT u.USERACCOUNT_ID,u.USERNAME,u.INITIALS,u.COMMONNAME,u.PASSWORD,'local' AS source
        FROM "USERACCOUNT" u
    UNION
        SELECT u1.USERACCOUNT_ID,u1.USERNAME,u1.INITIALS,u1.COMMONNAME,u1.PASSWORD 'global' AS source
        FROM GLOBAL."USERACCOUNT" u1
  • 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. Editorial Team
    Editorial Team
    2026-05-25T12:50:58+00:00Added an answer on May 25, 2026 at 12:50 pm

    If the INSERT into the table and the SELECT from the view are, in fact, part of the same database transaction (which necessarily implies that they are executed in the same database session), the newly inserted row would be visible in the view (assuming the row meets whatever criteria the view uses to determine which rows to display). If the new user is not in the view, that implies that either

    1. The INSERT and the SELECT are not part of the same database transaction, or
    2. The INSERT is not sufficient to cause the row to be available in the view. Perhaps there is some other lookup table that is joined in the view that doesn’t have the data for the new row when you query the view but the lookup is populated later in the transaction.
    3. You have a bug somewhere in your code where the INSERT isn’t actually happening when you think it is or the query isn’t happening after the INSERT or the query isn’t actually hitting the view you posted.

    Based on your latest update, it appears that #1 is almost certainly the problem. If you have different DataSources, the INSERT uses one DataSource, and the SELECT uses a second DataSource, the two operations are not happening in the same database transaction. They may be happening in the same application server transaction– the application server may well be creating a distributed transaction– but if it’s not the same database transaction, you won’t be able to see uncommitted changes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ok. I have a question about use my data model in UI. problem is
I have a question about the use of gsub. The rownames of my data,
I have a question about sharing data between views, hopefully it's not too basic.
I have a question about this question . I posted a reply there but
I have a question about Core Data. When starting my appliction, when is my
I have a question about storing site configuration data. We have a platform for
I have a question about setting the style attributes for a data cell in
A quick question about saving data in symfony 2. I have this method (just
I have a question about dialog here is the code: <a href=#lol data-rel=dialog>Filter</a> <div
I have a question about HTTPService and the data it returns. Well lets consider

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.