Please enable JavaScript.
Coggle requires JavaScript to display documents.
DATABASES - Coggle Diagram
DATABASES
Definition: a database is a collection of related, logically coherent,data used by the application program in an organization
-
-
Database architecture
Internal level:where data is actually stored on the storage devices, low-level access methods and how bytes are transferred
Conceptual level: the logical view of the data. The data model is defined on this level, and the main functions of the DBMS, such as queries, are also on this level
External level interacts directly with the user (end users or application programs). It changes the data coming from the conceptual level to a format and view that is familiar to the users.
DATABASE MODELS
the hierarchical model
- Data is organized as an inverted tree
- Each entity has only one parent but can have several children
- At the top of the hierarchy, there is one entity, which is called the root
the network model
- the entities are organized in a graph, in which some entities can be accessed through several paths
-
the relational model
- data is organized in two-dimensional tables called relations
- There is no hierarchical or network structure imposed on the data
- The tables or relations are related to each other
THE RELATIONSHIP
Relation
Name. Each relation in a relational database should have a name that is unique among other relations.
Attributes. Each column in a relation is called an attribute. The attributes are the column headings in the table. Each attribute gives meaning to the data
Tuples. Each row in a relation is called a tuple. A tuple defines a collection of attribute values. The total number of rows in a relation is called the cardinality of the relation.
Operation
Unary operation
-
-
-
-
project operation
The project operation creates a relation in which each tuple has fewer attributes. The number of tuples (rows) in this operation remains the same
-
Database design
-
-
-
-
Normalization
First normal form (1NF): When we transform entities or relationships into tabular relations, there may be some relations in which there are more values in the intersection of a row or column.
Second normal form (2NF): In each relation we need to have a key (called a primary key) on which all other attributes (column values) needs to depend.