Data base management system(DBMS), sourav mathur

souravmathur 7,121 views 46 slides Apr 22, 2020
Slide 1
Slide 1 of 46
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46

About This Presentation

data base management system
meaning and advantages/disadvantages of DBMS
modern approach meaning advantages and disadvantages all steps of data base design in breif
types of relationships


Slide Content

DATA BASE MANAGEMENT SYSTEM (DBMS) SOURAV MATHUR

INTRODUCTION DATABASE SYSTEM : A database is a set of logically related data that is organised so that it can easily be retrieved, managed and updated. The modern database are managed by sophisticated software known as database management system (DBMS). The database which uses DBMS for data collection, retrieval and updating is called database system. 2

3 A database system offers the following to the users :   an easy way to collect, update and retrieve stored infomation ; data stability by preventing unnecessary loss of data; data protection by preventing unauthorised use of data; and ensures data quality in terms of accuracy, availability and usability .

ADVANTAGES OF DBMS 4

5 1. Improve data sharing by providing a easy and feasible system. 2. Improve data security. 3. Better data integration at one place for better efficiency. 4. Minimized data inconsistency. 5. Improved data access. 6. Improved decision making. 7. Increase end-user productivity. Advantages of data base management system :

DISADVANTAGES OF DBMS 6

7 1. Increased costs 2. Management complexity 3. Maintaining currency 4. Frequent upgrade/replacement cycles

TRADITIONAL FILE SYSTEM 8

9 FACTORS File System DEFINATION A file system is an abstraction to store, retrieve, manage, and update a set of files, along with keeping track of the files and also manage them. Data Program Independence Data definition is typically part of application program and therefore data and program are dependent to each other. Data Sharing Data is stored in separate files in different departments of the organization, which makes data sharing throughout the organization difficult. Data Redundancy Since separate files are maintained in different departments for usage requirements, it leads to duplication or manipulation of data i.e. data redundancy

10 FACTORS File System Data Consistency and Accuracy In file system, the degree of data consistency and accuracy is low because of data redundancy Data Security The degree of data security in the file system is very low Multiple view of Data In traditional file system, creating multiple views of data is next to impossible Cost A low cost approach of database mangement .

11 FACTORS File System Error Correction Correcting error in all relevant file is very difficult and complex Data Retrieval Retrieval of stored data is difficult

Advantages of traditional file system

13 Advantages of Traditional File System 1.Simple to use . 2. Less complex. 3. Minimal investment (Not make the investment in software because it allows us to transport files from one to another computer). 4. No requirement of the specialist .

14 Disadvantages of file system

15 Disadvantages of Traditional File System 1. Data redundancy (Each application has its own data file so, same data may have to be recorded and stored in many times). 2. Data inconsistency (Due to the same data items that appear in more than one file do not get updated simultaneously in each and every file). 3. Data dependence (Program and application in the file processing system are data dependent but, the problem is incompatible with file format). 4. Limited data sharing. 5. The problem with security. 6. Retrieval (retrieval is not easy). 7. Time-consuming. 8. Inefficient to maintain the record of the big firm having a large number of items. Required Lots of labor work to do.

MODERN APPROACH TO DATABASE 16

DESIGNING A DATABASE 17 Database design is a process of producing detailed data model of a database. It requires a complete knowledge of the business functions for which a data model has to be designed- A database design is a logical design of base data structure developed for the purpose Of storing data. The following steps are taken for designing a database : 1. REALITY. 2. ENTITY RELATIONSHIP DESIGN. 3. RELATION DATA MODEL. 4. NORMALIZATION

1. REALITY 18 – Process of designing starts with a real world situation, known as reality, for which the database is to be designed. – All aspects of reality must be clearly understood by the designer. – E.g.: Database for library, The library will be reality, and one need to understand all aspects of a library, i.e. the nature of all transactions that happen in library in reality.

2. ENTITY RELATIONSHIP DESIGN. 19 – After getting complete details of reality (real world situation), a formal blueprint, with pictorial presentation is prepared using the concept of ER Model to present the details of the reality

3. RELATION DATA MODEL 20 – Once the blueprint, i.e. ER diagram is ready, it is transformed into inter related tables. – To Create tables, the details are divided into major entities and then each entity becomes a table. – Relationship between tables are defined to maintain data integrity.

4. NORMALIZATION 21 – This is the process of refining a database design. – It follows set of rules proposed by Edger F. Codd and eliminates or reduces data redundancy. – It makes sure that the tables are structured correctly. – The database design is analysed for errors and, if needed, normalization rules are applied

22 NO YES FLOW CHART: PROCESS OF DESIGNING A DATABASE

