Get Started. It's Free
or sign up with your email address
Rocket clouds
Data Module by Mind Map: Data Module

1. Definition

1.1. an integrated collection of concepts for describing and manipulating data, relationships between data, and constraints on the data organization

1.2. a notation for describing data or information

1.3. a collection of concept that can be used to describe the structure of a database – provides the necessary means to achieve this abstraction

2. The Importance of Data Model

2.1. A major aim of a database is to provide users with an abstract view of data, hiding certain details of how data is stored and manipulated.

2.2. One of the main characteristics of the database approach is to support data abstraction so that users can perceive data at their preferred level of detail.

2.3. A data model provides the necessary means to achieve this abstraction.

3. DATA MODEL BASIC BUILDING BLOCKS

3.1. Structure of the data (Structural Part)– or sometimes referred to as conceptual model to describe the structure of the data (including the relationships between data) and emphasize the different levels of the data.

3.2. Operations on the data (Manipulative Part)– a limited set of operations that can be performed on the data such as queries (operations that retrieve information) and modification (operations that change the database).

3.3. Constraints on the data - describe the limitations on what the data can be. Example, the field ‘Day’ (i.e. a day of the week) is an integer between 1 to 7. It ensures that the data is accurate.

4. TYPES OF DATA MODELS AND THEIR EVOLUTION

4.1. Object-based Data Model

4.1.1. Entity-Relationship (ER)

4.1.1.1. model the data based on entities and their relationships (including their attributes and constraints) in a non technical and free of ambiguities way.

4.1.2. Semantic

4.1.2.1. models that represent more of the meaning of data.

4.1.3. Functional

4.1.3.1. one of the family of semantic data model which model the data based on the entities and functional relationships.

4.1.4. Object-oriented

4.1.4.1. extends the definitions of an entity to include not only the attributes that describe the state of the object but also the actions that are associated with the object, that it, its behavior.

4.2. Record-based Data Model

4.2.1. Relational Data Model

4.2.1.1. Data and relationships are represented as tables, each of which has a number of columns with unique name.

4.2.2. Network Data Model

4.2.2.1. Data is represented as collections of records and relationships are represented by sets.

4.2.3. Hierarchical Data Model

4.2.3.1. Data is represented as a collection of records and relationships are represented by sets.

4.2.4. Comparisons between Relational, Network and Hierarchy Data Model

4.2.4.1. The majority of modern commercial systems are based on the relational paradigm, whereas early database systems were based on either the network or hierarchical data models.

4.2.4.2. The majority of modern commercial systems are based on the relational paradigm, whereas early database systems were based on either the network or hierarchical data models.

4.2.4.3. Hence, relational systems adopt a declarative approach to database processing (that is, they specify what data is to be retrieved), but network and hierarchical systems adopt a navigational approach (that is they specify how the data is to be retrieved).

4.3. Physical Data Model (Low level Data Model)

4.3.1. Describes how data is stored in the computer, representing information such as record structures, record ordering and access paths.

5. THE RELATIONAL MODEL

5.1. In the relational data model, all data is logically structured within relations (tables). Each relation has a name and is made up of named attributes (columns) of data. Each tuple (row) contains one value per attributes.

5.1.1. Terminology

5.1.1.1. Relation

5.1.1.1.1. A relation(sometimes called file) is a table with column and rows.

5.1.1.2. Attribute

5.1.1.2.1. An attribute (sometimes called field) is a named column of a relation.

5.1.1.3. Domain

5.1.1.3.1. A domain is the set of allowable values for one or more attributes

5.1.1.4. Tuple

5.1.1.4.1. A tuple is a row of a relation (sometimes called record)

5.1.1.5. Degree

5.1.1.5.1. The degree of a relation is the number of attributes it contains.

5.1.1.6. Cardinality

5.1.1.6.1. The cardinality of a relation is the number of tuples it contains

5.1.1.7. Relational Database

5.1.1.7.1. A relational database is a collection of normalized relations with distinct relation names.

5.1.2. Mathematical Relations

5.1.2.1. The Cartesian product of these two sets, written D1 x D2, is the set of all ordered pairs such that the first element is a member of D1 and the second element is the member of D2.

5.1.3. Database Relations

5.1.3.1. Relation schema

5.1.3.1.1. Let A1,A2,…..,An be attributes with domain D1, D2,…..Dn. Then set { A1 : D1 , A2 : D2 ,……, An : Dn} is a relation schema.

5.1.3.2. Relational database schema

5.1.3.2.1. If R1,R2,….Rn are set of relation schema, then we can write the relational database schema or simply relational schema, R, as; R = { R1,R2,….Rn }

5.1.4. Properties of Relations

5.1.5. Relational Keys

5.1.5.1. Superkey

5.1.5.1.1. An attribute, or set of attributes, that uniquely identify a tuple within a relation.

5.1.5.2. Candidate key

5.1.5.2.1. A superkey such that no proper subset is a superkey within the relation.

5.1.5.3. Primary key

5.1.5.3.1. The candidate key that is selected to identify tuples uniquely within the relation.

5.1.5.4. Foreign key

5.1.5.4.1. An attribute, or set of attributes, within one relation that matches the candidate key of some (possibly the same) relation.

5.1.6. Representing Relational Database Schemas

5.1.6.1. A relational database consists of any number of normalized relations.

5.1.7. Integrity Constraints

5.1.7.1. a data model has two other parts: a manipulative part, defining the types of operation that are allowed on the data, and a set of integrity constraints, which ensure that the data is accurate. In this section we discuss the relational integrity constraints.

5.1.7.1.1. Nulls

5.1.7.1.2. Entity Integrity

5.1.7.1.3. Referential Integrity

5.1.7.1.4. General Constraints