Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Oracle has partitioning and clustering features. Partitioning enables to split table or indexes into multiple tablespaces and store on various servers. So it's done manually. Clustering enables several servers to make operate as one. This IMHO is handled transparently. However, it's possible to have several tables (in different server databases) and group them as one, and use it. From the perspective on table partitioning and table clustering, IMHO both ways implement shared everything because the data is split into the different locations.

The theory about shared nothing architecture is that each database node is independent. But how this looks in practice? Both ways (partitioning and clustering) splits data into different sources and could be also described as horizontal partitioning. However, if we had for example, two different database servers we would need to synchronize the data between them... Anyway, any thoughts on that would be appreciated :)

share|improve this question
1  
What product are you talking about exactly? Oracle RDBMS, as far as I know, is shared-everything only. You can't partition a table across multiple "servers" or store on "various servers" - the database is shared among all active instances of a cluster. (Not taking database links into account for this.) MySQL is a completely different beast in this regard. –  Mat Dec 4 '12 at 13:06
    
I'm not talking about exact product, just have some understanding gaps about these two types of architectures, about sharding, and how exactly works partitioning and clustering using different servers and data storages. –  Centurion Dec 4 '12 at 13:24
1  
Thing is there's a lot of diversity between how all these things are technically implemented (when they exist) by different vendors - they pretty much all have slightly different interpretations of each term, to fit their use-cases best. Partitioning and clustering are completely orthogonal (in the Oracle sense). Partitioning, "sharding" and clustering are intimately linked in MySQL Cluster, as far as I understand it. So your question is pretty hard to answer in general - there are books and articles for the theory I guess. –  Mat Dec 4 '12 at 15:35
    
@Mat I'm mostly interested in Oracle, and from your 1st comment, I understood everything is shared. AFAIK, the most frequent Oracle horizontal scaling solutions are 1) to set Oracle instances on different servers and create a cluster from those servers 2) use table and index partitioning by using a large disk array rack where each table/index partition is stored in different tablespace. Partitioning is frequently used in single server db solutions, however it has limits. Otherwise we can use clusters but it costs additional dime :) What is your opinion on Oracle horizontal scaling? –  Centurion Dec 5 '12 at 7:17
add comment

1 Answer 1

Shared nothing typically refers to hardware, though it could also be used when describing an SOA architecture.

From a hardware perspective, a "shared nothing" Oracle database simply means a machine using local disks, memory, etc.

Oracle RAC (real application clusters) is a shared disk architecture, but not shared memory. Horizontal scaling is then achieved by adding more machines to the cluster.

When talking in SOA terms, "shared nothing" means that each service has a corresponding database which is only accessed by that service. So the ACCOUNTS service accesses the ACCOUNTS_DB, ORDERS service the ORDERS_DB and so on. These databases could be shared nothing from a hardware perspective as well, or use RAC.

Ensuring consistency of data and references which would normally be handled using foreign keys becomes a challenge in SOA shared nothing databases.

Sharding typically refers to partitioning managed at the application level, rather than within the database. For example, you could partition accounts by email address and direct customers with address starting A-C to ACCOUNTS_DB01, D-F ACCOUNT_DB02 and so on. The shard mapping could be a simple range like this, a function on the input or a lookup database stating which database is stored in. The databases would be "hardware shared nothing" in this case as the idea is you use relatively cheap machines which are easily added and replaced.

You could shard your databases at the application level and still have Oracle partitioning at the table level within the database itself. So you could shard your ORDERS database by customer, then partition the orders table by order date as well inside the database.

The downside to both meanings of shared nothing comes if you frequently run queries that have to access several databases. In these cases your joins will be pushed into the application layer rather than the DB layer so are likely to be slower. Good governance is necessary to ensure this doesn't happen.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.