Ticker

6/recent/ticker-posts

Database Management System (DBMS) Chapter 1 Grade 10 Computer Engineering

 

Unit 1: Introduction to database system and architecture

Basic Terminology used in DBMS

·         Data:  Raw facts and figures are called data. It may be number, figure, character or symbol.

·         Information: Information is organized or classified data, which has some meaningful values for receiver. It is the processed data on which decisions and action are based.

·         Database: A Database is a collection of related data organized in a way that data can be easily accessed, managed and updated. For Example: phone diary, customer records, result sheet.

·         Field: Field is the property of a table. It is often referred to as attribute.

·         Record: Record is the collection of related fields which represents a complete unit as information. A single entry in a table is called a Record

·         Table/RelationA table is a collection of data elements organized in terms of rows and columns.[Nt1] 

·         Tuple: A single row of a table which contains a single record for that relation is called tuple.

·         Domain: A domain is a unique set of values permitted for an attribute in a table.

·         Instance: The collection of information stored in a database at a particular instant is called an instance.

·         Relational Instance: The finite set of tuples in the relational database system is called relational instance.

·         Schema: The complete design of the database (data and their relationships) is called the database schema. A database schema is the skeleton structure that represents the logical view of the entire database.

·         Database System or DBMS: A DBMS is software that allows creation, definition, manipulation of database. Popular DBMS are Oracle, MySQL, and Microsoft Access.

·         RDBMS: The software used to store, manage, query, and retrieve data stored in a relational database is called a relational database management system (RDBMS).

·         Catalog/Data dictionary: A data dictionary is a file or a set of files that contains a database's metadata.

·         Relational model constraints: Relational model constraints are restrictions specified to the data values in the relational database.

Objective/Need of Database Management System (DBMS):

·         To provide storage for mass amount of relevant data.

·         To eliminate data redundancy.

·         To allow multiple users to access data at one time.

·         To take the latest modification to the database available immediately.

·         To protect data from unauthorized access.

·         To ensure data atomicity and data integrity.

In short, the objective of a DBMS is to provide a convenient and effective method of defining, storing and retrieving the data in the database.

Database is needed to organize and store large amount of data making it easily accessible.

Application of DBMS:

·         Online ShoppingThese days, web-based shopping has become a major pattern. Nobody needs to visit the shop and burn through their time. Everybody can shop through web based shopping sites, (for example, Amazon, Flipkart, Snapdeal) from home. So all the items are sold and added uniquely with the assistance of the information base administration framework (DBMS). Receipt charges, installments, buy data these are finished with the assistance of DBMS. 

·         Telecommunication:  Any telecommunication company cannot even think about its business without DBMS. There is a database to keeps track of the information regarding calls made, network usage, customer details etc. Without the database systems it is hard to maintain that huge amount of data that keeps updating every millisecond.

·         Library Management System: There are thousands of books in the library so it is very difficult to keep record of all the books in a copy or register. So DBMS is used to maintain all the information related to book issuing dates, name of the book, author, and availability of the book.

·         Schools and colleges: Database systems are frequently used in schools and colleges to store and retrieve the data regarding student details, staff details, course details, exam details, payroll data, attendance details, fees details etc. There is a lot amount of inter-related data that needs to be stored and retrieved in an efficient manner.

·         Social Media sites: We all are on social media websites to share our views and connect with our friends. Daily millions of users signed up for these social media accounts like Facebook, Twitter, Pinterest, and Whatsapp. But how all the information of users is stored and how we become able to connect to other people, yes this is all because of DBMS.

·         Banking System: For storing customer info, tracking day to day credit and debit transactions, generating bank statements etc. All this work has been done with the help of Database management systems.

Advantages of DBMS:

Ø  Reduces data redundancy: Redundancy occurs when the same data are stored unnecessarily at different places. Data Redundancy is reduced or eliminated in DBMS because all data are stored at a centralized location.

Ø  Inconsistency can be avoided: When the same data is duplicated and changes are made at one site, which is not propagated to the other site, it gives rise to inconsistency and the two entries regarding the same data will not agree. While this is not the case with DBMS systems as there is a single repository of data that is defined once and is accessed by many users, and data are consistent.

Ø  Data security: DBMS systems provide a strong framework to protect data privacy and security. DBMS ensures that only authorized users have access to data and there is a mechanism to define access privileges.

Ø  Data concurrency: In DBMS, Data are stored in one or more servers in the network and that there is some software locking mechanism that prevents the same set of data from being changed by two people at the same time.

