DATABASE MANAGEMENT SYSTEM
DBMS
1. DBMS फ़ाइल के रूप में डेटा को सेव करता है।
2. एक बार मे केवल एक ही डेटा एलिमेंट्स को एक्सेस किया जाता है।
3. एक डेटा एलिमेंट का दूसरे डेटा एलिमेंट से कोई सम्बन्ध नही होता है।
4. Normalization नहीं होता है।
5. DBMS डिस्ट्रिब्यूटेड डेटा को सपोर्ट नहीं करता है।
6. यह डेटा को navigational या hierarchical फॉर्म में सेव करता है।
7. यह छोटे डेटा को हैंडल करने के लिए यूज़ किया जाता है।
8. Data Redundancy (अनावश्यक) इसमे एक आम बात है।
9. यह छोटे आर्गेनाइजेशन के में यूज़ होता है।
10. Single User को सपोर्ट करता है।
11. बड़े डेटा को Fetch करने में बहुत समय लगता है।
12. डेटा manipulation के लिए low सिक्योरिटी लेवल होता है।
13. Low software और hardware की आवश्यकता होती है।
14. Examples: XML, Microsoft Access, etc.
RDBMS
1. RDBMS डाटा को टेबल में सेव करता है।
2. Multiple data elements can be एक साथ कई डेटा एलीमेंट को एक्सेस किया जा सकता है।
3. इसमे डेटा टेबल के फॉर्म में सेव होतें हैं जो कि एक दूसरे से related होतें हैं।
4. Normalization होता है।
5. RDBMS डिस्ट्रिब्यूटेड डेटा को सपोर्ट करता है।
6. यह डेटा को सेव करने के लिए Tabular Form का उपयोग करता है।
7. यह बहुत ज्यादा डेटा को हैंडल करने के लिए यूज़ किया है।
8. Keys और Index में Data Redundancy नहीं होती है।
9. यह बड़े आर्गेनाइजेशन में यूज़ किया जाता है जहाँ बहुत ज्यादा डेटा को हैंडल करना होता है।
10. यह मल्टीयूज़र को सपोर्ट करता है।
11. इसमे डेटा Fetching DBMS से तेज होती है।
12. RDBMS में मल्टिपल लेवल की सिक्योरिटी होती है।
13. Higher Software और Hardware की आवश्यकता होती है।
14. Examples: MySQL, PostgreSQL, SQL Server, Oracle, etc.
INTRODUCTION TO RDBMS
RDBMS stands for Relational Database Management System.
Data is stored in the form of tables and there is a relationship between these tables.
DATA MODEL
DATA MODEL can be defined as an integrated collection of concepts for describing and manipulating data, relationships between data, and constraints on the data in an organization.
It is used for representing entities of interest and their relationships in database.
डेटा मॉडल को किसी संगठन में डेटा का वर्णन और हेरफेर करने, डेटा के बीच संबंधों और डेटा पर बाधाओं के लिए अवधारणाओं के एक एकीकृत संग्रह के रूप में परिभाषित किया जा सकता है।
इसका उपयोग डेटाबेस में रुचि की संस्थाओं और उनके संबंधों का प्रतिनिधित्व करने के लिए किया जाता है।
TYPES OF DATA MODELS
1. Record-based data model
2. Object-based data model
3. Physical data model
RECORD BASED DATA MODELS
Record based data models specify the overall logical structure of the database and provides a higher-level description of the implementation.
Record based models are so named because the database is structured in fixed format records of several types.
The three most widely accepted record based data models are:
• Hierarchical Model
• Network Model
• Relational Model
OBJECT BASED DATA MODELS
Object–based data models are used to describe data and its relationships.
It uses concepts such as entities, attributes and relationships.
Following are the common types of object-based data models:
• Entity-Relationship
• Object Oriented
• Semantic
• Functional
PHYSICAL DATA MODELS
Physical data models describe how data is stored in the computer, representing information such as record structures, record ordering, and access paths.
Two types of physical data models are:
• Unifying model
• Frame memory model
HIRERICAL 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.
NETWORK DATA MODEL
This model is same as hierarchical model, except that a record can have multiple parents.
Network model has three basic components- record type , data items and links.
RELATIONAL DATA MODEL
Relational model stores data in the form of tables. The relational model consists of three major components:
The set of relations and set of domains that defines the way data can be represented (data structure).
Integrity rules that define the procedure to protect the data (data integrity).
The operations that can be performed on data (data manipulation).
DATABASE DESIGN TECHNIQUE
Top down Approach
– E R Modelling
Bottom Up approach
– Normalization
ER MODELING
The ER model is a conceptual data model that views the real world as entities and relationships.
A basic component of the model is the Entity-Relationship diagram, which is used to visually represent data objects.
Entity relationship model defines the conceptual view of database.
BASIC CONCEPT IN ER MODEL
An entity is an object that exists and is distinguishable from other objects.
Example: specific person, company, event, plant
An entity set is a set of entities of the same type that share the same properties.
Example: set of all persons, companies, trees, holidays
Entities have attributes- simple attributes, composite attributes, derived attributes, single-valued attributes etc.
Example: people have names and addresses
A relationship A Relationship represents an association between two or more entities. Relationships are classified in terms of degree, connectivity, cardinality, and existence.
DEGREE OF RELATIONSHIP
The number of participating entities in an relationship defines the degree of the relationship.
Unary = degree 1
Binary = degree 2
Ternary = degree 3
employee manager-of employee is unary
employee works-for department is binary
customer purchase item, shop keeper is a ternary relationship
MAPPING CARDINALITIES
Cardinality defines the number of entities in one entity set which can be associated to the number of entities of other set via relationship set..
One-to-one: one entity from entity set A can be associated with at most one entity of entity set B and vice versa
One-to-many: One entity from entity set A can be associated with more than one entities of entity set B but from entity set B one entity can be associated with at most one entity.
Many-to-one: More than one entities from entity set A can be associated with at most one entity of entity set B but one entity from entity set B can be associated with more than one entity from entity set A.
Many-to-many: one entity from A can be associated with more than one entity from B and vice versa.
NOTATIONS IN ER MODEL
EXTENDED ER FEATURES
Specialization: Top-down design process.
Specialization is the process of taking subsets of a higher-level entity set to form lower level entity sets. It is a process of defining a set of subclasses of an entity type, which is called as superclass of the specialization.
For example, specialization of the Employee entity type may yield the set of subclasses namely Salaried_Employee and Hourly_Employee on the method of pay.
Generalization: A bottom-up design process.
Generalization hierarchy is a form of abstraction that specifies that two or more entities that share common attributes can be generalized into a higher-level entity type called a super type or generic entity. The lower level of entities becomes the subtype, or categories, to the super type. Subtypes are dependent entities. Generalization is denoted through a triangle component labelled ‘IS A”.
AGGREGATION
One limitation of the E-R model is that it cannot express relationships among relationships.
The best way to model a situation like this is by the use of aggregation.
NORMALIZATION
Normalization is a process of decomposing a set of relations with anomalies to produce smaller and well structured relations that contain minimum or no redundancy.
It is a formal process of deciding which attributes should be grouped together in a relation.
The process of normalization can be defined as the procedure of successive reduction of a given collection of relational schemas based on their FD’s and primary keys to achieve some desirable form of minimized redundancy.
NORMAL FORMS
First normal form (1NF)
Second normal form (2NF)
Third normal form (3NF)
Boyce/ Codd normal form (BCNF)
Fourth normal form (4NF)
Fifth normal form (5NF)
LOGICAL DATABASE DESIGN
The logical design is more conceptual and abstract than the physical design.
In the logical design, you look at the logical relationships among the objects. In the physical design, you look at the most effective way of storing and retrieving the objects.
The process of logical design involves arranging data into a series of logical relationships called entities and attributes. An entity represents a chunk of information. In relational databases, an entity often maps to a table. An attribute is a component of an entity and helps define the uniqueness of the entity. In relational databases, an attribute maps to a column.
You can create the logical design using a pen and paper, or you can use a design tool such as Oracle Warehouse Builder or Oracle Designer.