Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Database Management System

Similar presentations


Presentation on theme: "Introduction to Database Management System"— Presentation transcript:

1 Introduction to Database Management System

2 A collection of raw fact and figure is called data.
DBMS MICROSOFT .NET Data: A collection of raw fact and figure is called data. The word raw means that the facts have not yet been processed to get their exact meaning. Data is collected from different sources. It is collected for different purposes. Data may consist of numbers, characters, symbols or pictures etc.

3 Data may be of the following types: Numeric Data Alphabetic Data
Examples: When students get admission in colleges or universities, they have to fill out an admission form. The form consists of raw facts about the students e.g. name, father name, address etc. Types of Data: Data may be of the following types: Numeric Data Alphabetic Data Alphanumeric Data Image Data Audio Data Video Data DBMS MICROSOFT .NET

4 DBMS MICROSOFT .NET Information: The processed data is called information. Information is an organized and processed form of data. It is more meaningful than data and is used for making decisions. For example, the marks of different subjects are used as data and total marks is the information.

5 Data consist of unprocessed raw facts.
Data vs. Information: Data Information DBMS MICROSOFT .NET Data consist of unprocessed raw facts. Data is used as input in the computer. Data is not meaningful. Data is normally in huge volume. Data is the asset of organization and not available for sale. Data is difficult or even impossible to reproduce. Data is used rarely. Data is an independent entity. Data is not used in decision- making. Information is the processed form of data. Information is the output of computer. Information is meaningful. Information is normally short in volume. Information is normally available to people for sale. Information is easier to reproduce if lost. It can easily be reproduce from stored data. Information is used frequently. Information depends on data. Information is very important for decision-making.

6 Metadata. Metadata can be defined as data about data. Metadata describes the size, format and other characteristics of data. It also includes rules and constraints about data. For example when you create a table, you specify the data type, size format and other constraints for entering data in different fields of the table. This is the metadata of the table. Metadata is very important to ensure the integrity (reliability) of the data. DBMS MICROSOFT .NET

7 File Processing System
DBMS MICROSOFT .NET File Processing System Traditional or simple file processing is the first computer-based method to handle business application. In the past many organizations stored data in file or tape or disk. The data was managed using file-processing system. In a file processing system each department in an organization has its own set of files. These files are design specially for their own applications. The record in one file is not related to the records in other file.

8 Disadvantages Data Redundancy.
In file processing system, the same data may be duplicated in several files. Suppose there are two files ‘Students’ and ’Library’. The file student contains roll no, name, address and other college detail etc. The library file contains the name and Roll no of the students who get a book from library. The data of one student appear in two files. This is known as data redundancy. This redundancy causes higher storage. DBMS MICROSOFT .NET

9 DBMS MICROSOFT .NET Data inconsistency. Due to data redundancy their may be data inconsistency. Inconsistency means that two files may contain different data of the same student. For example if the address of the student changed it must be changed in both files. There is a possibility that it is changed in the student file and not from library file. The data become inconsistent in this situation.

10 DBMS MICROSOFT .NET Data isolation. Data in file processing system stored in various files. It become very difficult to write new application program to retrieve the appropriate data. Suppose student s are stored in Students file and fee information is store in fee file. The data from both the files is required to send an message to inform student that the data for the fee payment is over.

11 DBMS MICROSOFT .NET Integrity problems. Integrity means reliability and accuracy of data. The stored data must satisfy certain types of consistency constraints. For example roll no and marks of students should be numeric value. It is very difficult to apply these constraints on files in file processing system.

12 Program Data Dependency.
DBMS Program Data Dependency. Program data dependency is a relationship between data in files and program required to update and maintain the files. In file processing system application program are developed according to a particular file format in file processing system. If file format changed the application program also needs to be changed accordingly. For example, if there is a change in the length ho postal code, it requires change in the program. Note: Interface between user and database is called application or program. MICROSOFT .NET

13 Deduct money from Account A. Add the money to Account B.
Atomicity Problem. An operation on data may consist of different steps. A collection of all steps required to complete a process is known as transaction. The atomicity means that either one transaction should take place as a whole or it should not take place at all. Suppose user want to transfer money from account A to account B. This process consist of two steps: Deduct money from Account A. Add the money to Account B. DBMS MICROSOFT .NET

14 DBMS MICROSOFT .NET Suppose the system fail when computer has performed the first step. It means that the amount has been deducted from account A but has not been added to account B. This situation can make data inconsistent. File processing system does not provide the facility to ensure atomicity of data.

15 DBMS MICROSOFT .NET Security Problems. File processing system does not provide adequate security on data. In some situation it is required to provide different types of access to data for different users. For example a data entry operator should only be allowed to enter data. Such types of security options are not available in file processing system.

16 DBMS MICROSOFT .NET Database: Database is an organized collection of related data that is stored in an efficient and compact manner. The word organized means that data is stored in such a way that the user can use this data easily. The word related means that a database is normally created to store the data about a particular topic.

