Single schema or multiple schemas

Hello
A few years ago I worked on a greenfield project where we were building a system to serve 20 or so different departments with 1200+ users. The approach the existing DBA had taken was to use a single schema for all objects and for all apps. The big advantage I found with this approach was for development, we could have one database and each developer could develop whatever they wanted in their own schema. Name resolution meant that they could override the main copy of whichever object they were working on just by having it in their schema. Unfortunately the project went nowhere and I left after 3 months so I never got to see what issues were raised with the system in production. So I'm wondering, has anyone else taken this approach and if so what would you say are the main things to be wary of? Especially things that aren't a problem when the objects are distributed between multiple schemas.
Thank you in advance
David

user12065404 wrote:
Hi Ed
Thank you for your reply. I think I need to clarify what I meant a little.
On a number of sites I've been to there have been multiple applications spread out over multiple schemas for the same business unit. To draw on the emp example it would be like having the EMP schema containing the emp table and the DEPT schema containing the dept table, with a single HR application (for a single buisness unit/department) selecting from both. If you scale this up to 000s of tables and 30 odd schemas, it's a bit of a nightmare from the perspective of code location and permissions because each department needs to look across schemas to get all of the data to do their job. Effectively tables and code had become segregated into separate schemas by business "function" and it means that the applicaitons are so intertwined with the different schemas that to have more than one business unit means you either need a completely separate database or you have to look at VPD.
App         SCHEMA      Table
HR          emp         emp
dept        dept
Invoicing   emp         emp
invoicing   inv
contracts   contract
orders      ORDER
Ordering    emp         emp
contracts   contract
orders      ORDER
orders     orderitem
...The advantage I saw with a single schema for all the data for a single business unit is the one you have mentioned - i.e. you can very easily set up a new business unit that is totally separate from the other by having a new schema and point the same version of the same application at it. Or failing that, using VPD. And on top of that, security is simplified - no needing direct grants from one schema to the other and especially not requiring WITH GRANT OPTION in the case of a view that pulls data from various schemas and rights to select from the view have to be grated to a role.
App         SCHEMA      Table
HR          abc_ltd     emp
abc_ltd     dept
Invoicing   abc_ltd     emp
abc_ltd     inv
abc_ltd     contract
abc_ltd     ORDER
Ordering    abc_ltd     emp
abc_ltd     contract
abc_ltd     ORDER
abc_ltd     orderitem
...The other big advantage I saw was from a development and testing perspective. You can have one testing database supporting lots of developers working on lots of different projects against the same core data set and code. The multiple schema setup I described above means that effectively you need to have one testing database per project - which becomes unmanageable when databases start growing to the TB range.
David
Edited by: user12065404 on 26-Mar-2010 08:30
Saw a typo in my first exampleOK, now it is a lot more clear.
What you have here is a problem of some data (employee) being enterprise data, and other data being application data.
I take it your "invoiceing" app is used by the sales side of the business, and "ordering" is used by the purchasing side (my last assignment when I was an apps analyst was the purchasing/inventory control for an auto manufacturer).
With what I know at this point, I'd have an HR schema, an INVOICING schema, and an ORDERING schema. (Well actually, I'd have SALES and PURCHASING, because INVOICEING and ORDERING are going to have to integrate with other stuff in those areas). Even though invoicing and ordering both have a CONTRACT table, I'd think the properties of a contract for one would be different than the other, so the table design itself would be different. How about tables SALES_CONTRACT and PURCHASING_CONTRACT. Same concept for ORDERS, and both sales and purchasing would need header and details .... SALES_ORDER_HEADER, SALES_ORDER_DETAIL, PURCH_ORDER_HEADER, PURCH_ORDER_DETAIL.
These two apps need for employee data should be pulled directly from the HR emp table, with access limited to stored procedures that control what data is exposed. Or from materialized views. Never try to maintain the same data in two places at once. It will never maintain consistency.

