How should i go about doing this.

OS: Windows Server 2003
DB: Oracle Database 11g
basically i have a Purchase Order table (PO) that has columns like the PO Number, Supplier, Date of Purchase etc.. but no items. the items to be purchased are in another table (PO_ITEM), that has a foreign key that references the PO Number in the PO table.
what i want to do is, as long as the PO has not been approved by the Purchasing Manager, users can still make modifications in the PO_ITEM table (like the quantity of the items to be purchased). after the manager has approved the PO, noone can make modifications to the PO_ITEM that has the referenced PO Number in their foreign key. the PO has a column (status) that indicates whether it has been approved by the manager.
how do i make the restriction?
i'm thinking i should put a trigger on the PO_ITEM before each update, that checks the status of the PO. if it's been approved, the changed is rollled back. what is the command to reject an update statement in a trigger?

Hi,
This sounds like a job for Row Level Security (also known as Virtual Private Database, or VPD) or Fine-Grained Auditing (FGA).
These allow you to attach policies to certain types of statements, such that certain conditions are automatically added to all statements.
That is, if a user submits the statement
UPDATE     po_item
SET     quantity_ordered     = 2
WHERE     po_item_number     = 9876
;what actually gets run is:
UPDATE     po_item
SET     quantity_ordered     = 2
WHERE     po_item_number     = 9876
AND     po_number     IN (     SELECT     po_number
                    FROM     po
                    WHERE     approved     = 'N'
;You can also make this dependent on the user, so that, for example, a few privileged users can still update approved orders, but most users can not.
Check out the package dbms_rls or dbms_fga.
http://download.oracle.com/docs/cd/B28359_01/server.111/b28314/tdpdw_security.htm#sthref360

Similar Messages

  • How should I go about doing this exercise (networking/database related)

    Hey everyone
    As a learning exercise for myself, I've decided to write a basic web based chat room application. I'm going to:
    -allow users to create an account (store this info in a database)
    -force users to log in before entering a lobby (there will be multiple lobbies)
    -have users join a lobby, and then select one chatroom to join in that lobby
    -allow multiple users in each lobby and chatroom
    It is also going to be web based, so I want a user to be able to open a web page and then use the application without having to download/install it.
    My question is: How should I begin this project? As I can see it, I have a bunch of options, including using an applet or using java web start. What are my other options (if any)? What are the advantages/disadvantages of these options, and which would you use if you were creating a chatroom for a website that had hired you?
    Thanks for your help

    nightmares wrote:
    As a learning exercise for myself, I've decided to write a basic web based chat room application. I'm going to:
    -allow users to create an account (store this info in a database)
    -force users to log in before entering a lobby (there will be multiple lobbies)
    -have users join a lobby, and then select one chatroom to join in that lobby
    -allow multiple users in each lobby and chatroom
    It is also going to be web based, so I want a user to be able to open a web page and then use the application without having to download/install it.First of all, you haven't picked a trivial project ... but I bet you'll be a lot better by the time you've finished it.
    You've made a decent start by identifying some of the major functions that your chat room will support. You'll probably need to expand on it, and also determine the exact information requirements for those modules (For example: what will an account look like? What data will it hold? How will it interact with the other modules/classes in the chat room? What does your Lobby need to do?).
    I'm not an expert in web-based programming, but there are a few "unversals" to good design that might help (and provide you with some things to Google). It's probably going to sound like CD-101, but here goes:
    1. Pick a good development platform - You could do this with Notepad; but I don't advise it. You're going to have to manage a lot of complexity, and IDEs are the way to go. I don't want to start a war here, but both NetBeans and Eclipse have the tools for this sort of project - and they're free.
    2. Think what+, not how+ - ...at least to begin with :-). This is probably the hardest thing for newbies to learn, because they're just dying to get started on the code. Decide what you want to do before you dive into the how. You may find you change your mind about the how before you come to code. You may also find that somebody's already written a piece of code or library to do just what you want. As a very simple example: sendMessage() is a 'what' method; openSocket() is the 'how'.
    3. Loose coupling - as far as possible, keep your methods and classes self-contained and well-focused. This general principle also applies to system components - try to make sure that each one is well-defined and "talks" to other components in a well specified manner. There are several design patterns for the type of thing you want to do, but you might want to start with MVC (Model/View/Control). It'll also help you when you want to test (see below).
    4. Good naming - '*i*' may be a perfectly good name in a 'for' loop, but it's pretty useless outside it. Make your variable and method names mean something. There are also several conventions that other Java programmers expect, so you might want to [start here.|http://java.sun.com/docs/codeconv/]
    4. Think big, but start small - For example, a good 'test of concept' might be to get your chat room running on your local machine using a local database first. Providing you're using all the middleware you'll be using for your 'finished' version (eg, Tomcat), porting to the Internet shouldn't be too onorous (but it's unlikely to be completely glitch-free).
    5. Test, test, test - Test everything you do. It sounds boring, but good testing can actually highlight design problems. Find out a bit about it (eg, smoke tests, boundary checks) and try and find a tool that fits your needs. [This page|http://java-source.net/open-source/web-testing-tools] has a few suggestions.
    6. Document - Another snorer, but vital. javadoc is your friend, but you'll probably want other forms of documentation as well. UML wouldn't be a bad place to start.
    7. And finally, read - there's a lot to know about this stuff, and it's changing all the time. Here's a few pointers to get you going:
    - Database comms/Persistence/Model - JPA, Hibernate, JDBC.
    - Databases - MySQL, Derby, Oracle, DB2, SQLServer; also some [others here.|http://java-source.net/open-source/database-engines]
    - View - JSP, Struts, Ajax, Swing (non-web)
    - Control - Servlets, EJB, Tomcat, Jetty
    - Testing - JUnit
    - Communication/Messaging - JMS, SOAP
    - Other: ant, jar, war, ear, xml
    If you have any mates in the biz, you might want to talk to them too. An ounce of experience is worth a pound of heartache.
    HIH
    Winston
    Edited by: YoungWinston on Jul 30, 2009 3:33 AM

  • How would i go about doing this?

    Hi, im quite new to programming so go easy on me.
    I have got a string. I want to break it down into sub-strings. There are certain ascii characters within the origional string that determin where the sub-string should end. I want to get 4 sub-strings out of the origional string.
    Anyone know how I would go about doing this? I dont want to use any packages either. Just plain java code.
    thanx
    CKS

    > Would there be no way of going through every
    character in the origional string and placing it into
    another string if it doesn't equal say the letter
    'b'. Then upon reaching a letter 'b' it will skip
    that out and go carry on, but putting the rest of the
    letters into another string...?
    Sure. Have a look at the String docs:
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html
    Especially the charAt(...) and substring(...) methods.

  • HT204088 I have duplicate charges of $9.99 from travel-nave that I need to have removed.  How can I go about doing this?

    I have duplicate charges of $9.99 from travel-nave that I need to have removed.  How can I go about doing this?

    iTunes Customer Service Contact
    http://www.apple.com/support/itunes/contact.html

  • Good afternoon. I have created a Form in Indesign, imported into FormsCentral. I would like to post this onto a webpage. It is currently an iPDF. How would I go about doing this. I cannot 'Place it'. Thanks

    Good afternoon.
    I have created a Form in Indesign, imported into FormsCentral.
    I would like to post this onto a webpage. It is currently an iPDF.
    How would I go about doing this. I cannot 'Place it'.
    Thanks

    The only way to use Forms Central would be to export it the method that gives you the embed code (can't remember what the actual term is off hand) and then use Object--->Insert HTML and past your code in.

  • Hey, I'm trying to authorize my new laptop with my iTunes account. How would I go about doing this?

    Hey, I'm trying to authorize my new laptop with my iTunes account. How would I go about doing this?

    Hi Michael1296,
    Thanks for visiting Apple Support Communities.
    Here are the steps to authorize a computer in iTunes:
    How do I authorize a computer?
    Open iTunes on the computer you want to authorize.
    Choose Store > Authorize This Computer from the menu bar.
    You might need to show the menu barto see this option in Windows. In earlier versions of iTunes, you can access this option from the Advanced menu.
    Enter your Apple ID and click Authorize.
    If your Apple ID uses an expired MobileMe account, you can still use it to authorize your computer.
    If iTunes asks you to authorize your computer again, it won't use a new authorization. iTunes uses the same authorization for the same computer.
    You can find these steps and more information at this link:
    Authorize your computer using iTunes
    All the best,
    Jeremy

  • I have a full sketch in Illustrator that I want to make symmetrical, how do I go about doing this?

    Hey guys, I'm somewhat new to Illustrator and I have a scanned in sketch of a man's face that I would like to make perfectly symmetrical.  How do I go about doing this? Thanks in advance!

    Justin,
    You may redraw either half with the Pen Tool (or another tool) and reflect a copy.
    And you may go a step further:
    It is quite possible to create a symmetrical drawing live with the help of Illy, with the inbuilt tools, without any external plugins, if you just start in the right way. Obviously, it is much better to see the whole appearance while you create it.
    You may see the reflection live after each Anchor Point if you start out as follows (for Pen Tool with vertical reflection to the right, similar for other directions):
    1) Create the first two Anchor Points of your basic path;
    2) Effect>Distort&Transform>Transform>ReflectX with 1 copy and the middle right side Reference Point chosen;
    3) With the Pen Tool ClickDrag (or Click) anew from the second Anchor Point and go on;
    If you wish, you may:
    4) Object>Expand Appearance and Ctrl/Cmd+J to join the half paths.
    Ctrl/Cmd+Z Undo is your friend: you can just go back and redo while drawing the basic path.

  • I have a short homemade film burnt onto a DVD, I now want to import the movie into IMOVIE on my MacBook Pro so that I can edit it, how would I go about doing this? Welcoming any guidance.  Thanks in advance.

    I have a short homemade film burnt onto a DVD, I now want to import the movie into IMOVIE on my MacBook Pro so that I can edit it, how would I go about doing this? Welcoming any guidance.  Thanks in advance.

    1. Insert your DVD.
    2. Open Disk Utilities (Application> Utilities> Disk Utilities). Highlight your DVD and press "New Image" on the upper toolbar.
    3. Choose the location you would like to save your DVD from the drop down menu, "Desktop" is usually the best choice. Then click Save.
    4. When finished, your DVD icon will appear on the desktop with the .dmg extension.
    5. With iMovie open, double-click the .dmg  file you created to mount it. The iMovie import window will then appear asking you to choose. Click Import All and wait for the Import to complete.

  • I have purchased a new computer and want to upgrade to lightroom 5. How do I go about doing this when LR4 is currently on my old pc?

    I have purchased a new computer and I want to upgrade to lightroom 5. How do I go about doing this when LR4 is currently on my old pc? Thanks!!!!

    Just install Lightroom 5 on the new machine and activate it using the serial number from your purchase.  You do not need to have the older version installed though you might need information from it.

  • I am looking to purchase my recent download of LR, not subscribe to Creative cloud.  How do I go about doing this?

    I am looking to purchase my recent download of LR, not subscribe to Creative cloud.  How do I go about doing this?

    If you need to upgrade to LR 5 from an earlier version see the link below.
    Products

  • HT201269 I would like to sync my text messages from my iphone 4 to my iphone 5c. I was able to sync everything else but my message, how can I go about doing this?

          I would like to sync my messages from my iphone 4 to my Iphone 5c. I was able to sync everything but my text messages. Im trying to figure out how to go about doing this.

    I think this is what you're looking for.
    To use Continuity for SMS and MMS with your iPhone and your Mac, iPad or iPod touch
    Your iPhone, iPad, and iPod touch need to use iOS 8.1, and your Mac needs to use OS X Yosemite.
    Sign in to iMessage on your iPhone, your other iOS devices, and your Mac using the same Apple ID.
    On your iPhone:
    Go to Settings > Messages > Send & Receive > You Can Be Reached By, and add a check to both your phone number and email address.
    Go to Messages > Text Message Forwarding, and enable the device(s) you would like to forward messages to.
    Your Mac, iPad, or iPod touch will display a code. Enter this code on your iPhone to verify the SMS feature.
    From this article.
    Connect your iPhone, iPad, iPod touch, and Mac using Continuity - Apple Support

  • HT4157 I am not iPad savy but I would like to use my 3G iPad while I am in punts Cana Dominican. I have a t &t how would I go about doing this so I am not charged for using their wifi

    I am not iPad savvy but I would like to use my 3 g iPad while I am in punta Cana Dominican on vacation without using the resorts wifi. I would I go about doing this. Robin

    Tap Settings > Wi-Fi
    Switch to OFF.

  • I have an early 2008 iMac running iOs 10.5.8. I need to upgrade to at least iOs 10.6 snow leopard in order to install the driver for a new HP Office Jet Pro 8610 printer. How do I go about doing this, and which version of 10.6 would be best?

    I have an early 2008 iMac running iOs 10.5.8.It has a 2.8 Ghz Intel Core 2 Duo. I need to upgrade to at least iOs 10.6 Snow Leopard in order to install the driver for a new HP OfficeJetPro 8610 printer. Which version of 10.6 would be the best for this Mac and how do I go about upgrading?

    Click here and buy the DVD.
    (115929)

  • Hardware failure on my iPhone 4s, I want to get a new phone under the NZ consumer guarantees act. How do I go about doing this?

    Hello,
    My ear speaker has failed in my two year old iPhone 4s. As this is a hardware failure under New Zealands consumers guarantees act apple is liable and is legally obligated to replace my device. Since I ordered my phone online from the apple nz store and New Zealand dosen't have an official apple store, how do I go about making the claim?

    Call AppleCare. They will explain your options.

  • How would I go about doing this type of compositing in AE???  Help?

    Hey everyone,
    I have a question regarding specific footage I have shot:
    http://vimeo.com/13846546
    password: ski
    Now the steadicam shot I used (I have done something similar for the actual music video) I would like to have 3d text/objects 'pop-up' from behind the artists shoulder and follow him for a few seconds as he says certain parts of his lyrics during his walking shot.
    I'm assuming I will have to do things like 'tracking' and 'camera solving' and also probably have to mask the subject to have the 3d objects appear like they are 'behind' him...as well as lighting the objects that I would prob have to creatd in Maya/Photoshop CS5 (which I have access to) etc etc etc.
    That's my main problem...I just don't know AE well enough (albeit I'm quick to learn) and I basically need to know specifically what I need to be doing here to achieve my ideas.
    I've seen some basic "how to add 3d text to video" tutorials but they are all for static shots and in this case you can see that's not the case here.
    Can anyone please provide some workflow insight?
    I'm not looking for an easy way out here but any direction to make this process a bit less error free would be GREATLY appreciated.
    Thanks for any help in advance.
    If I'm not being clear enough about what I'm tryin to do please let me know and I will clarify as best I can.
    Much thanks in advance!
    - B

    I'm afraid you can pretty much forget all that because the video was shot the wrong way in the first place. The camera is far too close in and the artist obscuring too much of the background to get a stable track. His gestures would throw off the tracker, also. Aside from that, due to how it moves, you would have to do it for every shot separately and still need to manually matchmove sections where the motion is simply too fast. Additionally, you cannot go creative with contrast and color. This needs to be shot as neutral as possible. In some of your footage there is nothing but black shadows and while that may be due to the color correction, I doubt the original sources look that much better. so ultimately, you are stuck with those techniques for static shots and throwing a lot of manual work on top of it to make it work in the few shots where it may be possible to kinda match the camera..
    Mylenium

Maybe you are looking for