2 MODULE CC3005NI: Advanced Database Systems “DATABASE ARCHITECTURE” Academic Year 2014 Spring
3 Topics: Historical Developments Navigational Data Models Non-navigational Data ModelData IndependenceDatabase Languages
4 Historical Developments: Navigational Data Models:Hierarchical ModelNetwork ModelNon-navigational Data Model:Relational Model
5 Hierarchical Model: Developed in the 1960s To manage large amounts of data for complex manufacturing projects such as Apollo rocket that landed on moon (1969)Its basic logical structure is represented by an upside-down tree.The hierarchical structure contains levels, or segments. A segment is equivalent of a file system’s record type.
6 Hierarchical Model:Within the hierarchy, a higher layer is perceived as the parent of the segment directly beneath it, which is called the child.The hierarchical model depicts a set of one-to-many (1:M) relationships between a parent and its children segments.Each parent can have many children, but each child has only one parent.
7 Hierarchical Model:Depends on every entity being subject to a higher one.A simple example is genealogy (each parent can be identified from the child and vice versa).Another example of a representation of hierarchy of data is a customer invoice system
10 Hierarchical views can differ between user group Hierarchical Model:Hierarchical views can differ between user group
11 Hierarchical Model- DRAWBACKS: Data is stored in hierarchies physically.Difficult to change structure once a particular hierarchy has been designed / formulated, making it less flexible to meet dynamic needs.(e.g. in the customer invoice example: it's not possible to allow a single payment to be made for several invoices)Unplanned (ad-hoc) queries are difficult to support;- it may require major restructuring of the hierarchy
12 Network Model:Network Model was created to represent complex data relationships more effectively than Hierarchical Model, to improve database performance, and to impose a database standard.User perceives the network database as a collection of records in 1:M relationships.Unlike the Hierarchical Model, Network Model allows a record to have more than one parent.
13 Network Model:The Network Model represents a more complex structure, allowing non-hierarchical structuresWithin a model any record may have many immediate parents as well as many dependents, reflecting more real-world scenarios.
14 A network of data:- customer invoice/payment example; Network Model:A network of data:- customer invoice/payment example;
17 Network Model- DRAWBACKS: Data is stored in linked sets physically.Pointer technology is used to implement relationships (with overhead, performance issues).Unplanned queries still difficult to supportProgrammer must be aware of 'sets' (relationships between record types) and the structural changes.Users have to 'navigate' through database (not a most user-friendly way to interact with the database).
18 Relational Model:Relational Model was introduced in 1970 by E. F. Codd (of IBM) in his landmark paper “A Relational Model of Data for Large Shared Databanks”Data model that represents data in form of tables or relation.
19 Relational Model:Relational database model consists of following three components:Data structure: Data are organized in form of tables or relations.Data manipulation: Powerful operations such as SQL languages or Query-by-example, are used to manipulate data stored in database.Data integrity: Business rules are specified to maintain integrity of data when they are manipulated.
20 Relational Model: Physical Properties A relation consists of 1 or more columns and 0 or more rows.A row is called a tuple.Each relation is given a unique name.Each column has a name unique within the relation.Each row contains an instance of the data associated with the relation.A relation with no rows is empty (contains no data), but still exists.
21 Relational Model: Logical Properties Columns are unordered, left to right. This property is designed to preserve the independence of each column.Rows are unordered, top to bottom. This is designed to preserve the independence of each row.No row may be duplicated in a given relation. Uniqueness in a relation is guaranteed by the designation of a Primary Key for each relation.
22 Relational Model:A Candidate Key is an attribute that uniquely identifies a row in that relation.A Primary Key is a candidate key that has been selected to be unique identifier for each row.Primary key values cannot be null, since they would then not identify a row.Columns can be interchanged without changing the meaning or use of relation.It makes no difference as whether to insert a new row in front or at end of table.
24 ANSI/ SPARC Database Model: ANSI – The American National Standards InstituteSPARC – Standards Planning and Requirements CommitteeThe ANSI/SPARC model is used as a general framework (benchmark) on which various architectural issues of databases can be discussed on a level-playing field.However, this is not the only model, and not every database system matches its 'structure'.
25 ANSI/ SPARC Model – 3 Levels: Consisting of 3 levels, with 3 schemas:External Level:A collection of individual users' views of the database (database is seen by users) - External SchemaConceptual Level:'global' definition/description of database in its entirety ('union‘ of all users views) at the logical level. It deals with information structure/content - Conceptual Schema
26 ANSI/ SPARC Model – 3 Levels: Internal Level:'global' definition/description of the database at the physical level.It deals with information format/physical storage - Internal Schema
28 ANSI/ SPARC Model – 2 Mappings: Mapping is a process of transforming requests and results between the levels in the ANSI/SPARC model.There are 2 mappings:external/conceptual mappingconceptual/internal mappingSchemas and mappings are built and maintained by DBA.
30 Data Independence:The ability to allow users to take a logical view of the database which is independent of the way that the data is actually stored.The ANSI/SPARC model based on the 3 schema architecture can be used to explain the concept of Data Independence (DI). Mappings are essential to DI.Data Independence can be defined as the capacity to change the schema at one level of a database system without having to change schema at next higher level.
31 Data Independence:This allows users to take a logical view of the database which is independent of the way that the data is actually stored.There are two types of Data IndependenceLogical Data IndependencePhysical Data Independence
32 Data Independence:Different applications will need different views of same datae.g. CUSTOMER BALANCE
36 Three Tier Approach - ADVANTAGES: ‘thin’ client (compared to the 2-tier architecture), with less expensive hardwarereduction in client-side administrationcentralised application maintenanceenhanced modularity and tier independence;- easier to modify/replace one tier without affecting others
37 Three Tier Approach - ADVANTAGES: improved load balancing of business logic, by separating core business logic from database functions.An added advantage is that the 3-tier architecture maps quite naturally to the Web-enable database environment.
39 Database Languages:Data Definition Language (DDL) facilitates the creation and description of databaseData Manipulation Language (DML) facilitates the manipulation and processing of dataHost Language (e.g. C, Cobol, Java)Query LanguageSQL includes both DDL and DML
40 Thank you!!! Questions are WELCOME Academic Year 2014 Spring