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
Size: 1.19 MB
Language: en
Added: Apr 22, 2020
Slides: 46 pages
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 :
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.
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.