Similar Messages

  • Transfer schema or multiple schemas or even the database

    hello.......steven :)
    i managed to transfer a table from 9.2.07 database to 11g R2 and the NLS_LANG issue solved.
    I want to try to move a schema or schemas or even the whole database.
    How difficult is that???
    thanks again
    Edited by: airmax012 on 6 Οκτ 2011 4:06 πμ

    The message about SIEBEL.EIM_ACCNT_CUT_TMP is from somewhere else with respect to the parameter files you posted (those only cover the IT schema). If you have unused columns, is there a corresponding unused column on the target? ASSUMETARGETDEFS means you are telling GoldenGate that the source and target tables are identical, so that means column for column they are the same. If you have unused columns, but source and target are the same, then you would use a combination of ASSUMETARGETDEFS and ALLOWUNUSEDCOLUMN.
    If you use ALLOWUNUSEDCOLUMN, then:
    When using this parameter, the same unused column
    must exist on the target, or else a source definitions file for
    the table must be specified to Replicat so that the correct
    metadata mapping can be performed. By default, Extract
    abends on unused columns.
    Identical rules:
    For source and target structures to be considered identical, they must contain identical
    column names (including case, if applicable) and data types, and the columns must be in
    the same order in each table. In addition, both tables must have the same column length
    semantics for character columns (bytes versus characters).

  • Multiple Import into Multiple schemas in a single Database server ?

    Is it possible to create a multiple import into multiple schema in a single DB server ?

    Hi,
    Yes, You can do it.. With Multiple Export File..it may cause some Performance issue, so need to check your Server configuration before do that..

  • Database Design - multiple schemas

    Hi!
    We're currently designing a DB for an AUTHENTICATION SYSTEM where several users from different companies (around 40) will have to be authenticated -- connected to ORACLE. Authentication and faster recovery is important.
    Recovery/Backup
    An issue raise where what if the schema encountered a problem then of course you have to backup the entire data. So we are considering to use multiple schemas.
    One Company = One Schema
    So if one schema is down then other schemas will not be affected and faster to recover.
    Actualy, we're quite hesistant to use multiple schemas because of maintainability -- Managing different schemas and too much burder for our developers.
    Will the idea of having multiple schemas be advantageous to what we want to achieve?
    Is this a good design or any other idea to handle this kind of situation?
    Can Partitioning do the same?
    Thanks a lot

    Advantages of multiple schemas:
    - each schema is entirely separate
    - you can maintain at different times/dates for different companies
    - different schemas could be on different databases / servers
    Disadvantages
    - any 'shared' data may have to be duplicated (but you can always use a shared schema for reference data)
    - yes, you have to maintain each schema separately (but that would be by scripts, and at least they'd be well tested!)
    The dictionary (SYS tables) will be somewhat larger (40 copies of table, index, pl/sql definitions)
    - you'll have 40 identical sets of SQL cached; they all look the same, but relate to different schemas. So you need a bigger SGA.
    Can Partitioning do the same?No - partitioning is a solution to a physical problem, not a security problem
    Is this a good design or any other idea to handle this kind of situation?I think either way works - it depends on size, number of users, are you using a third tier, etc.
    Or, with a single schema, you can use VPD - virtual private database (otherwise known as FGAC - fine grained access control or RLS - row level security).
    See eg http://builder.com.com/5100-6388_14-5062064.html and also Ask Tom http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:70287097313911 which refers to the documents.
    You can also implement a kind of VPD on the cheap by using user defined namespaces and the SYS_CONTEXT function, combined with application logic and clever view definitions.
    HTH
    Regards Nigel

  • Oracle Portal w/ Multiple Schemas

    I posted this in the Architecture forums, but it looks like this forum may be better or yield more results for what I'm looking for.
    We are just about to launch a Portal initiatve and are looking for best practices for implementing a single instance of Oracle Portal that interacts with multiple schemas. Has anyone here done this or know where I can find this type of info? I have a few questions about how this works, how scalable it is, how security is handled, yada yada yada. --Kind Regards, Derek.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi jlubbers. Thanks for your reply.
    After some additional disucssions with our DBAs, I think I may have left a misleading post in respect to schemas. Our company acts as an application service provider to some degree. The way the databases are setup, each of our client agencies have their data stored completely separately from other agencies. The table structures are almost exactly identical (and can be considered identical for the scope of this discussion) and will never be merged together.
    We want to leverage Oracle Portal as much as we can while also getting as much reuse as we can. Each time we get data from the database, we want the datasource to be dynamic based on the usergroup.
    One constraint that we have is that the physical database connection must be connected as the user that's logged into the portal, so I think we have to do some type of User Proxy, but we're not 100% sure how to do that and what that means for all of our java applications.
    I'll check out your other posts and see if there is anything in there that may help. Thanks for taking the time. --Derek                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Multiple schema used on apex?

    hi all,
    i posted a thread here need some comments or suggestions for database designing
    just wanted to ask comments from APEX developers as well. is it recommended to have more than one schema if i use Oracle Application Express as front-end tool?
    considering that having multiple schema means multiple workspace. then there will be features that i won't be able to use such as a single sign on for all applications in this case?
    what i want to know is are there any other ways to have a user sign in to one application and be authenticated in all applications despite that those applications are on different workspaces?
    thanks
    allen

    Allen,
    One Workspace doesn't mean one schema. You can have multiple schemas assigned
    to one workspace.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Multiple Schemas under one user account with XE 10g

    Hi,
    I am using (learning) XE 10g. I would like to know if it is possible to have multiple schemas under one user account and have the schemas logically separated. As of right now, I have three schemas that I am working with, each one under a different user account. This is inconvenient, because I have to logout of one user account and login to another user account simply to be able to work with another schema.
    Thanks

    It isn't possible to have multiple schemas under one database user account. It is of course possible to grant rights to other database users, and or roles, in order to allow access to the tables/data from other accounts. In Oracle there is a one-one mapping between schema and user.
    Niall Litchfield
    http://www.orawin.info/

  • One application with Multiple schemas- common application frame work

    Hi All,
    I am trying setup a common application frame work in apex. Please help me.
    How to achieve this.
    Creation of one application attached to different schemas at run time. So that my application maintaince is going to be easy instated of creating copies of same application.
    More details:
    1. I have one application with 100 pages pointing to a schema dev_common in one workspace APP_COMMON. I have 50 schemas with same structure of dev_common schema with different set of data ( because of large amount of data).
    So I want to create one application attached to different schemas.
    2. And another thing is I have 100 users, the user can work on 1 or multiple schemas ( I mean same application with different schemas attached)
    Any help much appreciated.
    Thanks,

    Thank you for the reply.
    >> b) I think you have to give access rights for the dev_common and app_common to all users.
    Dev_common schema is a kind of placeholder. I have 50 schemas same as dev_common because of different business requirements but the front end is same for all 50 schemas. How can we create one application used for 50 schemas instead of creating 50 applications and 50 workspaces.
    Please help me.

  • Validate a XML file against multiple schema files

    Hello everybody!
    How can I validate a XML file against multiple schema files?
    I have the following XML file:
    <?xml version="1.0" encoding="UTF-8"?>
    <bulkCmConfigDataFile xmlns:es="SpecificAttributes.3.0.xsd"
                             xmlns:xn="genericNrm.xsd"
    xmlns="configData.xsd">
    <fileHeader fileFormatVersion="32.615 V4.2" vendorName=""/>
    <configData dnPrefix="Undefined">
    <xn:SubNetwork id="3G">
    <xn:SubNetwork id="RNC01">
    <xn:MeContext id="RNC01">
    <xn:VsDataContainer id="RNC01">
    <xn:attributes>
    <xn:vsDataType>vsDataMeContext</xn:vsDataType>
    <xn:vsDataFormatVersion>SpecificAttributes.3.0</xn:vsDataFormatVersion>
    <es:vsDataMeContext>
    <es:userLabel>RNC01</es:userLabel>
    <es:ipAddress>172.21.3.17</es:ipAddress>
    <es:neMIMversion>vF.5.0</es:neMIMversion>
    </es:vsDataMeContext>
                                  </xn:attributes>
    </xn:VsDataContainer>
    </xn:MeContext>
    </xn:SubNetwork>
    </xn:SubNetwork>
    </configData>
    <fileFooter dateTime="2006-11-24T11:56:07Z"/>
    </bulkCmConfigDataFile>
    I want to load this file into a table, validate it (against SpecificAttributes.3.0.xsd, genericNrm.xsd and configData.xsd) and query that table. How would the INSERT .. and the SELECT ... for userLabel attribute look like?
    Many thanks!

    Hi Peter,
    Please use the validateXML BPEL Property : This property validates incoming and outgoing XML documents. If set to true, the Oracle BPEL Process Manager applies schema validation for incoming and outgoing XML documents. This property is applicable to both durable and transient processes. The default value is false.
    Cheers
    A

  • Multiple schema, but instance doc does not have namespace

    Is it possible to successfully validate an instance document without namespaces against multiple schema with different namespaces?
    example:
    this is the normal xml which is valid with all the namespace:
    <MyRoot dateTime="040112061834" instanceIdentifier="NTNDEC13541" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://org.schema.ntn" xsi:schemaLocation="http://org.schema.ntn ntn.xsd" xmlns:cbc="http://org.schema.cbc cbc.xsd">
         <cbc:MessageVersion>040</cbc:MessageVersion>
         <cbc:SenderID>2344134</cbc:SenderID>
         <cbc:RecipientID>3485774</cbc:RecipientID>
         <cbc:TotalNumberOfDeclaration>1</cbc:TotalNumberOfDeclaration>
    </MyRoot>but I want to remove all namespace
    <MyRoot>
         <MessageVersion>040</MessageVersion>
         <SenderID>2344134</SenderID>
         <RecipientID>3485774</RecipientID>
         <TotalNumberOfDeclaration>1</TotalNumberOfDeclaration>
    </MyRoot>now is it possible to validate programmatically using sax the above xml against multiple schema? can i do it without any namespace at all??
    thanks

    Hi Larry, Thanks for your reply along with Muppet Mark, If I changed the color settings originally it was not my intension, I was simply just opening the next project to work on and viola’ “missing profiles”.
    Attachment (picture) 7 was my last setting for color prior to your email, and yes I was messing around with this last night comparing it to one of our old G4’s, so I can’t remember where it started out before I got my hands on it.
    Attachment (picture) 8 is my current settings based on your email recommendations.
    Attachment (picture) 6 is the message I receive when I open any files created prior to these changes I just made. However after I open and resave the file I no longer receive this (picture 6) message.
    My question is will my color be back to where it was before the problem started last week. In looking over one of the files I opened (I design/build transportation maps btw) most of the color is where I usually have it set however some colors were fractional as if they were converted from spot colors. SO I’m not sure what to do except go through all the known colors and make sure they are where I usually would set them, or do you have a better suggestion.
    Oh by the way – for all you guys that are helping lunch is on me at McDonalds on Michigan St in Grand Rapids, MI!!
    #7
    #8
    #6

  • Help With Multiple Schemas In Multiple Environments

    Dear Oracle Forum:
    We have a bit of controversy around the office and I was hoping we could get some expert input to get us on the right track.
    For the purposes of this discussion, we have two machines, development and production. Currently, on each machine, we have one database with multiple schemas, say, one for sales data and another for inventory. The sales data has maybe 200 tables and the inventory has another 50. About 12 times a year, once a month, we have a release and move code from dev to prod. The database is accessed by several hundred Pro*C and Pro*Cobol programs for online transaction processing.
    The problem comes up when we need to have multiple development environments. If I need to work on something for May that requires the customer address field to be 50 characters and somebody else is working on something for July that requires the customer address field to be 100 characters, we can’t both function in the same schema. We have a method of configuring running programs to attach to a given schema/database. Currently, everything connects to the same place. We were told that we should not have the programs running as the owners of the schemas for some reason so we set up additional users. The SALES schema is accessed with the connect string: SALES_USER/[email protected]. (I don’t know where we got dot world from but that is not the current discussion.)
    One of the guys said that we should have 12 copies of the database running, which is kind of painful to think about in my opinion. Oracle is not a lightweight product and there are any number of ancillary processes that would have to be duplicated 12 times.
    My recommendation is that we have 12 schemas each for sales and inventory with 12 users each to access them. We would have something like JAN_SALES_USER, FEB_SALES_USER, etc. Each user would have synonyms set up for each of the tables it is interested in. When my program connects as MAY_SALES_USER, I could select from the customer table and I would get my 50 character address field. When the other user connects as JUL_SALES_USER, he would get his 100 character address field. Both of us would not know anything different.
    Another idea that came up is to have a logon trigger that would set the current schema for that user to the appropriate base schema. When JUL_SALES_USER logs in, the current schema would be set to JUL_SALES, etc. This would simplify things by allowing us to avoid having something like 2400 synonyms to maintain (which could be automated without too much difficulty) but it would complicate things by requiring a trigger.
    There are probably other ways to go about this we have not considered as yet. Any input you can give will be appreciated.
    Regards,
    /Bob Bryan

    Hans Forbrich wrote:
    I'd rather see you with 12 schemas than with 12 databases. Unless you have lots of CPUs to spare ... and lots of cash to pay for those extra CPU licenses.
    Then again, I'd take it one step further and ask to investigate the base design. There should be little reason to change the schema based on time. Indeed, from what little I know of your app, I'd have to ask whether adding a 'date' column and appropriate views or properly coded SQL statements might simplify things. Interesting. If we were to have one big Customer table with views for each month, how would we handle the case where the May people have to see 50 character address and July have to see a 100 character address field. I guess we could have MAY_ADDRESS VARCHAR2(50) and JULY_ADDRESS VARCHAR2(100) and take care to make sure that people connecting as May can only see the May columns, etc. This is simpler than multiple schemas?
    I may have overly simplified things in my effort to get something down that would not require too much explanation. The big thing is that multiple people are doing development and they have to be independent of each other. If we were to drop a column for July, the May people will have trouble compiling if we don’t keep things separate. It is not a case of making the data available. The data in development is something we cook up to allow us to test. The other part is the code we compile now will be released to production one of these times. In production, there is only a need for one database.
    We are moving from another database product where multiple databases are effectively different sets of files. We have lots of disk space so multiple databases were no problem. Oracle is such a powerful product; I can’t believe there is not some way to set up something similar.

  • Using Multiple Schemas in one Application

    Is it possible to have multiple schemas from the same database in one applicaiton. In APEX we have added multiple schemas to our workspace but when we create a form or report only one schema seems to be available.

    Miroslav wrote:
    Your application has a parsing schema. All other schemas have to give appropriate grants to it to be available to your application.Miroslay is right, if you use the INTERNAL workspace to add additional schemas to a workspace, APEX does not take care of any grants between the schemas. APEX can not know how or if you might want the schemas to interact with one another. All this does is gives the workspace the ability to utilise that schema, such as adding it as parsing schema to any applications in the workspace.
    You can switch to the secondary schema in SQL Workshop and add grants from there, e.g.
    grant select on SECONDARY_SCHEMA.MY_TABLE to PARSING_SCHEMA;

  • Browsing multiple schemas in SQL Developer

    Hello,
    I have been using Toad before and I just started using SQL Developer. In Toad we have the abillity to browse through multiple schemas by selecting the appropriate schema from the drop down list. However when I login via SQL Developer it seems I get to browse only the schema associated with my username even though I can run queries against tables that reside in other schemas. How do I browse through multiple schemas via SQL Developer? I am using SQL Developer v1.2.1.
    Regards.

    Hi,
    Look for "Other Users".
    K

  • One dump file inport into multiple schema

    Hi,
    I need to import one dumpfile to multiple schema but it's not working.
    impdp "'system/redhat as sysdba'" dumpfile=CTBNGUMB_14022011.dmp logfile=CTBNGUMB_IMP_1602.log directory=DUMP_DIR remap_tablespace=NGUMB_TS:TRUSTWARE01 remap_tablespace=TRUSTWARE:TRUSTWARE01 remap_tablespace=NEXTGENREF:TRUSTWARE01
    remap_schema=CTBNGUMB:CTBNGUMB_1,CTBNGUMB:CTBNGUMB_2,CTBNGUMB:CTBNGUMB_3,CTBNGUMB:CTBNGUMB_4
    how can import one dumpfile to multiple schema?
    Edited by: 819136 on Feb 16, 2011 5:53 AM

    Hi,
    I want same schema import into different schams (users) is it possible?
    OS Version is Linux 4
    Oracle DB Version is : 10.2.0.4
    While importing getting the below error
    [oracle@sos02 10.2.0]$ impdp "'system/redhat as sysdba'" dumpfile=CTBNGUMB_14022011.dmp logfile=CTBNGUMB_IMP_17022011.log directory=DUMP_DIR remap_tablespace=NGUMB_TS:TRUSTWARE01 remap_tablespace=TRUSTWARE:TRUSTWARE01 remap_tablespace=NEXTGENREF:TRUSTWARE01 remap_schema=CTBNGUMB:CTBNGUMB_1 remap_schema=CTBNGUMB:CTBNGUMB_2 remap_schema=CTBNGUMB:CTBNGUMB_3 remap_schema=CTBNGUMB:CTBNGUMB_4
    Import: Release 10.2.0.4.0 - Production on Thursday, 17 February, 2011 9:24:32
    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    ORA-39001: invalid argument value
    ORA-39046: Metadata remap REMAP_SCHEMA has already been specified.

  • Does XDB supports validating xml against multiple schemas?

    The XMLType has some methods for validating an xml documents against a schema, e.g., SCHEMAVALIDATE, etc.. does XDB support validating xml against multiple schemas (Just like what JAXP or Xerces have done)? Or what's the current situation about this issue? thanks.

    did you try using the import schema element instead of the include elemnt?

