Please enable JavaScript.
Coggle requires JavaScript to display documents.
Relational
Data Model (Introduction (Review of
database models…
Relational
Data Model
Introduction
-
Domain
In data management and database analysis, a data domain refers to all the values which a data element may contain.
-
Instance
A database instance is a set of memory structures that manage database files. A database is a set of physical files on disk created by the CREATE DATABASE statement. The instance manages its associated data and serves the users of the database
-
Cardinality
The cardinality of a table refers to the number of rows in the table. The degreeof a table refers to the number of columns
Review of
database models
Properties
■ Each relation (or table) in a database has a unique name
■ An entry at the intersection of each row and column is atomic (or single-valued);
■ There can be no multi-valued attributes in a relation
■ Each row is unique;
■ No two rows in a relation are identical
■ Each attribute (or column) within a table has a unique name
■ The sequence of columns (left to right) is insignificant
■ The columns of a relation can be interchanged without changing the meaning or use of the relation
■ The sequence of rows (top to bottom) is insignificant
■ Rows of a relation may be interchanged or stored in any sequence
The relational model of data has three major component
■ Relational database objects- allows to define data structures
■ Relational operators allows manipulation of stored data
■ Relational integrity constraints allows to defines business
The Relational Objects
■ Location - Most RDBMS have multiple locations all manger by the same db engine
■ Data base - A set of SQL objects or collection of tabled and associated indexes
Degree
Degrees of Relationship (Cardinality) The degree of relationship (also known as cardinality) is the number of occurrences in one entity which are associated (or linked) to the number of occurrences in another
Constrains
Domain constraints
Domain integrity constraints are concerned with specifying that all columns in a relational database must be declared upon a defined domain. The primary unit of data in the relational data model is the data item. Such data items are said to be atomic. A domain is a set of values of the same type.
Key Constraints
Constraints are sort of restrictions, which restrict the data that can be stored in a relation (Table). or Constraints are mostly a collection of indexes and triggers that restrict certain actions on a table. There are four types of constraints: Primary Key ConstraintsUnique ConstraintsCheck ConstraintsForeign Key (FK) Constraints. - chandrabhan.
Schema
Schema describes how the database will be constructed using its tables. Formally, schema is defined as the set of formula that imposes integrity constraints on the tables.
Concepts of
Keys
-
Surrogate key
A surrogate key in a database is a unique identifier for either an entity in the modeled world or an object in the database.
Alternate key
f any table have more than one candidate key, then after choosing primary key from those candidate key, rest of candidate keys are known as an alternate key of that table.
Primary key
An attribute (or combination of attributes) that uniquely identifies each row in a relation
Foreign key
An attribute in a relation of a database that serves as the primary key of another relation in the same database
A foreign keyis a set of columns in one table that serve as the primary key in another table
Recursive foreign key
: A foreign key in a relation that references the primary key values of that same relation
Candidate key
Candidate keys are those keys which is candidate for primary key of a table. In simple words we can understand that such type of keys which full fill all the requirements of primary key which is not null and have unique records is a candidate for primary key. So thus type of key is known as candidate key. Every table must have at least one candidate key but at the same time can have several.
-