ER-MODEL BASIC CONCEPTS 23

Entity 24 An entity can be a person, place, object, event or concept in the user environment about which the data is collected. An entity can be a real-world object, either animate or inanimate, that can be easily identifiable. Entity = Database Table • Represented as a named rectangular shape, which may have a number of attributes. EMPLOYEE

Attributes 25 Entities are represented by means of their named properties, or characteristics of an entity, is of inetrest to an organization, called attributes. • Describes the entity in terms of its characteristics such as code, name, height, weight, etc. • All attributes have values. For example, a student entity may have name, class, and age as attributes. • There exists a domain or range of values that can be assigned to attributes. For example, a student's name cannot be a numeric value. It has to be alphabetic. A student's age cannot be negative, etc.

26 TYPES OF ATTRIBUTES

Simple attribute 27 Simple attributes are atomic values, which cannot be divided further. E.g. A student's phone number is an atomic value of 10 digits, a gender of employee can not be subdivided .

Composite attribute 28 Composite attributes are made of more than one simple attribute. For example, a student's complete name may have first_name and last_name .

Derived attribute 29 Derived attributes are the attributes that do not exist in the physical database, but their values are derived from other attributes present in the database. For example, average_salary in a department should not be saved directly in the database, instead it can be derived. For another example, age can be derived from data_of_birth . Represented by a dotted oval.

Single-value attribute 30 Single-value attributes contain single value. For example − Social_Security_Number . Represented by single oval.

Multi-value attribute 31 Multi-value attributes may contain more than one values. For example, a person can have more than one phone number, email_address , etc. Represented by double oval.

Key attribute 32 Unique, distinguishing characteristic of the entity. The values of the key attributes are distinct for each individual entity. For eg .: Unique ID no. of the citizens of a country. It may consist of a single attribute or multiple attributes in combination. For eg . Emp_Id is a key attribute as it is a unique no. in the organization. Represented by an underlined oval

RELATIONSHIP AND TYPES 33

RELATIONSHIP 34 • A relationship represents some association between two or more entities. • Defines the manner in which the entities interact. • The association among entities is called a relationship. • The entities that are enrolled in a relationship are known as participants. • The relationships are generally given names. • The degree of relationship is defined by the number of participants in the relationship. • For example, an employee works_at a department, a student enrolls in a course. Here, Works_at and Enrolls are called relationships. • Relationship is represented as a diamond shape containing the name of relationship between entities.

Relationship Set 35 A set of relationships of similar type is called a relationship set. Like entities, a relationship too can have attributes. These attributes are called descriptive attributes.

Relationship Between Entitie 36

TYPES OF RELATIONSHIPS 37

38 1.One-to-one 2.One-to-many 3. Many-to-one 4.Many-to-many

1. One-to-one 39 For every row of entity 1 there is only one row row corresponding to entity 2. Represented as (1:1). • E.g.: Two entities “Boy” and “Girl”. Assuming one Boy will marry only one girl and one girl will marry only one boy , the relationship represented between the entities in on-to-one. BOY MARY GIRL

2. One-to-Many 40 Relationship is there when, for every row in first table (Entity 1) There exist zero, one or many rows in the second table (Entity 2). • Represented by (1:N). • In ER diagram crowfoot (<) is used to show this relationship, in which crowfoot represents many rows. • The one to many relationship is shown by department employee relationship. One Department can have many employees. EMPLOYEE DEPLOYED DEPARTMENT

3. Many –to-Many 41 Said to exist, if for every row in the first table (Entity 1) there can be many rows in the second table (Entity 2), and for every row in the second table, there can be many rows in the first table. • Represented by (M:N) • Eg .: Student studies subject. There can be many students who can study the subject, whereas there can be many subjects which can be studied by the student. STUDENTS STUDIES SUBJECTS

DEGREE OF RELATIONSHIP 42 –Unary Relationship –Binary Relationship –Ternary Relationship

1. Unary Relationship 43 • A relationship between the instances of a single entity type. • Only a single entity participates. • Also called recursive relationship. • A “person” wish to represent “marriages” between persons. It involves a relationship between one instance of a person entity with another instance of person entity. • To show such relationship in ER diagram, the entity is connected twice with the diamond showing the relationship.

2. Binary Relationship 44 • The relationship between two entities. • In the last example if we divide the employees (a single entity) into two different entities “managers” and “workers”, there exist two entities and the relationship between them will be a binary relationship.

3. Ternary Relationship 45 A ternary relationship is when three entities participate in the relationship. For Example: The University might need to record which teachers taught which subjects in which courses. The connectivity of a relationship is its classification.

THANK YOU