Maybe you are looking for

  • Follow up on: Topic : iBook G4 800 MHz freezes when moved or bumped lightly

    Last year I posted the following message, which has been fixed. Summary of repair at bottom of post: Original message posted Aug 4, 2007: "For the past several months my iBook G4 has been freezing when moved or bumped lightly. It has also occasionall

  • ATI 1900 XT dead

    My ATI 1900XT in my trusty 2006 2x2.66 Mac Pro has now gone to the happy hunting ground -- it will sometimes work, but most of the time, it just pumps a couple milliseconds of vertically sheared video out to the monitor and then goes black again. Tha

  • What are the Limitations of the Siebel Workflows ?

    Hello There, I'm doing a research about the limitations of Siebel workflows if you have any Ideas please share. Thanks

  • HDMI cable and wireless router for bluray

    Hi. We just purchased a Samsung Blu-ray player, model BD-C 6500. We want to connect it to our 46" samsung LED TV  and stream movies from Netflix.  I was wondering which HDMI cable would be best to use to connect it? We also havea Netgear Rangemax rou

  • Alternate Item in BOM

    We are manufacturing a assembly using alternate raw materials say RM1 or RM2 or RM3. We want to define these three raw materials alternately in such a way that; 1.     If stock of RM1, RM2 & RM3 is available, then system should consume the RM1 first