17 Examples of Databases: Phone Directory Library
DBMS MICROSOFT .NET The word efficient means that the user can search the required data quickly. The word compact means that the stored data occupies as little space as possible in computer. Examples of Databases: Phone Directory Library

18 Table: Table is a fundamental object of the database structure. The basic purpose of a table is to store data. A table consists of rows and columns. A table is a very convenient way to store data. The data in tables can be manipulated easily. Rows /Record: Row is the horizontal part of the table. It is a collection of related columns. DBMS MICROSOFT .NET

19 Fields can hold many types of data, the most common being
Columns/ Field: Columns are the vertical part of the table. Each field /column contains a distinct piece of data. Data Types: Fields can hold many types of data, the most common being Character (or string) Holds alphabetical characters and symbols (0,1,2,3,4 , #.~.$,% etc.) Numerical Holds numbers which can be; Real: , 5.0, or Integers: 1, 2, 300, -300 Date Holds a valid date, e.g. 29/09/1953 Logical Either TRUE or FALSE. DBMS MICROSOFT .NET

20 Primary Key/Field: A primary key is a field or combination of fields that uniquely identify a record in a table. A primary key is the field(s) that uniquely identifies each record, i.e. the primary key is unique for each record and the value is never duplicated in the same table. A constraint is a rule that defines what data is valid for a given field. So a primary key constraint is a rule that says that the primary key fields cannot be null and cannot contain duplicate data. Examples of Primary key fields are: National Insurance Number A car licence number Roll No DBMS MICROSOFT .NET

21 DBMS MICROSOFT .NET Foreign Key: A foreign key (sometimes called a referencing key) is a key used to link two tables together. Typically you take the primary key field from one table and insert it into the other table where it becomes a foreign key (it remains a primary key in the original table). A foreign key constraint specifies that the data in a foreign key must match the data in the primary key of the linked table.

22 UNIQUE/Candidate Key:
DBMS MICROSOFT .NET UNIQUE/Candidate Key: Unique Key is a candidate key to uniquely identify a row/record in a table. Difference between UNIQUE Key and PRIMARY key: A UNIQUE constraint is similar to PRIMARY key, but you can have more than one UNIQUE constraint per table. Another difference between primary key and unique key is that you can insert one null value in a unique key but cannot do this with primary key.

23 Advantages of Database Approach
DBMS MICROSOFT .NET Advantages of Database Approach Some important advantages of database approach are as follows: 1. Redundancy Control: The data in a database appears only once and is not duplicated. For example the data of a student in college database is stored the marks of the student in a table, only roll NO of the student will be used in second table.

24 DBMS MICROSOFT .NET 2. Data Consistency: An important benefit of controlling redundancy is that the data is consistent. If a data item appears only at one place, it is easy to maintain. If it is required to update data, the updation is performed at only one place. The chaing will automatically take effect at all places where ever this data is used.

25 3. Consistency Constraints:
DBMS MICROSOFT .NET 3. Consistency Constraints: Consistency constraints are the rules that must be followed to enter data in database. If the constraints are not fulfilled, data cannot be entered in database. Database management systems provide an easy way to apply different consistency constraints to ensure data consistency. For example, a constraint can be applied to ensure that the data is always entered in a specific range etc.

26 1. Deduct the money from account A. 2. Add the money to account B.
DBMS MICROSOFT .NET 4. Data Atomicity: A collection of all steps required to complete a process is known as transaction. Data atomicity means that either a transaction should take place as a whole or it should not take place at all. Let say transferring of money from account A to account B. This process consists of two steps: 1. Deduct the money from account A. 2. Add the money to account B.

27 DBMS MICROSOFT .NET Suppose that the system fails when the computer has performed the first step. It means that the amound has been deducted from account A but has not been added to account B. This situation can make data inconsistent. The database management system does not allow such a situation to happen. Database management system either executes both steps or does not execute any step.

28 DBMS MICROSOFT .NET 5. Data Security: Data security is the protection of the database from unauthorized access. The database management system provides several procedures to maintain data security. The security is maintained by allowing access to the database through the use of passwords. Not every user of database system should be able to access all the data.

29 DBMS MICROSOFT .NET In some situations, it is required to provide different types of access permission to data for different users. For example, a data entry operator should only be allowed to enter data. The chairman of the organization should be able to access or delete the data completely. Database management system provides different levels of security options for different users.

30 6. Reduced Development Time:
DBMS MICROSOFT .NET 6. Reduced Development Time: A database organizes data more efficiently than a file processing system. It is often easier and faster to develop programs that use this data. Many database management systems also provide several tools to assist in program development. So it reduces the overall time for developing applications.

31 DBMS MICROSOFT .NET 7. Easier Reporting: Reports are very important part of database applications. The reports are very essential for taking crucial decisions in an organization. The data in database is stored in an organized manner. It can easily be retrieved for creating different reports. The reports can be prepared very easily and quickly in required format in database management system.

32 DBMS MICROSOFT .NET 8. Compactness: The database management system stores data with compactness and efficiency. It requires less storage space than the file system. It saves the storage resources of the system and memory is not wasted.

33 DBMS MICROSOFT .NET 9. Data Sharing: Once a database is developed, it can be used by several users in the organization The database can also be shared by different applications, If a new application requires the same data, it can share the existing database instead of enveloping it again.

34 10. Increased Concurrency:
DBMS MICROSOFT .NET 10. Increased Concurrency: In some situation, two or more users may access the same filter simultaneously. It is possible that the accesses will interfere with each other This may result in loss of information or even loss of integrity. Many DBMS manage concurrent access and ensure such problems cannot occur.

35 11. Improved Backup and Recovery:
DBMS MICROSOFT .NET 11. Improved Backup and Recovery: In file-based systems, it is the responsibility of the user to protect data from failures of the computer system or application program. This may require taking backup of the data daily. If the data is lost, the backup is restored. The modern DMBS provide facilities to minimize the amount of processing that cab be lost due to a failure.

36 DBMS MICROSOFT .NET 12. Data Independence:   Database approach provides the facility of data independence. It means that the data and the application programs are separate from each other. It is possible to change data storage structures and operations without changing the application programs.

37 Disadvantages of Database Approach
DBMS Disadvantages of Database Approach Although advantages of using database outclass their disadvantages anyhow some of the disadvantages of using database are as follows: 1. High cost of DBMS: A complete database management system is very large and sophisticated (complicated) software. It is expensive to purchase database management software. MICROSOFT .NET

38 DBMS MICROSOFT .NET 2. Higher Hardware Cost: Database management systems are complicated and heavy software. Additional memory and processing power may be required to run the DBMS. It may require more powerful hardware.

39 3. Higher Programming Cost:
DBMS MICROSOFT .NET 3. Higher Programming Cost: DBMS is complex software with many features. The programmers need a thorough knowledge of system to use it to best advantage. If the organization hires experienced database programmers, it had to pay extra cost for this expertise.

40 DBMS MICROSOFT .NET 4. High Conversion Cost: If an organization converts its records to database, data had to be converted form files to database system. Because of the different formats used by different systems, it may be a difficult and time-consuming process. Moreover, the structure and data may also have to be modified according to the requirements of DBMS.

41 5. More chance of Failure:
DBMS MICROSOFT .NET 5. More chance of Failure: In database management system , all resources and components are centralized. If any of these componenets fails, the whole system stops. 6. Complexity: A complete Database management system (DBMS) has to perform many tasks that make it complex and complicated software.

42 DBMS MICROSOFT .NET File Processing vs. Database Approach:
File-Base Approach Database Approach DBMS MICROSOFT .NET The program and data are interdependent. The data may be duplicated in different files that cause data redundancy. The same data in different files may be different that creates inconsistency. The data is separately stored in different files and it is difficult to application to retrieve the appropriate data. The data is distributed in many different files and cannot be shared. It is difficult to apply data integrity checks on files. It provides poor security as the data is widely spread. It is difficult to maintain as it provides less controlling facilities. It is less complex system. The cost is very less than DBMS. If one application fails it did not affect the other. The program and data are independent of each other. The data is not duplicated and appears only once. Data appears only once so it is always consistent. The data is stored in tables which are linked together. The application can retrieve the required data easily. The data is stored at one place and can be shared easily. Database approach provides many constraints for data integrity. It provides many procedures to maintain data security. It provides many facilities to maintain the programs easily. It is very complex system. The cost is much more than file system. All application relying on database fail if the database fails.

43 Database Management System:
A database management system (DBMS) is a collection of programs that are used to create and maintain a database. DBMS is a software System that provide the following facilities: It provides the facility to define the structure of database. (It provides the facility to define data type, size, format and other constraint on database). It provides the facility to secure the database. DBMS MICROSOFT .NET

44 It provides the facility to store data on some storage medium.
DBMS MICROSOFT .NET It provides the facility to store data on some storage medium. It provides the facility to delete data from some storage medium. It provides the facility to update or edit data from some storage medium. It provides the facility to retrieve or get date from some storage medium.

45 DBMS MICROSOFT .NET Application Program. An application program is a program that is used to send commands to the database management system to manipulate database. These commands are sent to DBMS through graphical user interface. The user interacts with application program. The application program further interacts with database management system.

46 Relation of application program and database Management System.
DBMS MICROSOFT .NET Relation of application program and database Management System. The application program contains the user interface. The user uses this interface for communicating with the DBMS to manipulate database. The application program is called front-end and database is known as back-end.

47 The relationship of application program and database management
DBMS MICROSOFT .NET The relationship of application program and database management system is very important. When a database program is developed, a way of communication with the program is required for the user. The user cannot use the database directly. An easy and simple interface is required so that the user can easily use the database.

48 Application Programmers. End Users. Naïve Users Sophisticated Users
Another important relationship of DBMS and application program is that it is used to produce effective and informative report in application programs. These reports are very important for any organization for taking decision about business. Types of Users. Application Programmers. End Users. Naïve Users Sophisticated Users Database Administrator. DBMS MICROSOFT .NET


Download ppt "Introduction to Database Management System"

Similar presentations


Ads by Google