Data distribution scheme and database fragmentation

Hi all,
I'm working on a scenario (University) involving the fragmentation of a central database. A company has regional offices i.e. (England, Wales, Scotland) and each regional office has differing combinations of business areas. They currently have one central database in their head office and my task is to "design a data distribution scheme". By scheme does this mean something like horizontal / vertical fragmentation? Also can somebody point me to an Oracle specific example of creating a fragmented table? I've tried to search online and have found the "partition by" keyword but not much else except for database linking - but I'm thinking this is more concerned with querying than actually creating the fragments.
Many thanks for your time

>
Partitioning is what the tutor meant by "fragmentation". So if there is a current central database and I have created new databases for each regional office I could run something like the below statement on the regional databases to create a bespoke version of the employee table filtered by data relevant to them? This is all theoretical and we don't have to develop the database, I just want to get the syntax correct - Thanks!
>
There you go talking about 'new databases' again. You said your original task was this
>
my task is to "design a data distribution scheme".
>
Is the task to give the regions access to their own data in the ONE central DB? Or to actually create a new DB for each region that contains ONLY that regions data?
So are we talking ACCESS to a central DB by region? Or are we talking replication of the entire central DB to multiple regions?
Your example table is partitioned by region. But if each region has their own DB why would you put data for other regions in it?
If you are wanting each region to have access to their own data in the central DB then you could partition the central DB tables like your example:
CREATE TABLE employees (
id INT NOT NULL,
fname VARCHAR(30),
lname VARCHAR(30),
hired DATE NOT NULL DEFAULT '1970-01-01',
separated DATE NOT NULL DEFAULT '9999-12-31',
job_code INT,
store_id INT
PARTITION BY LIST(region_id) (
PARTITION Wales VALUES IN (2)
); But if you are creating a regional DB that includes data only for that region there is no need to partition it.

Similar Messages

  • Difference Between Database Schema and Database User Account ??

    First i would like to know what an Oracle Database schema exactly is ?
    And what is it for and also What is it's use ?
    Later the exact "Difference Between Database Schema and Database User Account".
    I googled about it but i'm unable to find out it's The difference,
    Please try to explain in a simple manner........
    Thank you very Much in Advance..........

    user13655582 wrote:
    Greate example. but i would like add one more point..
    a user is a schema and schema is a user. but when this applies to the user that he become a schema, only if he has got some objects. so we can say while creating the user which dosent contain any objects called simple user account but afterwords when he has got an objects then we can say its a schema as the above user has shown you through the exampleIt is just word-play. There is nothing in like a 'status' indicator to say "USER_A is just a user but USER_B has become a schema". Many people use the terms "user" and "schema" interchangeably, and some very good DBAs will insist this is correct. I don't disagree with them even though I usually try to make the distinction.
    In a typical application, all of the objects (tables, procedures, etc) that implement the app will be owned by a "application schema owner" - a user which exists for the sole purpose of owning the schema. Said user will have no privileges at all .. especially not CREATE SESSION. Except for possible maintenance activity no one ever actually connects as this user. User accounts are then given to actual humans who connect with their own accounts. The accounts have the necessary system and object privileges granted to them - via a role. One could also create a special account (let's call it APP_ADMIN) that is used for maintenance and batch operations within the application.

  • Is schema and database of sqlserver is same.

    Hi !
    1) i have 10 database in sqlserver 2005, when i made them in oracle xe,
    i made user and a connection so it made a schema asociatted with user which has my tables and other objects of one databse of sqlserver.
    so i had to made 10 users and connection, so i wanted to know wethere it is right way of doing it?
    2) if shemas in oracle is databases of sqlserver, then when we backup it backs up all schem in oracle or there is a way to backup single shema?
    3) if backup of oracle backs up all oracle schema, then is there any way to restore only one schema?
    yours sincerely.

    Well, I'd rather not try to translate the terms directly across. Just think database != database (and so on with respective rdbms implementation).
    If you must, a 'database' (file/file group level) in mssql server db is somewhat similar to a 'tablespace' in Oracle.
    Your mssql db database also has a schema structure, somewhat similar to Oracle's schema structure. One difference is that Oracle has a closer relationship between user and schema, where as in mssql db there is a division between users and schemas and you define how they should relate.
    1) Well, in Oracle you have 1 to 1 relationship and user implies a schema (however it may be empty). So yes if you have 10 schemas you would need at least 10 users in Oracle, since you can't have a "user-less schema".
    2) Simple way is to do a schema export, creating an export dump file (which is sometimes referred to as a logical backup).
    3) This dump may then be used to import the schema, in the same or different db. Tools for export and import are expdp and impdp.
    If you have a real/physical backup (of database files) then you could get that db up and running on a separate host and then export specific schema from there.
    Please read up on the Oracle Concepts guide and the 2-day DBA guide, at least. A couple of chapters from Backup and Recovery guide would probably also be agood idea. See Oracle Documentation library for these and more Database books.

  • Another schema and/or database for a form

    Hello.
    What if i have a form and I want to change the schema and/or database name for the form? Is that possible? It want to make a form on data from a running production database. But testing is not very nice in a roduction database. So i want to build and test in my own schema and database. Then, when it all works, I want to change it to the running database.
    Is that in any way possible with a form from Portal?

    A form resides in an Application.
    You can not change the Schema on which the application is based on.
    What you will need to do is:
    App1 -- Based on Schema1 -- Your production Build
    App2 -- Based on Schema2 -- Your testing build
    Form1 -- Resides here (In App2)
    You will have to copy "Form1" to App1. In that case it will be transfered in Schema1
    One more way will be:
    Export the application
    Delete the application
    While Importing change the application Schema of the Application.
    (Don't forget to take the backup of database before you do this as if anything goes wrong while
    doing the above then you can always revert back)
    Thanx,
    Chetan.

  • Adding "data owner" schema to apex workspace provided unexpected results

    Recently I added a "data owner" schema to an existing apex workspace thinking it was a god idea.
    As stated...
    the schema that I added was a "data owner" schema and I was only suppose to have select capability for apex reporting.
    After the schema was added to the workspace I felt I had owner privs on all of the schema objects and
    could create objects and insert and update table records.
    Needless to say... this is something that I do not want to do with tihs particular "data owner" schema BUT...
    this is something that I feel is really good.
    i.e. The Object Browser and Model are some excellent examples of the apex tool. :)I would just like to remove/block the insert/update capabilty against this particular schema from my workspace.
    Any ideas on how to remove the update capability from my workspace or is it even possible?thanks in advance... :)
    v/r
    RJones

    Ah, thanks I didn't see that section before.
    I put the procedure details in the box; declaring the variables and the code to determine the context values
    Logged in as a user and again as the schema owner (both with admin privs) I get this error back:
    ORA-01031: insufficient privileges
    Error ERR-1181 Unable to set VPD security context on page show.
    This is my procedure:
    Declare
    V_COUNT NUMBER;
    V_PRJ_USERNAME VARCHAR2(30);
    V_USERID NUMBER;
    V_PRJROLE VARCHAR2(30);
    BEGIN
    -- sets user name
    V_PRJ_USERNAME := v('APP_USER');
    V_PRJROLE := 'NO_ACCESS';
    BEGIN
    --gets user id from staff table
    SELECT staf_id
    INTO V_USERID
    FROM PRJ_STAFF
    WHERE staff_oracle_name = V_PRJ_USERNAME;
    Select count(*)
    into v_count
    FROM DBA_ROLE_PRIVS
    WHERE GRANTEE = V_PRJ_USERNAME
    AND GRANTED_ROLE='PRJJ_GUEST_RL';
    if v_count > 0 then
    V_PRJROLE := 'GUEST';
    end if;
    Select count(*)
    into v_count
    FROM DBA_ROLE_PRIVS
    WHERE GRANTEE = V_PRJ_USERNAME
    AND GRANTED_ROLE='PRJJ_DEVELOPER_RL' ;
    if v_count > 0 then
    V_PRJROLE := 'DEVELOPER';
    end if;
    Select count(*)
    into v_count
    FROM DBA_ROLE_PRIVS
    WHERE GRANTEE = V_PRJ_USERNAME
    AND GRANTED_ROLE='PRJJ_MANAGER_RL' ;
    if v_count > 0 then
    V_PRJROLE := 'MANAGER';
    end if;
    Select count(*)
    into v_count
    FROM DBA_ROLE_PRIVS
    WHERE GRANTEE = V_PRJ_USERNAME
    AND GRANTED_ROLE='PRJJ_ADMIN_RL' ;
    if v_count > 0 then
    V_PRJROLE := 'ADMIN';
    end if;
    DBMS_SESSION.SET_CONTEXT('PRJ_SEC_PKG','USER_NAME','V_PRJ_USERNAME');
    DBMS_SESSION.SET_CONTEXT('PRJ_SEC_PKG','USER_ID','V_USERID');
    DBMS_SESSION.SET_CONTEXT('PRJ_SEC_PKG','USER_ROLE','V_PRJROLE');
    END;
    END;
    Is there something wrong with my procedure?
    Edited by: JodyMorin on Mar 27, 2009 6:23 AM

  • Use of SQL Profiles where each schema has very different data distribution and volumes

    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    Our architecture has multiple client schemas in the same database. Each schema has the same code base (tables, procedures etc) but each client's data is very different in terms of volumes and skew/distribution per table. This architecture was done based on cost - I know it's not ideal but it can't change.....
    I am fairly seasoned with performance management and so know the usual tricks of when to eat up the table using parallel full table scans etc. I couldn't further optimise a given stmt for our largest table. I'll call it TSPCI and it has monthly partitions (2 years) and totals about 35Gb in the largest client schema.
    Anyway, I was surprised when ADDM suggested that I could achieve 98% improvement if I were to use a given SQL Profile. Great?
    So, here's my issue - I've found that the same SQL_ID is shared across all those different client schemas: I can't see how to get it to pick/use the SQL Profile in only a particular client schema - let's call it NEX - and not in another (lets call it COL).
    If I generate a SQL Profile as NEX, has it analysed and built the SQL Profile based on the NEX schema and is it therefore invalid/undesirable to have that SQL Profile used in the COL schema??
    I suppose that I could add a small change (say /*+ NEX */) to the SQL in the NEX schema to make the given sql unique there and then generate a SQL Profile for that..........
    What am I missing here?

    Well, I can confirm the behaviour: accept a SQL Profile for a given SQL in one schema and verified that it is used in another schema (where the data volume and distribution is very different).
    I can also confirm the workaround - simply add a hint to the SQL to make it unique such that I could use different sql profiles for the otherwise exact same sql in different schemas.
    I'm happy enough with this workaround but I'll leave this thread unanswered in case someone can suggest a better approach.

  • Database compare script to sync schema and data

    1. I have database-1
    2. I have database-2
    3. database-1 and database-2 are in same oracle 10g server and are same in schema as well as data
    4. All operations will be done with database-1 through my application
    5. At the end of the day i need a script which is to be run in the database-2 to have database-1 and database-2
    alike ie., both schema and Data should be same
    Please anyone suggest me the best solution to get the above script
    This script is to be transfered to some other location in our scenario
    Thanks in advance
    Vivek

    Hi Sybrand Bakker,
    I tried streams for the replication purpose as per your suggesion, till Iam unable make it work , i dont find a step by step document which will make it possible without error.
    One more thing , i need the streams work without Database link, ie., source database is not connected directly to destination database. I need to create streams and transfer the stream as a file through FTP.I need to download stream file in remote location and then apply the streams to destination database and after this source and destination database should be same in data and schema.
    Please suggest me a solution to go abt this scenario. We are in critical stage to make it happen...
    thanking you in advance
    with regards
    vivek
    Message was edited by:
    Vivekanandh

  • Copying database objects and data from one server database to another server database in AG group

    Hi,
    I am still trying to wrap my head around sql clusters and AGs and I have a project that requires I take a vendor's database and restore it weekly so its available on the production server which is clustered.
    The vendor's database on the cluster is in an AG group and encrypted.
    Right now, I plan to restore the database on a sql staging server and use the SSIS Transfer SQL Server Objects Task to copy the table structure and data from Stage to the Production database of same name and I would first drop the objects in production
    database using the same task.
    I am concerned that this might cause issues with the passive cluster due to "logging" from active to passive. The database is about 260 MBs and I am not sure how many tables.
    Has anyone run into this type of scenario before or have a better solution?
    Thanks
    Sue

    IF I understand anything about clustered sql and logging, the sql server should take the log file and recreate the same scenario on the passive side of the cluster.
    Is that correct?
    Hi Sue,
    Yes, for AlwaysOn Availability Group, the transaction log is basically replayed from the primary to all of the secondary's.
    Besides, from my point of view, as we cannot directly restore a database that is part of an Availability Group, it is a good way using SSIS task to drop and recreate all tables then transfer data from the restored database to the primary replica. Schema changes
    and data changes will also happen on the secondary  replica.
    There are some similar links for your reference.
    http://dba.stackexchange.com/questions/21404/do-schema-changes-break-sql-server-2012-alwayson-or-are-they-handled-transpare
    http://blogs.msdn.com/b/sqlgardner/archive/2012/08/28/sql-2012-alwayson-and-backups-part-3-restore.aspx
    Thanks,
    Lydia Zhang
    If you have any feedback on our support, please click
    here.
    Lydia Zhang
    TechNet Community Support

  • How to export app +underlying schema(and data)

    Hi
    I am trying to export my application and its underlying tables to a new system .
    I want to know if it can be done together and not seperately..(export app and then export each table)
    Is there away to package the app and its underlying repository?
    Thanks

    No....
    You will have to do them seperately as there is no logical connection between the application and the tables.
    Your application just has the access to use those tables and does not "own" any of them.
    a) Oracle database tables/ application tables
    You can export the entire schema and all the objects and data in that schema using the export and import utilities.
    All these objects are owned by the schema (eg. emp under scott) and hence are related logically.
    b) Oracle apex metadata tables.
    All the information about apex objects is stored as metadata in database tables (FLOWS_0300 is a schema).
    So, if you install Oracle apex on a new machine, all these repository tables will be created.
    When you create applications / objects, these tables will have metadata for those applications.
    Hope this helps,
    Rajesh.

  • Data distribution in distributed caching scheme

    When using the distributed ( partitioned ) scheme in coherence , how the data distribution is happening among the nodes in data-grid..? Is there any API to control it or are there some configurations to control it ?

    Hi 832093
    A distributed scheme works by allocating the data to partitions (by default there are 257 of these, but you can configure more for large clusters). The partitions are then allocated as evenly as possible to the nodes of the cluster, so each node owns a number of partitions. Partitions belong to a cache service so you might have a cache service that is responsible for a number of caches and a particular node will own the same partitions for all those caches. If you have a backup count > 0 then a backup of each partition is allocated to another node (on another machine if you have more than one). When you put a value into the cache Coherence will basically perform a hash function on your key which will allocate the key to a partition and therfore to the node that owns that partition. In effect a distibuted cache works like a Java HashMap which hashes keys and allocates them to buckets.
    You can have some control over which partition a key goes to if you use key association to co-locate entries into the same partition. You would normally do this to put related values into the same location to make processing them on the server side more efficient in use-cases where you might need to alter or query a number of related items. For example in finanial systems you might have a cache for Trades and a cache for TradeValuations in the same cache service. You can then use key association to allocate all the Valuations for a Trade to the same partition as the parent Trade. So if a Trade was mapped to partition 190 in the Trade cache then all of the Valuations for that Trade would map to partition 190 in the TradeValuations cache and hence be on the same node (in the same JVM process).
    You do not really want to have control over which nodes partitions are allocated to as this could alter Coherence ability to evenly distribute partitions and allocate backups properly.
    JK

  • Target Schema and Runtime Instance of Oracle Database

    I am new to OWB and starting to understand its architecture.
    Does the Runtime Access User, Runtime Repository Schema and Target Schema (discussed a the Runtime Instance) need to be installed on every database that will be a target? For example, if I have a data warehouse and two data marts, with I have three installations?

    Hi,
    You need to run the OWB Runtime Assistent for every target schema, that is correct (it will add the auditing stuff that enables you to monitor what's happening deployment and execution wise).
    Whether you need to create a Runtime Repository and its accompanying Runtime Access User(s) for each and every target I'm not sure.
    If your target schema's are on the same instance I'd say that you can use as few or many Runtime Repositories as you wish.
    When on different instances I think it's necessary to create them.
    Hopefully other forum-attendees can add some more if they have definite answers.
    Cheers, Patrick

  • Relational schema and difference berween relational schame and data base schema ?

    Hi ,
    Am new to Database
    Can u help me to understand relational schema and data base schema ?
    thanks

    Hi Neil,
    I'm not good with the relational schema, which is being deprecated. Given your results though, you might try
    doing a count of distinct GIDs in the index table and compare it with the number of distinct geometries to make sure
    your index is complete.
    Also, if you have quadtree indexes at the same level in both Object-relational and relational then you can compare the
    number of index entries in both models.
    Hope this helps,
    Dan

  • Forms pulling Multiple Records from an XML Schema and XML data files - Adobe LiveCycle Designer

    I built a form in Adobe LiveCycle with an xml schema and data file.  The problem is with how the form renders the xml data file.
    I have a statement element that consists of about 6 fields (statementID, statementName, statementAddress, statementCountry, statementZip, statementDate, etc) of data in the schema that allows for multiple iterations - so one xml data file can contain multiple statements. These fields allow for null values.
    But here's the problem:  When any of the statements - say statement 2 of 6 - has a null value in one of the fields, if the xml data file doesn't have a placeholder
    (example of placeholder:  <statementName type="String"/>   )in the xml for that field, my form pulls the field value from the NEXT statement.
    This corrupts all the rest of the statement records, as this field is shifted up for all the rest.
    I know that in the past I haven't needed a placeholder when a field was null. But I'm wondering if when the data allows for multiple records the xml data file needs to generate the placeholder.  And where is the problem? In the Schema? The xml data file? My form?  And the 64-thousand-dollar question:  How to fix it?

    If your <statement> element is the one that repeats, it should be bound to a subform with the binding string of something like $.statement[*]. Then in that subform should be your fields and they should have bindings of $.statementID, $.statementName, $.statementAddress, etc.
    Kyle

  • Migrating and Backing up Schemas (complex database structures)

    Hey guys, I need to figure out a way to back up and also migrate our Oracle database from our production schema to the dev schema and the other way around.
    We have bunch of config tables that drive how systems on our platform run, and when setting up new systems or doing maintenance, we need to update our config tables. We want to be able to work on the dev schemas and after setting up a system/feature, we want to be able to migrate all those configs to the dev schemas.
    I thought of running a procedure where we give the ID of the system (from the main table) and i would go through all the tables and select nvl(..) and if it doesn't exist, i would insert into, and if it does exist then i just run an update on that row.
    This code will get very messy and complicated especially since the whole config schema is very complex and it might be hard to handle all the keys properly.
    Another option i was looking at was triggers, so when setting up a new system, there would be a log of all the statements we ran while setting up/editing a system, then we would run it on our production schema.
    I'm on a coop term, and have only been working with databases for 6 months, so i don't know that much and any information/advice would be greatly appericiated.

    Yes i guess it might not be migration, it's just what the project is called around here :)
    Regardless, yes the intiial idea was replication, should create all the keys from stratch when creating the entries in the production schema but we abondened the idea and we'll be using the production sequences for creating the primary keys in the development, and just make an exact copy back and forth...
    Do you think i can just start from the top of the hierarchy (even though not clearly defined, so hierarchy might not be very straight forward) and loop through that table, insert or update, then move one level down, copy and update and so on?
    Also is there any sources where i can get more information regarding triggers
    Edited by: tolgaek on Oct 27, 2010 10:04 AM

  • Saving Data in SAP and DB2 database

    Hi All,
    I have an SAP application in which 10 fields are there for the user to enter. Out this 10 fields i need to save 5 fields in SAP database and another 5 in DB2 database.Please help me how to achieve this.
    Regards
    VEnk@

    Hi Jesse,
      The Citadel database is not a relational database.  It's highly optimized for storing lower-rate (non-waveform) channel-by-channel, or "trace" measurement data.  Another option you can consider is using DSC and Citadel on the server then writing a utility to export the data from Citdael to an SQL database.  --That would solve the problem of having to write a logger application from scratch.  You would only have to write the relatively simple application to export the data from Citadel and import it into a relational database.
      You could accomplish this two ways.  First, DSC includes a set of VIs that will retrieve historical data from Ciatdel.  You could use LabVIEW to parse this data and write it to a table in a relational database.  Second, Citadel actually includes a locally accessible ODBC interface.  (You can query Citadel using an SQL query from the local computer).  You could query Citadel using this interface, then write the result to a table in a relational database.
      To view Citadel in its native format or query a Citadel database using ODBC from a remote comptuer that comptuer would need to have a licensed DSC RTS installed.
    ~~

Maybe you are looking for

  • Weird Region Display Issue

    I am having trouble modifying the Wizard Progress List template. What I am trying to do is make it so each step in the Progress List is a clickable link. So I copied the Wizard Progress List template and modified the new one to use < div class="t13Wi

  • My second thread.. ITV poor quality on i player!

    Anoter problem I have is that on ITV player the bandwidth seem low as it regularly freezes and then the circle rotates for a couple of minutes or seconds, then the program continues.... this happens regularly. It is noit my broadband connection as I

  • How to see new disk in oracle linux 5

    Dear, i am using oracle VM and created 2 guest OS (both Olx5) i also created a shared disk and assigned to both linux servers. question: how can i see the disk in each server. using fdisk -l it just shown the one there before. in HPUX we have ioscan

  • Images and Pop-Ups Will Not Open in IE???

    I have several .html pages being displayed within an i-Frame. There are thumbnail images on .html pages that are being displayed within the i-frames, and these thumbnails are not displaying in IE, even though they do display in Firefox. The thumbails

  • I set my printing size on PS Elements 10 for a certain size, but it prints 1/4 inch larger?

    I set my printing size on PS Elements 10 for a certain size, but it prints 1/4 inch larger?