The arrangement of data in the form of records and fields is called a database
Database Management System: The DBMS is the management of databases in the form of a package.
Features:
- Creating Tables
- Entering database records
- Sorting
- Deleting
- Updating
- Merging Database files
- Copying
- Printing
- Validating
- Converting
- Generating Reports
Relational Database Model
Arranging of data in a logical way in the form of table of showing relationship between different fields.
Terms used in RDBMS
- Entity:- Is a person, place, event or thing
- Attributes:- Characteristic of an entity is known as attribute
- Relation:- It shows relation between any two entities
- Tuple:- Row of a relation
- Domain:- Values of attributes or column
- Degree:- Relationship degree indicate number of associated entities.
Types of relationships
- Urnary
- Binary
- Ternary
Relational Algebra
It define theoretical way of manipulating table contents using the eight relational functions.
- SELECT
- PROJECT
- JOIN
- INTERSECTION
- UNION
- DIFFERENCE
- PRODUCT
- DIVIDE
- UNION: Combine all rows from two tables
- Intersection: Produce a listing that contain only rows that appear in both tables.
- Difference: Yields all rows in one table that are not found in other table
- Cartesian product: Produces a list of all possible pair of rows from two tables
- Select: Yields values for all attributes found in a table
- Project: Produces list of all values for selected attributes
- Join: Allows to combine information from two or more tables
- Divide: Divide the table into separate tables based on its columns
E – R Diagrams
The overall logical structure of a database can be expressed graphically by an E–R diagram.
E–R diagram consist of following components
E-R diagram of part of project- management system |
Cardinality:
The number mentioned on the relation shows types of relationship
- one–one
- one–many
- many–one
- many–many
Key
Common attributes that enable us to link tables, such attributes are called keys.
Types of Keys:
- Super key: An attribute that uniquely identifies each entity in a table.
- Candidate key: A minimal super key that does not contain a subset of attributes that is itself a super key.
- Primary key: A candidate key selected to uniquely identify all other attribute values in any given row cannot contain null entries.
- Secondary key: An attribute used strictly for data retrieval purpose
- Foreign key: An attribute in one table whose values must either match the primary key in another table to be null.
Tuple Calculus
It is a special case of language of the
semantical system consider semantic system in following form ∑i.
∑i = < Ri U C, {Φ, R, S,-------}, Φ, R, S,------- >
where, Ri = the set of real
numbers.
C = set of character strings of finite length
{ Φ, R, S,-------} = set of relational symbols.
Atomic wff of ∑i
- R(t) is an atomic wff of ∑i if R is a relation symbol and t is a R – string whose components are in Ri U C
- Φ u [i] v [j] this is written as u [i] Φ v [j] is an atomic wff of i provided that u and v are both R – strings or one is a R – string and other is a S – string where R and S are two relation symbols of ∑i
Quasi – wff
Ψ is a quasi quantifier ∑i if
- Ψ is an atomic wff of ∑i or
- Any expression of Ψ obtained from Ψ by substituting constants of ∑i for the placeholders used in Ψ, is an atomic wff of ∑i .
- (Ψ1 V Ψ2) is a quasi wff if Ψ1 and Ψ2 are Quasi – wff and no place holder I in both free in Ψ1 and bound in Ψ2 or vice versa.
A wff is a quasi w f f in which no place holder
is free.
Safe Expressions
A tuple calculus expressions {t/ Ψ(t)} is said to be a safe expression
provided following conditions hold good
- All components of each t that makes y true are in DOM (Ψ).
- If there is a quasi – wff of the form (for all s) (W(s)) in Ψ then all the components of that u which make W (with possible values of other free variables in w).
- If Ψ has within itself a quasi – wff of the form (for all s) (W(s)) then the components of all Ss irrespective of the fact that whether w is satisfied by these or not must be DOM(Ψ).
0 comments:
Post a Comment