Presentation is loading. Please wait.

Presentation is loading. Please wait.

Types of Databases Flat databases Hierarchical databases

Similar presentations


Presentation on theme: "Types of Databases Flat databases Hierarchical databases"— Presentation transcript:

1 Types of Databases Flat databases Hierarchical databases
Relational databases Object-oriented databases It follows the order of evolution of the databases. Relational is the most mature one. Object-oriented is state of art but it is in research phase.

2 Flat Databases Minimal structure One large table
first row is the list of the variables subsequent rows are data Ideal for small amounts of data The flat-file style of databases are ideal for small amounts of data that needs to be human readable or edited by hand.

3 Flat Databases Student ID Name Midterm grade Final grade Address
Zip code ... 4561 Ali Safaie B A 1311 Manor Park 22101 7878 Mike Smith C 1619 Ozkan Street 44115 8954 Mike Smith Jr. 2121 Euclid 563

4 Advantages Easy to understand. Easy to implement.
Less hardware and software requirements. Less skill sets are required to handle flat database systems. Best for small databases.

5 Problems How do we keep two addresses for the same student?
What if there are five addresses? Student ID Name Midterm grade Final grade Address Zip code ... 4561 Ali Safaie B A 1311 Manor Park 22101 7878 Mike Smith C 1619 Ozkan Street 44115 8954 Mike Smith Jr. 2121 Euclid 563 Address1, Address 2 Address1 … Address5

6 Disadvantages Waste computer storage
It requires to keep information on items that logically cannot be available. For example, flat files require us to enter a missing information for zip codes in foreign countries.  It is almost impossible to design flat databases for things with varying numbers of properties For example, if 90% people have 1 address, only 10% people have 15 address. In this case, 90% value of the addresses are empty.

7 Disadvantages Searching process is time consuming.
For example, it would be difficult to find all students that live in a certain zip code and have received grade of C. Such a query will require repeated pass through the data.  Slow for huge databases First pass may identify all students who live in a zip code Second pass may identify all students who have grade of C Third pass may find students in both groups.  Such multiple passes through data are inefficient and take long time periods.  Student ID Name Midterm grade Final grade Address Zip code ... 4561 Ali Safaie B A 1311 Manor Park 22101 7878 Mike Smith C 1619 Ozkan Street 44115 8954 Mike Smith Jr. 2121 Euclid 563

8 Hierarchical Databases
Data in the database are organized in ‘parent-child’ relationships. Each parent can have many children, but each child has only one parent (also known as a 1-to-many relationship). Tree Similar to the structure of a file system It was largely adopted during 1970 to Widely used in healthcare and banking system. In the real world, entities are organized in a hierarchical way. For example, students in the HI program are a subset of the HAP students. HAP students are a subset of CHHS students. CHHS students are a subset of GMU students. GMU students are a subset of Northern Virginia residents. Another example, biological organisms and plants are organized in a tree structure. So the DBMS designers borrowed this idea to design the structure of the database data.

9 Example of Hierarchal Databases
Person Patient Employee Contractor ICU Admin Clinical Clinic

10 Examples Most of the older DBMS such as Dbase, FoxPro etc. are hierarchical which are rarely used nowadays. It is still used in the healthcare field. But it is still used in the healthcare field such as VA MUMPS.

11 Advantages Operations on parents save time and affect all children
Fast access Hierarchical structure is used to foster the searching. For example, if you want to search Fairfax city, you don’t need to search Europe. You can start to search United States. From there you know you can find it under the Virginia not the California or other states.

12 Disadvantages Each child in the tree may have only one parent, and relationships between children are not permitted. Hierarchical databases are so rigid in their design that adding a new field or record requires that the entire database be redefined.

13 Relational Databases The relational database is the most commonly used today. Dr. E. F. Codd of IBM first invented the relational database in 1970. “A Relational Model of Data for Large Shared Data Banks”, Communications of the ACM, Volume 13 Issue 6, Pages , June 1970  Oracle delivered the first relational DBMS.

