1 / 24

Types of database

Types of database. 3.3.4. The aim of this presentation. You will be able to: Explain how databases may be stored in more than one physical location and how distribution may be carried out using different approaches: Partitioned (Horizontal and Vertical) Duplicated databases

azize
Download Presentation

Types of database

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Types of database 3.3.4

  2. The aim of this presentation • You will be able to: • Explain how databases may be stored in more than one physical location and how distribution may be carried out using different approaches: • Partitioned(Horizontal and Vertical) • Duplicated databases • Central databases with remote local indexes

  3. Introduction • As previously mentioned, databases are the backbone of most, if not all, companies. • The wealth of information stored on a database system can sometimes be overwhelming and sometimes irrelevant to some people. • Databases can be setup in different ways and different solutions are appropriate in different situations.

  4. What are you used to? • You are probably used to working with one database. • This database will store all the tables and all of the data. • However, there are methods which allow us to split databases into different parts and to store those parts in different physical locations. • However, a good database system will not make the user aware of this.

  5. Partitioned databases • In a partitioned database, the database is split into different parts. • Each part is stored in a different physical ‘site’. • Each site can be on a different part of a server or on separate computers. • There are two types of partitioning: • Horizontal • Veritcal

  6. Horizontal Partitioning • Data is partitioned based on records. • For example, an estate agency has many outlets across the country. • Instead of having one central database, the estate agency have split their database based on the agency and the location of the houses.

  7. Horizontal Partitioning Imagine all the records for all the houses that are for sale or rent are stored in one database. Filtering houses would take longer because of the larger number of records. Also, returning results would be longer because the request has further distance to travel. Instead of saving all these records in one database you could split the records into their own database based on their locations. UK houses and flats.

  8. Horizontal Partitioning Each branch now has its own database. If someone wanted to buy a house in their area, they would walk into their branch and the estate agent could search their database quickly. Leicester Coventry Birmingham

  9. Horizontal Partitioning If someone wanted to move area, the estate agent would need to request data from another branch’s database. Leicester Coventry Birmingham

  10. Vertical Partitioning • This type of partition splits data across sites based on the fields. • For example, a small chain of shops which specialises in rare, one off, products may have different departments which are in different locations. • Each shop stocks different items as most of their products are one off or bespoke. • These departments include the head office, purchasing and the actual shop.

  11. Vertical Partitioning The head office stores information about what products are stocked in different shops. They are uninterested in the prices or who the supplier is. Head Office Purchasing Shop

  12. Vertical Partitioning The purchasing department is interested in making orders to suppliers when they receive an order request from a shop. Head Office Purchasing Shop

  13. Vertical Partitioning • The vendor is interested in stocking particular items and knowing: • How much stock they have • How much to sell the stock for Head Office Purchasing Shop

  14. Vertical Partitioning All databases use this field Head Office Purchasing Shop

  15. Replicated databases • Thinking back to our estate agency example with horizontal partitions… • Each branch had only part of all the possible records. • With replicated databases, each branch would have a complete copy of the entire database.

  16. Replicated databases This is the full version of the database. UK houses and flats.

  17. Replicated databases Horizontal Partition means each branch has only some of the database. UK houses and flats. Leicester Coventry Birmingham

  18. Replicated databases Replicated databases means all branches have a full copy of the original database. UK houses and flats. Leicester Coventry Birmingham

  19. Central database with remote local indexes • This database is stored in one place and one place only. • For example, a bank stores all the records of its customers in one database. • The problem is each branch has to search the database every time it wants to find a customer’s records.

  20. Central database with remote local indexes • However, to speed things up, each branch keeps a database which stores the customers account number and an index number. • Now, when a branch requests data from the head office server, it can tell the server exactly where the record can be found.

  21. Central database with remote local indexes • Think of it like a library system. • All the books are in one big room. • To find the book you were looking for you would have to search all the titles on the shelf until you found the book you wanted. • However, if you knew the index number of the book you could go straight to that section of the shelf and pick it up.

  22. Central database with remote local indexes Head Office Leicester Branch

  23. Example Questions • Describe how data can be distributed using horizontal partitioning. • Describe the difference between horizontal and vertical partitioning. • How could local indexes be used with a centralised database?

  24. What’s next? • Well now you know about different ways of distributing a database… • But you still need to know when it is appropriate to use those types of database. • Read through pages 147-150 and answer the questions at the end. • Those pages are packed full of advantages and disadvantages of using different types of database.

More Related