Download presentation
Presentation is loading. Please wait.
1
Unit 33: Data Analysis and Design
Pearson BTEC Level 5 HND Diploma in Computing and Systems Development (QCF) Unit 33: Data Analysis and Design Unit code: D/601/1991 QCF Level 5: BTEC Higher National Credit Value 15 Micronet International College | Data Analysis and Design
2
Micronet International College | Network Security
Aim To provide learners with the knowledge and skills needed to understand, design, query and implement database systems. Micronet International College | Network Security
3
Micronet International College | Network Security
Learning Outcomes On successful completion of this unit a learner will: Understand data models and database technologies Be able to design and implement relational database systems Be able to use manipulation and querying tools Be able to test and document relational database systems. Micronet International College | Network Security
4
L01: Understand data models and database technologies
Assessment Criteria: 1.1 Critically compare different data models and schemas 1.2 Critically discuss the benefits and limitations of different database technologies 1.3 Analyze different approaches to database design Micronet International College | Network Security
5
L01: Understand data models and database technologies
Micronet International College | Network Security
6
Micronet International College | Network Security
Data Models Micronet International College | Network Security
7
Micronet International College | Network Security
Data Model A Data Model is an abstract model that organizes elements of data and standardizes how they relate to one another and to properties of the real world. For instance, a data model may specify that a data element representing a car comprise a number of other elements which in turn represent the color, size and owner of the car. Micronet International College | Network Security
8
Micronet International College | Network Security
Data Model Data modeling in software engineering is the process of creating a data model for an information system by applying formal data modeling techniques. Micronet International College | Network Security
9
Micronet International College | Network Security
Data Model Data Models are fundamental entities to introduce abstraction in a DBMS. Data models define how data is connected to each other and how they are processed and stored inside the system. The very first data model could be flat data-models, where all the data used are to be kept in the same plane. Micronet International College | Network Security
10
Micronet International College | Network Security
Data Model Approaches Conceptual Data Modeling Enterprise Data Modeling Logical Data Modeling Physical Data Modeling Micronet International College | Network Security
11
Micronet International College | Network Security
Data Model Approaches Conceptual Data Modeling Identifies the highest-level relationships between different entities. Micronet International College | Network Security
12
Micronet International College | Network Security
Data Model Approaches Enterprise Data Modeling Similar to conceptual data modeling, but addresses the unique requirements of a specific business. Micronet International College | Network Security
13
Micronet International College | Network Security
Data Model Approaches Logical Data Modeling Illustrates the specific entities, attributes and relationships involved in a business function. Serves as the basis for the creation of the physical data model. Micronet International College | Network Security
14
Micronet International College | Network Security
Data Model Approaches Physical Data Modeling Represents an application and database-specific implementation of a logical data model. Micronet International College | Network Security
15
Hierarchical Data Model
A hierarchical database model is a data model in which the data is organized into a tree-like structure. The data is stored as records which are connected to one another through links. Micronet International College | Network Security
16
Hierarchical Data Model
A record is a collection of fields, with each field containing only one value. The entity type of a record defines which fields the record contains. Micronet International College | Network Security
17
Micronet International College | Network Security
Network Data Model The network model is a database model conceived as a flexible way of representing objects and their relationships. Its distinguishing feature is that the schema, viewed as a graph in which object types are nodes and relationship types are arcs, is not restricted to being a hierarchy or lattice. Micronet International College | Network Security
18
Micronet International College | Network Security
Network Data Model Micronet International College | Network Security
19
Micronet International College | Network Security
Relational Data Model Relational data model is the primary data model, which is used widely around the world for data storage and processing. This model is simple and it has all the properties and capabilities required to process data with storage efficiency. Micronet International College | Network Security
20
Data Manipulation Languages
The Data Manipulation Language (DML) is used to retrieve, insert and modify database information. These commands will be used by all database users during the routine operation of the database. Micronet International College | Network Security
21
Micronet International College | Network Security
Basic DML Commands Insert Select Update Delete Micronet International College | Network Security
22
Micronet International College | Network Security
Basic DML Commands INSERT The INSERT command in SQL is used to add records to an existing table. Micronet International College | Network Security
23
Micronet International College | Network Security
Basic DML Commands SELECT The SELECT command is the most commonly used command in SQL. It allows database users to retrieve the specific information they desire from an operational database. Micronet International College | Network Security
24
Micronet International College | Network Security
Basic DML Commands UPDATE The UPDATE command can be used to modify information contained within a table, either in bulk or individually. Micronet International College | Network Security
25
Micronet International College | Network Security
Basic DML Commands DELETE Finally, let's take a look at the DELETE command. You'll find that the syntax of this command is similar to that of the other DML commands. Micronet International College | Network Security
26
Micronet International College | Network Security
Data Independence Data independence is the type of data transparency that matters for a centralized DBMS. It refers to the immunity of user applications to changes made in the definition and organization of data. Micronet International College | Network Security
27
Micronet International College | Network Security
Data Independence Data independence can be explained as follows: Each higher level of the data architecture is immune to changes of the next lower level of the architecture. Micronet International College | Network Security
28
Micronet International College | Network Security
Data Independence The logical scheme stays unchanged even though the storage space or type of some data is changed for reasons of optimization or reorganization. In this external schema does not change. In this internal schema changes may be required due to some physical schema were reorganized here. Micronet International College | Network Security
29
Micronet International College | Network Security
Data Independence Physical data independence is present in most databases and file environment in which hardware storage of encoding, exact location of data on disk, merging of records, so on this are hidden from user. Micronet International College | Network Security
30
Micronet International College | Network Security
Data Independence One of the biggest advantage of databases is data independence. It means we can change the conceptual schema at one level without affecting the data at another level. It also means we can change the structure of a database without affecting the data required by users and programs. This feature was not available in the file oriented approach. Micronet International College | Network Security
31
Micronet International College | Network Security
Data Independence Micronet International College | Network Security
32
Logical Data Independence
Logical data is data about database, that is, it stores information about how data is managed inside. For example, a table (relation) stored in the database and all its constraints, applied on that relation. Micronet International College | Network Security
33
Logical Data Independence
Logical data independence is a kind of mechanism, which liberalizes itself from actual data stored on the disk. If we do some changes on table format, it should not change the data residing on the disk. Micronet International College | Network Security
34
Physical Data Independence
All the schemas are logical, and the actual data is stored in bit format on the disk. Physical data independence is the power to change the physical data without impacting the schema or logical data. Micronet International College | Network Security
35
Data Redundancy Issues
Data redundancy is a condition created within a database or data storage technology in which the same piece of data is held in two separate places. Micronet International College | Network Security
36
Data Redundancy Issues
This can mean two different fields within a single database, or two different spots in multiple software environments or platforms. Whenever data is repeated, this basically constitutes data redundancy. This can occur by accident, but is also done deliberately for backup and recovery purposes. Micronet International College | Network Security
37
Data Redundancy Issues
Data Integrity Issues Data Integrity Entity Integrity Referential Integrity Micronet International College | Network Security
38
Data Redundancy Issues
Data Integrity Data integrity refers to the overall completeness, accuracy and consistency of data. This can be indicated by the absence of alteration between two instances or between two updates of a data record, meaning data is intact and unchanged. Data integrity is usually imposed during the database design phase through the use of standard procedures and rules. Data integrity can be maintained through the use of various error checking methods and validation procedures. Micronet International College | Network Security
39
Data Redundancy Issues
Entity Integrity This is concerned with the concept of primary keys. The rule states that every table must have its own primary key and that each has to be unique and not null. Micronet International College | Network Security
40
Data Redundancy Issues
Referential Integrity This is the concept of foreign keys. The rule states that the foreign key value can be in two states. The first state is that the foreign key value would refer to a primary key value of another table, or it can be null. Being null could simply mean that there are no relationships, or that the relationship is unknown. Micronet International College | Network Security
41
Data Redundancy Issues
Domain Integrity This states that all columns in a relational database are in a defined domain. Micronet International College | Network Security
42
Micronet International College | Network Security
Database Schema A database schema is the skeleton structure that represents the logical view of the entire database. It defines how the data is organized and how the relations among them are associated. It formulates all the constraints that are to be applied on the data. Micronet International College | Network Security
43
Micronet International College | Network Security
Database Schema A database schema defines its entities and the relationship among them. It contains a descriptive detail of the database, which can be depicted by means of schema diagrams. It’s the database designers who design the schema to help programmers understand the database and make it useful. Micronet International College | Network Security
44
Micronet International College | Network Security
Database Schema A database schema defines its entities and the relationship among them. It contains a descriptive detail of the database, which can be depicted by means of schema diagrams. It’s the database designers who design the schema to help programmers understand the database and make it useful. Micronet International College | Network Security
45
Micronet International College | Network Security
Database Schema Micronet International College | Network Security
46
Micronet International College | Network Security
Database Schema A database schema can be divided broadly into two categories: Physical Database Schema Logical Database Schema Micronet International College | Network Security
47
Micronet International College | Network Security
Database Schema Physical Database Schema This schema pertains to the actual storage of data and its form of storage like files, indices, etc. It defines how the data will be stored in a secondary storage. Micronet International College | Network Security
48
Micronet International College | Network Security
Database Schema Logical Database Schema This schema defines all the logical constraints that need to be applied on the data stored. It defines tables, views, and integrity constraints. Micronet International College | Network Security
49
Micronet International College | Network Security
Relational Data Model Relational data model is the primary data model, which is used widely around the world for data storage and processing. This model is simple and it has all the properties and capabilities required to process data with storage efficiency. Micronet International College | Network Security
50
Micronet International College | Network Security
Relational Data Model Concepts: Tables Tuples Relation Instance Relation Schema Relation Key Attribute Domain Micronet International College | Network Security
51
Micronet International College | Network Security
Relational Data Model Tables In relational data model, relations are saved in the format of Tables. This format stores the relation among entities. A table has rows and columns, where rows represents records and columns represent the attributes. Micronet International College | Network Security
52
Micronet International College | Network Security
Relational Data Model Tuples A single row of a table, which contains a single record for that relation is called a tuple. Micronet International College | Network Security
53
Micronet International College | Network Security
Relational Data Model Relation Instance A finite set of tuples in the relational database system represents relation instance. Relation instances do not have duplicate tuples. Micronet International College | Network Security
54
Micronet International College | Network Security
Relational Data Model Relation Schema A relation schema describes the relation name (table name), attributes, and their names. Micronet International College | Network Security
55
Micronet International College | Network Security
Relational Data Model Relation Key Each row has one or more attributes, known as relation key, which can identify the row in the relation (table) uniquely. Micronet International College | Network Security
56
Micronet International College | Network Security
Relational Data Model Attribute Domain Every attribute has some pre-defined value scope, known as attribute domain. Micronet International College | Network Security
57
Micronet International College | Network Security
Relational Data Model Constraints Every relation has some conditions that must hold for it to be a valid relation. These conditions are called Relational Integrity Constraints. Micronet International College | Network Security
58
Micronet International College | Network Security
Relational Data Model There are three main integrity constraints Key constraints Domain constraints Referential integrity constraints Micronet International College | Network Security
59
Micronet International College | Network Security
Relational Data Model Key constraints There must be at least one minimal subset of attributes in the relation, which can identify a tuple uniquely. This minimal subset of attributes is called key for that relation. Micronet International College | Network Security
60
Micronet International College | Network Security
Relational Data Model If there are more than one such minimal subsets, these are called candidate keys. Key constraints force that: In a relation with a key attribute, no two tuples can have identical values for key attributes. A key attribute can not have NULL values. Key constraints are also referred to as Entity Constraints. Micronet International College | Network Security
61
Micronet International College | Network Security
Relational Data Model Domain Constraints Attributes have specific values in real-world scenario. For example, age can only be a positive integer. The same constraints have been tried to employ on the attributes of a relation. Every attribute is bound to have a specific range of values. For example, age cannot be less than zero and telephone numbers cannot contain a digit outside 0-9. Micronet International College | Network Security
62
Micronet International College | Network Security
Relational Data Model Referential integrity Constraints Referential integrity constraints work on the concept of Foreign Keys. A foreign key is a key attribute of a relation that can be referred in other relation. Micronet International College | Network Security
63
Micronet International College | Network Security
Relational Data Model Referential Integrity Constraint States that if a relation refers to a key attribute of a different or same relation, then that key element must exist. Micronet International College | Network Security
64
Table Fields Relationship
Relationship The association among entities is called a relationship. For example, an employee works_at a department, a student enrolls in a course. Here, Works_at and Enrolls are called relationships. Micronet International College | Network Security
65
Table Fields Relationship
Relationship Set A set of relationships of similar type is called a relationship set. Like entities, a relationship too can have attributes. These attributes are called descriptive attributes. Micronet International College | Network Security
66
Table Fields Relationship
Degree of Relationship The number of participating entities in a relationship defines the degree of the relationship. 1. Binary = degree 2 2. Ternary = degree 3 3. N-ary = degree Micronet International College | Network Security
67
Table Fields Relationship
Mapping Cardinalities Cardinality defines the number of entities in one entity set, which can be associated with the number of entities of other set via relationship set. Micronet International College | Network Security
68
Table Fields Relationship
Mapping Cardinalities One-to-One One-to-Many Many-to-One Many-to-Many Micronet International College | Network Security
69
Table Fields Relationship
One-to-One One entity from entity set A can be associated with at most one entity of entity set B and vice versa. Micronet International College | Network Security
70
Table Fields Relationship
One-to-Many One entity from entity set A can be associated with more than one entities of entity set B however an entity from entity set B, can be associated with at most one entity. Micronet International College | Network Security
71
Table Fields Relationship
Many-to-One More than one entities from entity set A can be associated with at most one entity of entity set B, however an entity from entity set B can be associated with more than one entity from entity set A. Micronet International College | Network Security
72
Table Fields Relationship
Many-to-Many One entity from A can be associated with more than one entity from B and vice versa. Micronet International College | Network Security
73
Micronet International College | Network Security
Data Dictionary Data dictionary is the centralized collection of information about data. It stores meaning and origin of data, its relationship with other data, data format for usage etc. Data dictionary has rigorous definitions of all names in order to facilitate user and software designers. Micronet International College | Network Security
74
Micronet International College | Network Security
Data Dictionary Data dictionary is often referenced as meta-data (data about data) repository. It is created along with DFD (Data Flow Diagram) model of software program and is expected to be updated whenever DFD is changed or updated. Micronet International College | Network Security
75
Micronet International College | Network Security
Data Dictionary Database management systems, a file that defines the basic organization of a database. A data dictionary contains a list of all files in the database, the number of records in each file, and the names and types of each field. Micronet International College | Network Security
76
Micronet International College | Network Security
Data Dictionary Micronet International College | Network Security
77
Micronet International College | Network Security
Data Dictionary Data dictionary should contain information about the following: Data Flow Data Structure Data Elements Data Stores Data Processing Micronet International College | Network Security
78
Micronet International College | Network Security
End of the lesson Micronet International College | Network Security
79
L01: Understand data models and database technologies
Approaches L01: Understand data models and database technologies Micronet International College | Network Security
80
Micronet International College | Network Security
Approaches Micronet International College | Network Security
81
Micronet International College | Network Security
Top Down and Bottom Up Top-down and bottom-up are both strategies of information processing and knowledge ordering, used in a variety of fields including software, humanistic and scientific theories and management and organization. In practice, they can be seen as a style of thinking, teaching, or leadership. Micronet International College | Network Security
82
Micronet International College | Network Security
Top Down and Bottom Up Top Down The top down approach spins off data marts for specific groups of users after the complete data warehouse has been created. Micronet International College | Network Security
83
Micronet International College | Network Security
Top Down and Bottom Up Bottom Up The bottom up approach builds the data marts first and then combines them into a single, all- encompassing data warehouse. Micronet International College | Network Security
84
Micronet International College | Network Security
Entity Analysis Entity Entities are represented by means of rectangles. Rectangles are named with the entity set they represent. Micronet International College | Network Security
85
Micronet International College | Network Security
Entity Analysis Attributes Attributes are the properties of entities. Attributes are represented by means of ellipses. Every ellipse represents one attribute and is directly connected to its entity (rectangle). Micronet International College | Network Security
86
Micronet International College | Network Security
Entity Analysis Attributes Micronet International College | Network Security
87
Micronet International College | Network Security
Entity Analysis If the attributes are composite, they are further divided in a tree like structure. Every node is then connected to its attribute. Micronet International College | Network Security
88
Micronet International College | Network Security
Entity Analysis That is, composite attributes are represented by ellipses that are connected with an ellipse. Micronet International College | Network Security
89
Micronet International College | Network Security
Entity Analysis Multivalued attributes are depicted by double ellipse. Micronet International College | Network Security
90
Micronet International College | Network Security
Entity Analysis Derived attributes are depicted by dashed ellipse. Micronet International College | Network Security
91
Micronet International College | Network Security
Entity Analysis Relationship Relationships are represented by diamond-shaped box. Name of the relationship is written inside the diamond-box. All the entities (rectangles) participating in a relationship, are connected to it by a line. Micronet International College | Network Security
92
Micronet International College | Network Security
Entity Analysis Binary Relationship and Cardinality A relationship where two entities are participating is called a binary relationship. Micronet International College | Network Security
93
Micronet International College | Network Security
Entity Analysis Binary Relationship and Cardinality Cardinality is the number of instance of an entity from a relation that can be associated with the relation. Micronet International College | Network Security
94
Micronet International College | Network Security
Entity Analysis Binary Relationship and Cardinality One-to-one One-to-many Many-to-one Many-to-many Micronet International College | Network Security
95
Micronet International College | Network Security
Entity Analysis Binary Relationship and Cardinality One-to-one When only one instance of an entity is associated with the relationship, it is marked as '1:1'. Micronet International College | Network Security
96
Micronet International College | Network Security
Entity Analysis The following image reflects that only one instance of each entity should be associated with the relationship. It depicts one-to-one relationship. Micronet International College | Network Security
97
Micronet International College | Network Security
Entity Analysis Binary Relationship and Cardinality One-to-many When more than one instance of an entity is associated with a relationship, it is marked as '1:N'. Micronet International College | Network Security
98
Micronet International College | Network Security
Entity Analysis The following image reflects that only one instance of entity on the left and more than one instance of an entity on the right can be associated with the relationship. It depicts one-to-many relationship. Micronet International College | Network Security
99
Micronet International College | Network Security
Entity Analysis Binary Relationship and Cardinality Many-to-one When more than one instance of entity is associated with the relationship, it is marked as 'N:1'. Micronet International College | Network Security
100
Micronet International College | Network Security
Entity Analysis The following image reflects that more than one instance of an entity on the left and only one instance of an entity on the right can be associated with the relationship. It depicts many-to-one relationship. Micronet International College | Network Security
101
Micronet International College | Network Security
Entity Analysis Binary Relationship and Cardinality Many-to-many The following image reflects that more than one instance of an entity on the left and more than one instance of an entity on the right can be associated with the relationship. It depicts many-to-many relationship. Micronet International College | Network Security
102
Micronet International College | Network Security
Entity Analysis Participation Constraints Total Participation Partial participation Micronet International College | Network Security
103
Micronet International College | Network Security
Entity Analysis Participation Constraints Total Participation Each entity is involved in the relationship. Total participation is represented by double lines. Micronet International College | Network Security
104
Micronet International College | Network Security
Entity Analysis Participation Constraints Partial participation Not all entities are involved in the relationship. Partial participation is represented by single lines. Micronet International College | Network Security
105
Micronet International College | Network Security
Entity Analysis Participation Constraints Micronet International College | Network Security
106
Entity-Relationship Diagram (ERDs)
ER Model, when conceptualized into diagrams, gives a good overview of entity-relationship, which is easier to understand. ER diagrams can be mapped to relational schema, that is, it is possible to create relational schema using ER diagram. We cannot import all the ER constraints into relational model, but an approximate schema can be generated. Micronet International College | Network Security
107
Entity-Relationship Diagram (ERDs)
ER diagrams mainly comprise of : Entity and its attributes Relationship, which is association among entities. Micronet International College | Network Security
108
Micronet International College | Network Security
Mapping Entity An entity is a real-world object with some attributes. Micronet International College | Network Security
109
Micronet International College | Network Security
Mapping Entity Mapping Process (Algorithm) Create table for each entity. Entity's attributes should become fields of tables with their respective data types. Declare primary key. Micronet International College | Network Security
110
Micronet International College | Network Security
Mapping Relationship A relationship is an association among entities. Micronet International College | Network Security
111
Micronet International College | Network Security
Mapping Relationship Mapping Process: Create table for a relationship. Add the primary keys of all participating Entities as fields of table with their respective data types. If relationship has any attribute, add each attribute as field of table. Declare a primary key composing all the primary keys of participating entities. Declare all foreign key constraints. Micronet International College | Network Security
112
Mapping Weak Entity Sets
A weak entity set is one which does not have any primary key associated with it. Micronet International College | Network Security
113
Mapping Weak Entity Sets
Mapping Process Create table for weak entity set. Add all its attributes to table as field. Add the primary key of identifying entity set. Declare all foreign key constraints. Micronet International College | Network Security
114
Mapping Hierarchical Entities
ER specialization or generalization comes in the form of hierarchical entity sets. Micronet International College | Network Security
115
Mapping Hierarchical Entities
Mapping Process Create tables for all higher-level entities. Create tables for lower-level entities. Add primary keys of higher-level entities in the table of lower-level entities. In lower-level tables, add all other attributes of lower-level entities. Declare primary key of higher-level table and the primary key for lower-level table. Declare foreign key constraints. Micronet International College | Network Security
116
Micronet International College | Network Security
Determinacy Diagrams A determinacy diagram, sometimes known as a dependency diagram, is a diagram which documents the determinacy or dependency between a set of data items. Determinacy diagrams are particularly used as an aid to database normalization. Micronet International College | Network Security
117
Micronet International College | Network Security
Determinacy Diagrams A set of Functional Dependencies for a data model can be documented in a Functional Dependency Diagram In a Functional Dependency Diagram each attribute is shown in a rectangle with an arrow indicating the direction of the dependency. Micronet International College | Network Security
118
Micronet International College | Network Security
Determinacy Diagrams The figure below illustrates the functional dependency Prod# > Product. Micronet International College | Network Security
119
Micronet International College | Network Security
Determinacy Diagrams A Functional Dependency with Multiple Attributes is shown below, for the functional dependency Order#, Prod# > Quantity. Micronet International College | Network Security
120
Micronet International College | Network Security
Determinacy Diagrams A derived Functional Dependency involving Partial Key Dependency is shown in the figure below. The arrow connected to the outer rectangle, which represents Order#, Prod# > Product can be deleted without loss of information. Micronet International College | Network Security
121
Micronet International College | Network Security
Determinacy Diagrams A derived Functional Dependency involving Transitive Dependency is shown in the figure below. The arrow which represents Order# > Supplier can be deleted without loss of information. Micronet International College | Network Security
122
Micronet International College | Network Security
Determinacy Diagrams Rules for Functional Dependency Diagrams Each attribute appears only once on the Functional Dependency Diagram All the attributes of interest appear on the Functional Dependency Diagram No partial key dependencies appear on the Functional Dependency Diagram No transitive dependencies appear on the Functional Dependency Diagram Micronet International College | Network Security
123
Micronet International College | Network Security
Determinacy Diagrams The complete Functional Dependency Diagram for the Purchase Order data model is shown below: Micronet International College | Network Security
124
Micronet International College | Network Security
Data Flow Diagrams Data flow diagram is graphical representation of flow of data in an information system. It is capable of depicting incoming data flow, outgoing data flow and stored data. The DFD does not mention anything about how data flows through the system. Micronet International College | Network Security
125
Micronet International College | Network Security
Data Flow Diagrams There is a prominent difference between DFD and Flowchart. The flowchart depicts flow of control in program modules. DFDs depict flow of data in the system at various levels. DFD does not contain any control or branch elements. Micronet International College | Network Security
126
Micronet International College | Network Security
Data Flow Diagrams Types of Data Flow Diagram Logical DFD Physical DFD Micronet International College | Network Security
127
Micronet International College | Network Security
Data Flow Diagrams Logical DFD This type of DFD concentrates on the system process, and flow of data in the system. For example in a Banking software system, how data is moved between different entities. Micronet International College | Network Security
128
Micronet International College | Network Security
Data Flow Diagrams Physical DFD This type of DFD shows how the data flow is actually implemented in the system. It is more specific and close to the implementation. Micronet International College | Network Security
129
Micronet International College | Network Security
Data Flow Diagrams DFD Components DFD can represent Source, destination, storage and flow of data using the following set of components: Micronet International College | Network Security
130
Micronet International College | Network Security
Data Flow Diagrams DFD Components: Entities Process Data Storage Data Flow Micronet International College | Network Security
131
Micronet International College | Network Security
Data Flow Diagrams DFD Components: Entities Entities are source and destination of information data. Entities are represented by a rectangles with their respective names. Micronet International College | Network Security
132
Micronet International College | Network Security
Data Flow Diagrams DFD Components: Process Activities and action taken on the data are represented by Circle or Round-edged rectangles. Micronet International College | Network Security
133
Micronet International College | Network Security
Data Flow Diagrams DFD Components: Data Storage There are two variants of data storage - it can either be represented as a rectangle with absence of both smaller sides or as an open-sided rectangle with only one side missing. Micronet International College | Network Security
134
Micronet International College | Network Security
Data Flow Diagrams DFD Components: Data Flow Movement of data is shown by pointed arrows. Data movement is shown from the base of arrow as its source towards head of the arrow as destination. Micronet International College | Network Security
135
Micronet International College | Network Security
Data Flow Diagrams Levels of DFD : Level 0 Highest abstraction level DFD is known as Level 0 DFD, which depicts the entire information system as one diagram concealing all the underlying details. Level 0 DFDs are also known as context level DFDs. Micronet International College | Network Security
136
Micronet International College | Network Security
Data Flow Diagrams Levels of DFD : Level 0 Micronet International College | Network Security
137
Micronet International College | Network Security
Data Flow Diagrams Levels of DFD : Level 1 The Level 0 DFD is broken down into more specific, Level 1 DFD. Level 1 DFD depicts basic modules in the system and flow of data among various modules. Level 1 DFD also mentions basic processes and sources of information. Micronet International College | Network Security
138
Micronet International College | Network Security
Data Flow Diagrams Levels of DFD : Level 1 Micronet International College | Network Security
139
Micronet International College | Network Security
Data Flow Diagrams Levels of DFD : Level 2 At this level, DFD shows how data flows inside the modules mentioned in Level 1. Higher level DFDs can be transformed into more specific lower level DFDs with deeper level of understanding unless the desired level of specification is achieved. Micronet International College | Network Security
140
Functional Dependency
Functional dependency (FD) is a set of constraints between two attributes in a relation. Functional dependency says that if two tuples have same values for attributes A1, A2,..., An, then those two tuples must have to have same values for attributes B1, B2, ..., Bn. Micronet International College | Network Security
141
Functional Dependency
Functional dependency is represented by an arrow sign (→) that is, X→Y, where X functionally determines Y. The left-hand side attributes determine the values of attributes on the right-hand side. Micronet International College | Network Security
142
Functional Dependency
Armstrong's Axioms If F is a set of functional dependencies then the closure of F, denoted as F+, is the set of all functional dependencies logically implied by F. Armstrong's Axioms are a set of rules, that when applied repeatedly, generates a closure of functional dependencies. Micronet International College | Network Security
143
Functional Dependency
Armstrong's Axioms Reflexive rule Augmentation rule Transitivity rule Micronet International College | Network Security
144
Functional Dependency
Armstrong's Axioms Reflexive rule If alpha is a set of attributes and beta is_subset_of alpha, then alpha holds beta. Micronet International College | Network Security
145
Functional Dependency
Armstrong's Axioms Augmentation rule If a → b holds and y is attribute set, then ay → by also holds. That is adding attributes in dependencies, does not change the basic dependencies. Micronet International College | Network Security
146
Functional Dependency
Armstrong's Axioms Transitivity rule Same as transitive rule in algebra, if a → b holds and b → c holds, then a → c also holds. a → b is called as a functionally that determines b. Micronet International College | Network Security
147
Functional Dependency
Trivial Functional Dependency Trivial Non-trivial Completely non-trivial Micronet International College | Network Security
148
Functional Dependency
Trivial Functional Dependency Trivial If a functional dependency (FD) X → Y holds, where Y is a subset of X, then it is called a trivial FD. Trivial FDs always hold. Micronet International College | Network Security
149
Functional Dependency
Trivial Functional Dependency Non-trivial If an FD X → Y holds, where Y is not a subset of X, then it is called a non-trivial FD. Micronet International College | Network Security
150
Functional Dependency
Trivial Functional Dependency Completely non-trivial If an FD X → Y holds, where x intersect Y = Φ, it is said to be a completely non-trivial FD. Micronet International College | Network Security
151
Micronet International College | Network Security
Normalization If a database design is not perfect, it may contain anomalies, which are like a bad dream for any database administrator. Managing a database with anomalies is next to impossible. Micronet International College | Network Security
152
Micronet International College | Network Security
Normalization Normalization is a method to remove all these anomalies and bring the database to a consistent state. Update anomalies Deletion anomalies Insert anomalies Micronet International College | Network Security
153
Micronet International College | Network Security
Normalization Update anomalies If data items are scattered and are not linked to each other properly, then it could lead to strange situations. For example, when we try to update one data item having its copies scattered over several places, a few instances get updated properly while a few others are left with old values. Such instances leave the database in an inconsistent state. Micronet International College | Network Security
154
Micronet International College | Network Security
Normalization Deletion anomalies We tried to delete a record, but parts of it was left undeleted because of unawareness, the data is also saved somewhere else. Micronet International College | Network Security
155
Micronet International College | Network Security
Normalization Insert anomalies We tried to insert data in a record that does not exist at all. Micronet International College | Network Security
156
Normalization: First Normal Form (1NF)
First Normal Form is defined in the definition of relations (tables) itself. This rule defines that all the attributes in a relation must have atomic domains. The values in an atomic domain are indivisible units. Micronet International College | Network Security
157
Normalization: First Normal Form (1NF)
We re-arrange the relation (table) as below, to convert it to First Normal Form. Each attribute must contain only a single value from its pre-defined domain. Micronet International College | Network Security
158
Normalization: Second Normal Form (2NF)
Before we learn about the second normal form, we need to understand the following: Prime attribute Non-prime attribute Micronet International College | Network Security
159
Normalization: Second Normal Form (2NF)
Prime attribute An attribute, which is a part of the prime-key, is known as a prime attribute. Micronet International College | Network Security
160
Normalization: Second Normal Form (2NF)
Non-prime attribute An attribute, which is not a part of the prime-key, is said to be a non-prime attribute. Micronet International College | Network Security
161
Normalization: Second Normal Form (2NF)
If we follow second normal form, then every non- prime attribute should be fully functionally dependent on prime key attribute. That is, if X → A holds, then there should not be any proper subset Y of X, for which Y → A also holds true. Micronet International College | Network Security
162
Normalization: Second Normal Form (2NF)
We see here in Student_Project relation that the prime key attributes are Stu_ID and Proj_ID. According to the rule, non-key attributes, i.e. Stu_Name and Proj_Name must be dependent upon both and not on any of the prime key attribute individually. But we find that Stu_Name can be identified by Stu_ID and Proj_Name can be identified by Proj_ID independently. This is called partial dependency, which is not allowed in Second Normal Form. Micronet International College | Network Security
163
Normalization: Second Normal Form (2NF)
We broke the relation in two as depicted in the above picture. So there exists no partial dependency. Micronet International College | Network Security
164
Normalization: Third Normal Form (3NF)
For a relation to be in Third Normal Form, it must be in Second Normal form and the following must satisfy: No non-prime attribute is transitively dependent on prime key attribute. For any non-trivial functional dependency, X → A, then either − X is a superkey or, A is prime attribute. Micronet International College | Network Security
165
Normalization: Third Normal Form (3NF)
We find that in the above Student_detail relation, Stu_ID is the key and only prime key attribute. We find that City can be identified by Stu_ID as well as Zip itself. Neither Zip is a superkey nor is City a prime attribute. Additionally, Stu_ID → Zip → City, so there exists transitive dependency. Micronet International College | Network Security
166
Normalization: Second Normal Form (2NF)
To bring this relation into third normal form, we break the relation into two relations as follows: Micronet International College | Network Security
167
Micronet International College | Network Security
End of the lesson Micronet International College | Network Security
168
L01: Understand data models and database technologies
New Developments L01: Understand data models and database technologies Micronet International College | Network Security
169
Micronet International College | Network Security
New Developments Micronet International College | Network Security
170
Micronet International College | Network Security
Dynamic Storage A dynamic database management system (dynamic DBMS) is a database in which objects have a value- based relationship, which is specified at retrieval time. In a dynamic DBMS, the locations of logical file databases and relational data based are value- based. Micronet International College | Network Security
171
Micronet International College | Network Security
Data Mining Data mining is an interdisciplinary subfield of computer science. It is the computational process of discovering patterns in large data sets involving methods at the intersection of artificial intelligence, machine learning, statistics, and database systems. Micronet International College | Network Security
172
Micronet International College | Network Security
Data Mining The overall goal of the data mining process is to extract information from a data set and transform it into an understandable structure for further use. Micronet International College | Network Security
173
Micronet International College | Network Security
Data Warehousing Data warehousing emphasizes the capture of data from diverse sources for useful analysis and access, but does not generally start from the point-of-view of the end user who may need access to specialized, sometimes local databases. The latter idea is known as the data mart. Micronet International College | Network Security
174
Micronet International College | Network Security
Data Warehousing There are two approaches to data warehousing, top down and bottom up. The top down approach spins off data marts for specific groups of users after the complete data warehouse has been created. The bottom up approach builds the data marts first and then combines them into a single, all- encompassing data warehouse. Micronet International College | Network Security
175
Micronet International College | Network Security
Data Warehousing Data Warehouse Features Subject Oriented Integrated Time Variant Micronet International College | Network Security
176
Micronet International College | Network Security
Data Warehousing Subject Oriented A data warehouse is subject oriented because it provides information around a subject rather than the organization's ongoing operations. These subjects can be product, customers, suppliers, sales, revenue, etc. A data warehouse does not focus on the ongoing operations, rather it focuses on modelling and analysis of data for decision making. Micronet International College | Network Security
177
Micronet International College | Network Security
Data Warehousing Integrated A data warehouse is constructed by integrating data from heterogeneous sources such as relational databases, flat files, etc. This integration enhances the effective analysis of data. Micronet International College | Network Security
178
Micronet International College | Network Security
Data Warehousing Time Variant The data collected in a data warehouse is identified with a particular time period. The data in a data warehouse provides information from the historical point of view. Micronet International College | Network Security
179
Micronet International College | Network Security
Data Warehousing Types of Data Warehouse Information Processing Analytical Processing Data Mining Non-volatile Micronet International College | Network Security
180
Micronet International College | Network Security
Data Warehousing Information Processing A data warehouse allows to process the data stored in it. The data can be processed by means of querying, basic statistical analysis, reporting using crosstabs, tables, charts, or graphs. Micronet International College | Network Security
181
Micronet International College | Network Security
Data Warehousing Analytical Processing A data warehouse supports analytical processing of the information stored in it. The data can be analyzed by means of basic OLAP operations, including slice-and-dice, drill down, drill up, and pivoting. Micronet International College | Network Security
182
Micronet International College | Network Security
Data Warehousing Data Mining Data mining supports knowledge discovery by finding hidden patterns and associations, constructing analytical models, performing classification and prediction. These mining results can be presented using the visualization tools. Micronet International College | Network Security
183
Micronet International College | Network Security
Data Warehousing Non-volatile Non-volatile means the previous data is not erased when new data is added to it. A data warehouse is kept separate from the operational database and therefore frequent changes in operational database is not reflected in the data warehouse. Micronet International College | Network Security
184
Web Enabled Database Application
Considering the widespread use of the Internet and Web Browser technology to deliver marketing messages, promotional and informational material, it's surprising that we still see very little use of what the Web is best at - providing interactive access to business information, making queries, placing orders and updating records via Net and browser services. Micronet International College | Network Security
185
Web Enabled Database Application
In other words, standard database facilities but accessed remotely. That's what we call a web- enabled database. Micronet International College | Network Security
186
Web Enabled Database Application
The basic components of a web-enabled database like the one in the diagram are: A permanent link to the Internet A webserver A firewall Web pages and software to deliver the active application Micronet International College | Network Security
187
Micronet International College | Network Security
Multimedia Databases A Multimedia database (MMDB) is a collection of related multimedia data. The multimedia data include one or more primary media data types such as text, images, graphic objects (including drawings, sketches and illustrations) animation sequences, audio and video. Micronet International College | Network Security
188
Micronet International College | Network Security
Multimedia Databases A Multimedia Database Management System (MMDBMS) is a framework that manages different types of data potentially represented in a wide diversity of formats on a wide array of media sources. It provides support for multimedia data types, and facilitate for creation, storage, access, query and control of a multimedia database. Micronet International College | Network Security
189
Document Management Systems
A document management system (DMS) is a system (based on computer programs in the case of the management of digital documents) used to track, manage and store documents and reduce paper. Most are capable of keeping a record of the various versions created and modified by different users (history tracking). Micronet International College | Network Security
190
Micronet International College | Network Security
Digital Libraries A digital library is a special library with a focused collection of digital objects that can include text, visual material, audio material, video material, stored as electronic media formats (as opposed to print, microform, or other media), along with means for organizing, storing, and retrieving the files and media contained in the library collection. Micronet International College | Network Security
191
Micronet International College | Network Security
Digital Libraries Digital libraries can vary immensely in size and scope, and can be maintained by individuals, organizations, or affiliated with established physical library buildings or institutions, or with academic institutions. The digital content may be stored locally, or accessed remotely via computer networks. An electronic library is a type of information retrieval system. Micronet International College | Network Security
192
Micronet International College | Network Security
End of the lesson Micronet International College | Network Security
193
Micronet International College | Network Security
References Codd, E.F (1969), Derivability, Redundancy, and Consistency of Relations Stored in Large Data Banks, Research Report, IBM Data Integration Glossary (PDF), US: Department of Transportation, August 2001 Codd, E. F (1990), The Relational Model for Database Management, Addison-Wesley, pp. 371–388, ISBN Micronet International College | Network Security
194
Micronet International College | Network Security
Further Reading C. J.; Darwen, Hugh (2000). Foundation for future database systems: the third manifesto; a detailed study of the impact of type theory on the relational model of data, including a comprehensive model of type inheritance (2 ed.). Reading, MA: Addison-Wesley. ISBN Darwin, Hugh (2007). An Introduction to Database Systems (8 ed.). Boston: Pearson Education. ISBN Micronet International College | Network Security
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.