14 Relational Databases A relational database is essentially a collection of tables. Formally, these tables are called relations, and this is where a relational database gets its name. A relation is a two-dimensional table. The relationship between tables is relational, not hierarchical.

15 Example Student Table Student ID Name Address Zip 8954 Ali Ghadiri
2121 Euclid 563 22101 4561 Mike Smith 1311 Manor Park 7878 Mike Smith Jr. 1619 Ozkan Street 44115 Grade Table Use the id to merge data from two tables together. Student ID Mid-term Final 8954 B A 4561 C 7878

16 Relational Databases Tables do not need to be of the same size.
A number of relational DBMSs are available. Oracle, Sybase, Ingress, Informix, Microsoft SQL Server, and Microsoft Access.

17 Advantages of Relational Databases
Data can be examined from many different perspectives.  No need to enter missing information for variables that are not logically possible. Easy to modify because adding new concepts involves adding new Tables, not altering old ones.

18 Disadvantages of Relational Databases
It is not easy for the end user to run queries with because it may require a complex combination of many tables.

19 Object-oriented Databases
Data are organized in the form of “objects” that represent real world entities. Each objects have its properties, that can be regular values or other objects. Each object consists of two elements: 1) a piece of data (e.g., sound, video, text, or graphics) 2) the instructions, or software programs called methods, for what to do with the data.

20 Example Relationship between entities is via message not joint fields.

21 Object-oriented Databases
It is able to handle many new data types such as graphics, pictures, voice and text This structure is popular for multimedia Web-based applications. It was designed to work with object-oriented programming languages such as Java.

22 Advantages of Object-oriented Databases
High efficiency Use of the actual “real life” entities as objects Integration with object-oriented programming languages (C++, Java, C# …) The ability to mix and match reusable objects provides incredible multimedia capability.

23 Advantages of Object-oriented Databases
Healthcare organizations, for example, can store, track, and recall CAT scans, X-rays, electrocardiograms and many other forms of crucial data. Disadvantages Lack of one good standard

24 Distributed Databases
A distributed database is a database in which storage devices are not all attached to a common CPU. It may be stored in multiple computers located in the same physical location, or may be dispersed over a network of interconnected computers.

25 Advantages of Distributed Databases
Capacity and incremental growth Systems can be modified, added and removed from the distributed database without affecting other systems. Increase reliability and availability Even when a portion of a system (i.e. A local site) is down, the overall system remains available. With replicated data, the failure of one site still allows access to the replicated copy of the data from another site. The remaining sites continue to function.

26 Advantages of Distributed Databases
Sharing Users at a given site are able to access data stored at other sites and at the same time retain control over the data at their own site. Local autonomy or site autonomy A department can control the data about them (as they are the ones familiar with it.)

27 Disadvantages of Distributed Databases
Security of these databases are difficult to maintain. Many agreements must be made ahead of time. Complexity Extra work must also be done to maintain multiple disparate systems Extra database design work must be done to account for the disconnected nature of the database

28 Disadvantages of Distributed Databases
Additional software is required. Operating System should support distributed environment. Concurrency control: it is a major issue. It is solved by locking and time stamping.

29 Federated Databases It transparently integrates multiple autonomous database systems into a single federated database. allow user to access different type of databases Appears to user as a single database providing a global schema integrating disparate databases It is a hard task to transfer data from one type of database to another. In order to allow user to access different type of databases, we use the federated approach. It provides users a unified interface. Users do not want to know data come from which type of databases (e.g., flat, hierarchical, relational or object-oriented). In this approach, users can query data using one form. They do not need to query one database using one query language and query anther on

30 Advantages and Disadvantages of Federated Databases
Transparent to users Security and privacy maintained at local level No good standards, several commercial products available Hard to implement, problems with efficiency, requires specific mappings, etc.


Download ppt "Types of Databases Flat databases Hierarchical databases"

Similar presentations


Ads by Google