Ø  Fast and ease in data accessing: In traditional file-based approach, it might take hours to look for very specific information that might be needed in the context of some business emergency, while DBMS reduces this time to a few seconds. This is a great advantage of DBMS because we can write small queries which will search the Database and it will retrieve the information in the fastest way possible due to its inbuilt searching operations.

Ø  Data Backup and recovery: This is another advantage of DBMS as it provides a strong framework for Data backup, users are not required to back up their data periodically and manually, it is automatically taken care by DBMS. Moreover, in case of a server crash, DBMS restores the Database to its previous condition.

Ø  Data Atomicity: An atomic transaction is one in which all of the database actions occur or none of them do. It is the duty of DBMS to store a complete transaction in the database. If any transaction is partially completed, then it rolls backs them. For e.g. If we make an online purchase, money is deducted from our account while if the purchase is somehow failed, then no money is deducted or if it gets deducted, it gets returned within few days.

Ø  Data can be shared: Data Sharing is the primary advantage of Database management systems. DBMS system allows users and applications to share Data with multiple applications and users.

Ø  Integrity can be enforced: Integrity of data means that the data stored in database is always accurate. In order to maintain the integrity of data, some integrity constraints are enforced on database. DBMS provide capabilities for defining and enforcing such constraints.

Disadvantages of DBMS:

Ø  Complexity: The provision of the functionality that is expected of a good DBMS makes the DBMS an extremely complex piece of software. Database designers, developers, database administrators and end users must understand this functionality to take full advantage of it. Failure to understand the system can lead to bad design decisions, which can have serious consequences for an organization.

Ø  High cost: The high cost of software and hardware is the main disadvantage of the database management system. Database users require a high-speed processor and huge memory size to use the database on the DBMS. Sometimes, users require costly machines for maintaining databases. Organizations need a trained and highly paid technical database administrator for using and maintaining the large database systems.

Ø  High Size: The complexity and breadth of functionality makes the DBMS an extremely large piece of software, occupying many megabytes of disk space and requiring substantial amounts of memory to run efficiently.

Ø  Performance: Typically, a File Based system is written for a specific application, such as invoicing. As result, performance is generally very good. However, the DBMS is written to be more general, to cater for many applications rather than just one. The effect is that some applications may not run as fast as they used to.

Database Manager

A database manager (DB manager) is a computer program, or a set of computer programs, that provide basic database management functionalities including creation and maintenance of databases. [Nt2] Database managers have several capabilities including the ability to back up and restore, attach and detach, create, clone, delete and rename the databases. It is a part of DBMS.

Database Users

Database user is a person who can work with database. In other words, Database users are the those who really use and take the benefits of the database. The database users interact with database objects. There will be different types of users depending on their needs and way of accessing the database.

  1. Naive Users/Parametric End User – Naïve Users are the unsophisticated who don’t have any DBMS knowledge but they frequently use the database applications in their daily life to get the desired results. For examples, Railway’s ticket booking users are naive users. Clerks in any bank is a naive user because they don’t have any DBMS knowledge but they still use the database and perform their given task.
  2. Sophisticated Users – The sophisticated users interact with database without programs or application, however, they proceed their request in a database by using query language like SQL. These users will be scientists, engineers, analysts who thoroughly study SQL and DBMS to apply the concepts in their requirements.
  3. Application Programmers – Application Program are the computer professionals who writes the code for the application programs that uses the database. These programs could be written in Programming languages such as C, FORTRAN, COBOL etc. They interact with DBMS through DML (Data manipulation language) calls. For example, writing a C program to generate the report of employees who are working in a particular department will involve a query to fetch the data from the database. It will include an embedded SQL query in the C Program.
  4. Specialized Users – These are also sophisticated users, but they write special database application programs such as CAD (computer Aided Design), CAM (computer Aided Machine). They are the developers who develop the complex programs according to the requirement.
  5. System Analyst – System Analyst is a user who analyzes the requirements of parametric end users. They check whether all the requirements of end users are satisfied.

Database Administrator (DBA)

A database administrator (DBA) is the information technician responsible for directing or performing all activities related to maintaining a successful database environment. The DBA has all the system privileges allowed by the DBMS and can assign (grant) and remove (revoke) levels of access (privileges) to and from other users.

Qualities of good DBA:

·         They should have sound knowledge about database system, database design, normalization process, SQL commands, Form etc.

·         They should have depth knowledge of OS in which database is running.

·         They should have sound understanding of network architecture.

·         They should have good knowledge of database server.

Responsibilities of DBA:

·         To plan the data storage structure and access strategy.

·         To make decision related to backup content and monitor the performance of database system.

·         To provide support to the database users.

·         To define data security and integrity checks.

·         To install and upgrade database server.

·         To create user manuals, give training, and describes the entire facilities offered by the system.

Organization of database/Data Abstraction

Hiding the complexity in the data structure for storing data in a database in various levels is called data abstraction. The organization of database or data abstraction represents the major purpose of database i.e. to provide user with an abstract view as data. The three different levels of data abstraction are:

·         Physical level: The physical level is the lowest level of data abstraction which explains how data is actually stored in hardware components. e. Viewing database at this level is called physical view.

·         Logical level: This is the intermediate level of abstraction. Logical level of data abstraction includes the data stored in the database and the relationships existing among those data. Viewing database at this level is called Logical view or conceptual view. Programmers are usually working at this level using programming languages.

·         View level: This is the highest level of data abstraction. This level includes only the portion of the database to a user or an application program. Usually a user need not access the entire database. Based on his needs, the user wants to access only a portion of the database and to simplify his interaction with the system, this level of abstraction is defined. Any number of view may exist for the same database. Example: A clerk in the college administration system need to access only the fee amount of the students, not their academic information like marks.

Database Architecture

The design of a DBMS depends on its architecture. It can be centralized or decentralized or hierarchical. The architecture of a DBMS can be seen as either single tier or multi-tier. But logically, database architecture is of two types like: 2-tier architecture and 3-tier architecture.

Types of DBMS Architecture:

1-Tier Architecture: In this architecture, the database is directly available to the user. It means the user can directly sit on the DBMS and uses it. Any changes done here will directly be done on the database itself. It doesn't provide a handy tool for end users. The 1-Tier architecture is used for development of the local application, where programmers can directly communicate with the database for the quick response.

2-Tier Architecture: The 2-Tier architecture is same as basic client-server. In the two-tier architecture, applications on the client end can directly communicate with the database at the server side. For this interaction, API's like: ODBCJDBC are used. The user interfaces and application programs are run on the client-side. The server side is responsible to provide the functionalities like: query processing and transaction management. To communicate with the DBMS, client-side application establishes a connection with the server side.


Fig: 2-tier Architecture

3-Tier Architecture: The 3-Tier architecture contains another layer between the client and server. In this architecture, client can't directly communicate with the server. The application on the client-end interacts with an application server which further communicates with the database system. End user has no idea about the existence of the database beyond the application server. The database also has no idea about any other user beyond the application. The 3-Tier architecture is used in case of large web application.


Fig: 3-tier Architecture

Client server Architecture:

Client Server Architecture is a computing model in which the server hosts, delivers and manages most of the resources and services to be consumed by the client. This type of architecture has one or more client computers connected to a central server over a network or internet connection. Clients are often situated at workstations or on personal computers, while servers are located elsewhere on the network, usually on more powerful machines.

                                                  

In this architecture, client computers provide an interface to allow a computer user to request services of the server and to display the results the server returns. When any client requires additional functionality like database access, it can connect to Server that is capable of providing the functionality needed by the client. Servers wait for requests to arrive from clients and then respond to them. This computing model is especially effective when clients and the server each have distinct tasks that they routinely perform. In hospital data processing, for example, a client computer can be running an application program for entering patient information while the server computer is running another program that manages the database in which the information is permanently stored.

File Processing System: 
It is the traditional way of storing data electronically. In Computer Science, File Processing System (FPS) is a way/system of storing, retrieving and manipulating data which is present in various files. Files are used to store various documents. All files are grouped based on their categories. The file names are much related to each other and arranged properly to easily access the files. In file processing system, if one needs to insert, delete, modify, store or update data, one must know the entire hierarchy of the files. 

Advantages of File Processing System:                                                   

·         Cost friendly – There is a very minimal set up and usage fee for File Processing System. (In most cases, free tools are inbuilt in computers).

·         Easy to use – File systems require very basic learning and understanding, hence, can be easily used. 

·         High scalability – One can very easily switch from smaller to larger files as per his needs.

Disadvantages of File Processing System: 

·         Slow access time – Direct access of files is very difficult and one needs to know the entire hierarchy of folders to get to a specific file. This involves a lot of time. 

·         Presence of redundant data – The same data can be present in two or more files which takes up more disc space.  

·         Inconsistent Data –Due to data redundancy, same data stored at different places might not match to each other. 

·         Difficulty in recovery of corrupt data – Recovery or backup of lost and corrupt data is nearly impossible in case of File Processing System.  

·         Lack of Atomicity – Operations performed in the database must be atomic i.e. either the operation takes place as a whole or does not take place at all. 

·         Problem in Concurrent Access – When a number of users operates on a common data in database at the same time then anomalies arise, due to lack of concurrency control. 

·         Changing file would lead to change in application program.

Reactions

Post a Comment

0 Comments