INTRODUCTION TO RELATIONAL DATABASE MANAGEMENT SYSTEM ppsx

28 460 0
INTRODUCTION TO RELATIONAL DATABASE MANAGEMENT SYSTEM ppsx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

LESSON: 1A INTRODUCTION TO RELATIONAL DATABASE MANAGEMENT SYSTEM Objectives In this lesson, you will learn to: Define a Database Management System (DBMS) Identify the different DBMS users Describe the need for a database system Define the architecture of a DBMS in terms of: External level Conceptual level Internal level Identify the functional components of a DBMS Identify the need for database planning Identify the stages in the Database Development Life Cycle (DDLC) Identify the effects of poor database planning and design 1A.1 Relational Database Design Introduction to Relational Database Management System Objectives In this section, you will learn to: • • • • • • • • ©NIIT Define a Database Management System (DBMS) Identify the components of a DBMS Describe the need for a database system Define the architecture of a DBMS in terms of: • External level • Conceptual level • Internal level Identify the functional components of a DBMS Identify the need for database planning Identify the stages in the Database Development Life Cycle (DDLC) Identify the effects of poor database planning and design Introduction to Relational Database Management System Lesson / Slide of 12 INSTRUCTOR NOTES Lesson Overview The lesson introduces the concept of a database management system (DBMS) and the various users of a DBMS This lesson also covers the benefits, components, and architecture of a DBMS In addition, this lesson explains the need for database planning and design and the stages in the database development life cycle Relational Database Design 1A.2 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM Introduction to Relational Database Management System Introduction to Database Management System ã ã ã âNIIT A database is a collection of records Database management systems are designed to maintain large volumes of data The main objectives of any DBMS are to: • Provide an efficient and convenient environment that is used to store data in and retrieve data from a database • Manage information about users who interact with the DBMS and the activities that these users can perform on the data Introduction to Relational Database Management System Lesson / Slide of 12 A database is a collection of records One of the major tasks in a computer system is to store and manage data To handle this task, you need a specialized computer software known as a Database Management System (DBMS) Database management systems are designed to maintain large volumes of data Management of data involves: Defining structures for data storage Providing mechanisms for data manipulation Providing data security against unauthorized access Database management systems are now available on a wide range of computers, from desktops to mainframes The size and power of the computer determine the system facilities, such as security and storage 1A.3 Relational Database Design A single-user system allows only one person to access a database at any given time In a multi-user system, several users can access a database simultaneously With the increasing power of desktop computers, multi-user database systems are now available that support a small group of users to connect to these desktop computers and access data concurrently These database systems can be scaled up to support hundreds or thousands of users, depending on the configuration of the hardware on which the database system is running The main objectives of any DBMS are to: Provide an efficient and convenient environment that is used to store data in, and retrieve data from a database Manage information about users who interact with the DBMS and the activities that these users can perform on the data Users Introduction to Relational Database Management System Users ã âNIIT There are three types of DBMS users: • Application Programmers: Application programmers write application programs that help an end user to use the database • End Users: End users interact with a DBMS either by invoking an application program or by writing queries in a database query language • Database Administrators (DBAs): Database Administrators (DBAs) coordinate the function of collecting information about the data to be stored, and designing and maintaining the database and its security Introduction to Relational Database Management System Relational Database Design Lesson / Slide of 12 1A.4 A DBMS user can perform the following activities on a database: Add files to the database Insert data in the existing files Retrieve data from the files Update data in the files Delete data from the files Remove the existing files from the database Enforce security and integrity rules There are three types of DBMS users: The Application Programmer The End User The Database Administrator (DBA) The Application programmers write application programs that help an end user to use the database These programs are usually written in languages, such as C, C++, Visual Basic and Visual C++ The programs process data in the database to retrieve, insert, delete, or modify data End users interact with a DBMS either by invoking an application program or by writing queries in a database query language The database query language allows the end user to perform basic operations, such as retrieving, deleting, inserting, and updating data Database Administrators (DBA) coordinate the function of collecting information about the data to be stored, and designing and maintaining the database and its security The database must be designed and maintained to provide the right information to the authorized people 1A.5 Relational Database Design INSTRUCTOR NOTES Introduction to Database Management System You can give the following additional information about databases: A database is a collection of information organized in such a way that a computer program can quickly select the desired data You can think of a database as an electronic filing system Traditional databases are organized by fields, records, and files A field is a single unit of information; a record is one complete set of fields; and a file is a collection of records For example, a telephone book is analogous to a file It contains a list of records, each of which consists of three fields: name, address, and telephone number Before you list the activities that a user can perform on a database, ask the students what according to them are these possible activities This will make the session interactive and force the students to think Relational Database Design 1A.6 WHY USE A DATABASE MANAGEMENT SYSTEM? Introduction to Relational Database Management System Why use a Database Management System? ã ã âNIIT The conventional approach to database processing has the following drawbacks: • Duplication of data • Inconsistent data Some benefits of the database approach are: • Redundancy is reduced • Inconsistency is avoided • Data is shared • Standards are enforced • Security restrictions are applied • Integrity is maintained Introduction to Relational Database Management System Lesson / Slide of 12 Before the advent of database management systems, the conventional approach to data processing was followed In the conventional approach, a program (or a set of programs) is developed for each application This results in one or more data files for each application Some of the data may be common between files However, one application may require the file to be arranged on a particular field, while another application may require the file to be arranged on another field A major drawback of the conventional method is that the storage and access techniques are built into the programs Therefore, though the same data may be required by two applications, the data is stored in two different places because each application requires different data storage 1A.7 Relational Database Design For example, consider the scenario of a university Association Between Application and Data Files A university typically needs to record certain data about its courses, the students who take the courses, the semesters when the courses are offered, and the instructors who teach the courses Therefore, the university needs to record data for COURSE, STUDENT, INSTRUCTOR, and SEMESTER The course scheduling application requires data from the course data file and the student data file The student admission application requires data from the student data file For the course scheduling application, the data in the student data file is arranged according to the course code selected by the student In the student admission application, the data in the student file is arranged on the date of registration of the student Therefore, though the same data file was required by multiple applications, it had to be duplicated and stored at multiple locations so that each application could access the file The conventional approach to database processing has the following drawbacks: Duplication of Data: The course data file contains information about various courses The information includes course code, course name, course description etc This information is required by the instructors’ schedules application and the semester planning application In other words, the same data is required by multiple applications But instead of storing this information in one file, separate files are used by different applications This repetition of data is referred to as data redundancy Relational Database Design 1A.8 Inconsistent Data: Because the same data is stored in different places, inconsistency creeps in For example, the student admission application adds ten students to the student data file The data of these ten students have to be updated in the student data file used by the course scheduling application If this change is not made in all files, the university will have inconsistent data in different files Benefits of the Database Approach Database Approach A major advantage that the database approach has over the conventional approach is that a database management system provides centralized control of data Following are some of the benefits of the database approach: Redundancy is reduced: In the database approach, applications not have to maintain their own data files The same course data file is used by the course scheduling application, the instructor scheduling application, and the semester planning application Inconsistency is avoided: Because redundancy is reduced, inconsistency is also avoided Consider a situation where ten students have enrolled for a course This information is stored in the student data file The other applications will use the same student file and therefore, no inconsistency can occur If this information is recorded in more than one place, inconsistency can occur, as changes made in one data file may not get reflected in another data file 1A.9 Relational Database Design Data is shared: While the existing applications can share data in the database, new applications can also be developed that will use the same database Standards are enforced: With centralized control of data, the DBA can ensure that standards are maintained in stored data formats This is particularly useful for data interchange, or migration of data between two systems Security restrictions are applied: The DBA ensures that only authorized persons have access to the database The DBA defines the security checks to be carried out Different checks can be applied to different operations on the same data For instance, a person may have access to query a file, but may not have the right to delete or update that file Integrity is maintained: Inconsistency between two entries can lead to integrity problems Even without redundancy, the database can still be inconsistent For example, a student enrolls in 10 courses when the maximum number of courses a student can enroll in is seven Or, a student enrolls in a course that is not being offered in that semester Such problems can be avoided in a DBMS by establishing certain integrity checks that are performed with any update operation INSTRUCTOR NOTES Why use a Database Management System? First, ask the students the following question to make them think about the conventional approach of data processing What according to you are the features of the conventional approach of data processing? Can you give some examples? Then, explain the conventional approach and its disadvantages Relational Database Design 1A.10 the conceptual levels, while the other is between the conceptual and the internal levels The external-conceptual mapping determines the correspondence between the conceptual and the user views This specifies how a user views the conceptual data The conceptual-internal mapping determines the correspondence between the conceptual and internal views It specifies how the conceptual data is stored The first step in designing a database is to define the conceptual level The conceptual level is then mapped to the external level Each user view and the requirement is taken into consideration Next, the conceptual-internal mapping is done The way data is stored is derived from the conceptual level This three-level architecture of a DBMS helps achieve data independence INSTRUCTOR NOTES Architecture of a Database Management System You can give the following additional information about the external level: The external view is defined by means of the external schema The external schema is a definition of the various types of records in that external view The external schema is written using DDL statements You can ask the following questions to test the students on the concepts covered in this topic Which portion of the database is visible to the user? Which three subordinate languages constitute the query language? The physical storage of data is described at which level? Solutions External view DDL, DML, and DCL Internal level Relational Database Design 1A.14 FUNCTIONAL COMPONENTS OF A DATABASE MANAGEMENT SYSTEM Introduction to Relational Database Management System Functional Components of a Database Management System ã âNIIT The functional components of a database management system are: • Database manager: The database manager is the central software component of a DBMS It is responsible for converting user queries to appropriate system calls • File manager: The file manager services all requests for data It identifies the block containing the requested record • Disk manager: The disk manager performs all the physical input and output Introduction to Relational Database Management System Lesson / Slide of 12 A database management system comprises many modules each dealing with a specific responsibility of the overall system The functional components of a database management system are: The database manager The file manager The disk manager Database Manager The database manager is the central software component of a DBMS It is responsible for converting user queries to appropriate system calls It maintains the consistency and integrity of the database and enforces data security It also synchronizes the 1A.15 Relational Database Design simultaneous operations performed by concurrent users Apart from these, it also handles backup and recovery operations File Manager The file manager services all requests for data It identifies the block containing the requested record The block is then requested from the disk manager The file manager selects the requested record from the block and transmits it to the database manager The file manager is also responsible for managing storage space and structures Disk Manager The disk manager performs all the physical input and output It interacts with the file manager and does a read or write on the storage device as requested by the file manager It views all data as raw data The operations performed by the disk manager are: Retrieves blocks of data Replaces blocks of data Removes blocks of data INSTRUCTOR NOTES Functional System Components of a Database Management You can give the following additional information about the database manager: The database manager component of a database system should be able to support multiple clients simultaneously or concurrently This implies that when a user is reading data from a table, another user should not be able to update the same table Similarly, updates made by a user should be made available to other users Relational Database Design 1A.16 You can give the following additional information about the components of a database management system: Some other components of a DBMS are: Query processor: This component translates statements in a query language to a form that the database manager understands It is also responsible for transforming a user’s request into an equivalent but more efficient form DML precompiler: This component converts the embedded statements in the query language to its equivalent form in the host language It interacts with the query processor to generate the appropriate code DDL compiler: This component converts DDL statements to a set of files that contain data about the data This is the system database that holds information on the files created, the fields in the files, the users who have access rights to these files, and other such information This information is stored in the data dictionary 1A.17 Relational Database Design DATABASE DESIGNING AND PLANNING Introduction to Relational Database Management System Database Designing and Planning ã ã âNIIT Database planning is a strategic process of finding out the information needs of an organization for an extended period in the future The advantages of database planning are: • It gives a clear picture of the management’s current understanding of the information resource • It finds and justifies resource requirements This helps ensure the availability of resources • It helps in effective resource management This includes proper cooperation between divisions within the organization • It helps specify action plans for achieving the set objectives • It helps develop an appropriate database that meets the organization’s requirements Introduction to Relational Database Management System Lesson / Slide of 12 To ensure proper movement from fragmented data to shared data using a DBMS, it is essential to database planning Database planning is a strategic process of finding out the information needs of an organization for an extended period in the future Database planning is the first activity in all operational projects It helps to design and implement databases Need for Database Planning Database planning results from the information needs of an organization Creating a database plan gives a clear idea about the kind of database that is needed and can be afforded by the organization The database plan also helps explore the current information and data-tracking systems and identify future needs In addition, the database plan helps you to understand how information moves in an organization Relational Database Design 1A.18 The advantages of database planning are as follows: It gives a clear picture of the management’s current understanding of the information resource It finds and justifies resource requirements This helps ensure the availability of resources It helps in effective resource management This includes proper cooperation between divisions within the organization It helps specify action plans for achieving the set objectives It helps develop an appropriate database that meets the organization’s requirements Database Development Life Cycle Introduction to Relational Database Management System Database Development Life Cycle ã âNIIT The DDLC consists of the following six stages: • Preliminary planning: At this stage, the organization obtains information about the applications being used • Feasibility study: This stage involves determining technological, operational, and economic feasibility of a database • Requirements definition: This stage involves determining the scope of the database, management and functional area information requirements, and hardware and software requirements • Conceptual design: At this stage, you need to create the conceptual schema for the database • Implementation: At this stage, you need to select a DBMS and purchase it Then, you need to convert the detailed conceptual model to the implementation model of the DBMS • Database evaluation and maintenance: This stage involves evaluating the performance of the implemented database Introduction to Relational Database Management System Lesson / Slide of 12 You need to follow a process for designing and implementing databases for an organization This process is referred to as the Database Development Life Cycle (DDLC) The DDLC consists of the following six stages: Preliminary planning 1A.19 Relational Database Design Feasibility study Requirements definition Conceptual design Implementation Database evaluation and maintenance Preliminary Planning This is the first stage in any database development project In this stage, the organization finds answers to the following questions: How many application programs are being used? What functions are performed by the application programs? What are the files associated with each application? What new applications and files are being developed? The information obtained is then used to determine relationships between applications and find uses of application information This information also helps to find future system requirements and review the financial benefits of a database system Feasibility Study Feasibility study involves determining technological, operational, and economic feasibility of a database In the feasibility study, a report is prepared based on the answers to the following questions in each phase: Technological feasibility: Is the technology required to support database development available? Operational feasibility: Is the personnel, budget, and internal expertise required for implementing a database system available? Economic feasibility: What are the benefits? Can benefits and costs be measured? The focus of each phase is as follows: Technological feasibility study is done to determine whether hardware and software required to fulfill the information needs are available This includes analysis of whether the resources and capabilities are present in the Relational Database Design 1A.20 organization or they need to be purchased In addition, it is determined whether training is needed Operational feasibility study involves determining the availability of skill and personnel required to implement the database system Economic feasibility is the cost-benefit study of the proposed database system The benefits of implementing a database system can be found by answering the following questions: How soon can you expect benefits? Is data sharing between different departments feasible? What applications will be implemented? What benefits are expected from these applications? What are the competitors doing? How will the database system help in achieving long-term corporate plans? The cost of software, hardware, and programming associated with database implementation are also determined In addition to these, the hidden costs that result from unexpected changes are calculated For example, a software change might require hardware upgrades to ensure satisfactory performance Requirements Definition At this stage, the following are determined: Scope of the database Management and functional area information requirements Hardware and software requirements You can find information requirements by using questionnaire responses, interviews with employees, and reports and forms being used You need to expand the general information model created during database planning to models for each functional area These models then form the basis of detailed database design You can perform the following tasks for requirements definition: Analyze the information requirements to define the database system scope You can determine whether the database should be centralized or distributed Create a brief narrative describing the scope of the system Document the user requirements at operational and managerial levels The documentation should also include a generalized information model for each functional area and the definitions of the applications required to fulfill the 1A.21 Relational Database Design requirements This documentation can be supported with narratives from user interviews, reports, forms, and answers to questionnaires Establish the general hardware and software requirements accompanied with the performance levels to be supported For this, you need to obtain the following information: Number of users normally accessing the system Number of transactions taking place on the system every day Amount of printing that would be required This information helps determine the type of DBMS needed It also helps determine the disk space and printing support required You can support this information with a narrative report that includes figures showing the hardware and software configurations Draft a plan for a time-phased development of the database system Also, include the identification of initial applications The applications should be small and noncritical This is to reduce the influence of any problems in the implementation of a database Another way is to make applications for users who strongly support implementation of a database system Conceptual Design At this stage, you need to create the conceptual schema for the database The conceptual schema includes the data elements, relationships between these data elements, and constraints You need to develop specifications to the point from which you can begin implementation First, create detailed models of user views in different functional areas Next, integrate these models into a single detailed conceptual data model This gives the conceptuallevel database schema You will learn about conceptual data models later Implementation At this stage, you need to select a DBMS and purchase it Then, you need to convert the detailed conceptual model to the implementation model of the DBMS Next, you need to build the data dictionary, populate the database, develop the application programs, and provide training to the users The data dictionary is a central storage of data structure definitions in the database It contains information about security rules, access authority, and related controls The data dictionary is also used to enforce data standards and remove problems that arise while sharing data between applications Therefore, the data dictionary functions as the control center of the database system As a result, building the data dictionary is an important step in implementation Relational Database Design 1A.22 Database Evaluation and Maintenance This stage involves evaluating the performance of the implemented database For this, you can interview the users to determine if any of their requirements have not been met Then, you can make the required changes to the database Maintenance of the system is done by introducing enhancements and adding new programs and data elements These changes are in accordance with the changing business needs Effects of Poor Database Planning and Design Introduction to Relational Database Management System Effects of Poor Database Planning and Design ã âNIIT If you not give ample amount of time and effort to database planning and design, the database can eventually fail Introduction to Relational Database Management System Lesson / Slide of 12 If you not give ample amount of time and effort to database planning and design, the database can eventually fail The main reasons of database failure are as follows: The key employees who will be using the database are left out from the planning and design process The database collects too much or too little information 1A.23 Relational Database Design The database cannot be modified easily to suit the changes in the business needs The time gap between the purchase of the database system and its implementation is less The database system is not tested before populating data in the database Limited or no training is provided to the employees who will use the database Continuity in the planning process is lost when there is a change in the staff There is lack of commitment while allocating resources (time and money) to the database development project INSTRUCTOR NOTES Database Designing and Planning After explaining the concept of database planning, ask the students the following question to make the session interactive: What are the advantages of database planning? After the students come up with some advantages, you can elaborate on these Before listing the causes of a database failure, ask the students about the causes This will enhance the learning as the students think about what could be the causes Relational Database Design 1A.24 SUMMARY Introduction to Relational Database Management System Summary In this lesson, you learned that: • A DBMS is a collection of interrelated data and a set of programs to access this data • The main objectives of any DBMS are to: • Provide an efficient and convenient environment that is used to store data in and retrieve data from a database • Manage information about users who interact with the DBMS and the activities that these users can perform on the data • The users of a DBMS can be broadly classified into application programmers, end-users, and database administrators (DBA) ©NIIT 1A.25 Introduction to Relational Database Management System Relational Database Design Lesson / Slide of 12 Introduction to Relational Database Management System Summary (Contd ) • • • ©NIIT A DBMS provides the following benefits: • Reduced redundancy • Consistency • Data sharing • Standards enforcement • Security restrictions • Integrity The database architecture consists of the external level, the conceptual level, and the internal level The functional components of a DBMS are: • Database manager • File manager • Disk manager Introduction to Relational Database Management System Relational Database Design Lesson / Slide 11 of 12 1A.26 Introduction to Relational Database Management System Summary (Contd ) ã ã ã âNIIT Database planning is a strategic process of finding out the information needs of an organization for an extended period in the future It helps to design and implement databases The Database Development Life Cycle (DDLC) consists of the following six stages: • Preliminary planning • Feasibility study • Requirements definition • Conceptual design • Implementation • Database evaluation and maintenance If you not give ample amount of time and effort to database planning and design, the database can eventually fail Introduction to Relational Database Management System Lesson / Slide 12 of 12 In this lesson, you learned that: A DBMS is a collection of interrelated data and a set of programs to access this data The main objectives of any DBMS are to: Provide an efficient and convenient environment that is used to store data in, and retrieve data from a database Manage information about users who interact with the DBMS and the activities that these users can perform on the data Data in a database should be integrated and shared The users of a DBMS can be broadly classified into application programmers, end-users, and database administrators (DBA) A DBMS provides the following benefits: Reduced redundancy Consistency Data sharing Standards enforcement 1A.27 Relational Database Design Security restrictions Integrity The database architecture consists of the external level, the conceptual level, and the internal level The functional components of a DBMS are: Database manager File manager Disk manager Database planning is a strategic process of finding out the information needs of an organization for an extended period in the future It helps to design and implement databases The Database Development Life Cycle (DDLC) consists of the following six stages: Preliminary planning Feasibility study Requirements definition Conceptual design Implementation Database evaluation and maintenance If you not give ample amount of time and effort to database planning and design, the database can eventually fail Relational Database Design 1A.28 ... the database development life cycle Relational Database Design 1A.2 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM Introduction to Relational Database Management System Introduction to Database Management. .. disadvantages Relational Database Design 1A.10 ARCHITECTURE OF A DATABASE MANAGEMENT SYSTEM Introduction to Relational Database Management System Architecture of a Database Management System • •... Introduction to Relational Database Management System Relational Database Design Lesson / Slide 11 of 12 1A.26 Introduction to Relational Database Management System Summary (Contd ) ã ã ã âNIIT Database

Ngày đăng: 01/08/2014, 09:22

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan