We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28
UNIT-1
Data Base Management System
(5 Marks) • Data: Data refers to raw, unprocessed facts and figures without context. It can be numbers, text, images, audio, or video. For example, a list of names, a string of text, or a set of measurements. • Database: A database is an organized collection of structured information or data, typically stored electronically in a computer system. It allows for efficient storage, retrieval, and management of data. An example of a database is a customer records system used by businesses. • Database Management System (DBMS): A DBMS is software that interacts with end-users, applications, and the database itself to capture and analyze data. It provides tools and functionalities to create, retrieve, update, and manage data in databases. Examples of DBMS include MySQL, Oracle Database, and Microsoft SQL Server. • A database management system (DBMS) is a software tool that allows users to create, store, organize, and manipulate data in a database. Objectives of DBMS • To provide a storage area for the mass amount of relevant data. • To make access to the data easy for the end-user. • To allow multiple users to be active at one time. • To allow the growth of the database. • To eliminate data redundancy (duplication of data). • To protect the data from the physical harm and unauthorized access. Advantages of DBMS • Data Sharing:-One of the biggest advantages of a DBMS is its ability to share data. Using a DBMS, several users are allowed to access and use the database simultaneously without influencing one another. This is especially handy for teams that are working on the same project. • Improved data security:-Data security measures are very important for any organization. To ensure high data security, companies use DBMS as it provides various levels of security authentication which can be done at the user and admin levels. This helps to avoid security breaches and takes care of the security issues. • Minimize data inconsistency:-Data inconsistency occurs when there are different versions of the same data stored at different places. For example, data inconsistency exists when let’s say a school’s database has the name of the Principal as 'Raman Desai' at one place and it’s 'Naman Desai' at the other place. Here, there’s an inconsistency as the principal is the same and it should be the same at all places in a database. Such errors are highly minimized in a properly designed DBMS. • Support Multiple User:-DBMS allows multiple users to access the same database at a time without any conflicts. • Data Backup and Recovery:-Data loss is a big problem for all the organizations. In the file system users have to back up the files in regular intervals which lead to waste of time and resources. DBMS solves this problem of taking backup automatically and recovery of the database. Disadvantages of DBMS • Cost of Hardware and Software:-Implementing a DBMS can be costly, as it requires powerful hardware to support the database, especially in high-demand environments. Additionally, purchasing a DBMS software license can be expensive. • Complexity:-A DBMS is complex software that requires skilled personnel to manage and maintain. Database administrators (DBAs) need specialized knowledge to ensure that the database performs well and remains secure. • Large Storage Requirements:-DBMSs require huge storage space due to the overhead needed to manage the database. As data grows, it requires larger storage, adding to the cost. • Data Migration and Conversion Complexity:-When migrating data from traditional systems to a DBMS, the process can be complex and time-consuming. Data transformation, cleaning, and integration need to be performed carefully to avoid data integrity issues. • Frequent Maintenance Requirements:-A DBMS needs regular maintenance, such as backup, tuning, updates, and security patches. These tasks require dedicated resources and time. • Dependency on DBMS Vendors:-Most commercial DBMSs are vendor-specific, and organizations can become dependent on a single vendor for updates, support, and enhancements, which may be costly and limiting. Database Design Model [ IMP5 marks]
A database model is a conceptual framework or structure that defines how data is
stored, organized, and manipulated within a database system. It establishes the relationships, rules, and constraints between different data elements, shaping how data can be accessed and queried. Database models serve as blueprints for database systems, guiding how data is structured to support specific use cases and ensure efficient data retrieval and management. • Hierarchical database Model • Network database Model • Relation Database Model • ER database Model Hierarchical Database Model
A hierarchical database model is a data organization approach where data is
structured in a tree-like format, with records organized as parent-child relationships. Each child node has only one parent, but a parent node can have multiple children. This structure is often used in applications where relationships are naturally hierarchical, like organizational charts or file directory systems. Advantages: • It is the easiest model. • Searching is easy and fast if parents is known by the user. • Efficient to handling one-to-many relationship. • Help to built complex system form simple components. • Highly secured because nobody can see and modified child without parents permission. Disadvantages. • It is old and outdated database model. • It isn’t flexible model. • It can’t handle many to many relationship. • It increase data redundancy because same data can be stored in different places • When parent node is deleted all the child node is deleted automatically. Network Database Model Network database model is a modified version of previous database model. This model in known as flexible and versatile database model which can represent many-to-many relationship. In this model root of data is not necessary to move downward. It can be in any direction . It allows each records to have multiple parents and multiple children. Advantages: • More flexible and versatile model. • Accepts many to many relationship. • Reduce data redundancy. • Searching is faster because of multi-directional pointers. Disadvantages • Complex database model • Need large program to handle the relationship. • Less security because of data sharing. • It increases the processing overhead due to the complex relationship. • Lack of structural independences. Relational Database model The relational database model represents all data in the database in simple two dimension table. Each database is connected to the data in different fields using common data or key field. A particular attributes is selected as a primary key that can be referred in another table called a foreign key. It is highly flexable database model which can be used with limited memory Advantages • In this model, one table is linked with other by using some common field and rules. The rules which is implemented in one table can be easily implemented to the other table. • Normalization of the database is possible. • There is less data redundancy. • Rapid processing of database is possible. • If new data is to be added than existing database in not necessary to design. Disadvantages • It is more complex than other database model. • Too many rules makes the database less user friendly. ER Database Model An entity relationship database model is also called an entity relationship diagram which is the graphical representation of entities and their relationship to each other. This model is typically used in computing and organizing the data with database. There are mainly 3 types of relations. • One to One relationship • One to Many relationship • Many to Many relationship • One to One relationship:- In this type one entity from set A can be associated with at most one entity of set B and vice versa. Example relationship between driver and car, campus and campus chief etc. • One to Many relationship:-In this model, one entity from set A associated with more than one entity of the set B. Example relationship between campus and students, customer and order. • Many to Many relationship:- Many entities from set A can be associated with more than one entity of set B and vice versa. Example relationship between books and authors, teachers and students. Database Language Database languages are specialized languages used to create, manage, and manipulate databases. They enable users to perform various operations on databases, such as querying data, updating records, and defining database structures. Here are the primary types of database languages: • DDL • DML • DCL • TCL 1. DDL (Data definition Language):-Data Definition Language (DDL) is a set of special commands that allows us to define and modify the structure and the metadata of the database. These commands can be used to create, modify, and delete the database structures such as schema, tables, indexes, etc. Examples - CREATE, ALTER, DROP, TRUNCATE, COMMENT, RENAME etc. 2. DML (Data Manipulation Language):-Data Manipulation Language (DML) is a set of special commands that allows us to access and manipulate data stored in existing schema objects. These commands are used to perform certain operations such as insertion, deletion, updation, and retrieval of the data from the database. Examples - SELECT, INSERT, UPDATE, DELETE, MERGE, CALL, LOCK TABLE etc. 3. DCL (Data Control Language):-Data Control Language (DCL) is a set of special commands that are used to control the user privileges in the database system. The user privileges include ALL, CREATE, SELECT, INSERT, UPDATE, DELETE, EXECUTE, etc. We require data access permissions to execute any command or query in the database system. This user access is controlled using the DCL statements. These statements are used to grant and revoke user access to data or the database. Example:- GRANT, REVOKE
4. TCL (Transaction Control Language):- Transaction Control Language
(TCL) is a set of special commands that deal with the transactions within the database. A transaction is a collection of related tasks that are treated as a single execution unit by the DBMS software. Hence, transactions are responsible for the execution of different tasks within a database. Example:-COMMIT, ROLLBACK, SAVEPOINT, AUTOCOMMIT. DBA (Data base administrator) A Database Administrator (DBA) is an individual or person responsible for controlling, maintaining, coordinating, and operating a database management system. Managing, securing, and taking care of the database systems is a prime responsibility. They are responsible and in charge of authorizing access to the database, coordinating, planning, installation, and monitoring uses, and acquiring and gathering software and hardware resources as and when needed. Role / Duties of DBA. • Decides Hardware: They decide on economical hardware, based on cost, performance, and efficiency of hardware, and best suits the organization. It is hardware that is an interface between end users and the database. • Database Accessibility: Database Administrator is solely responsible for giving permission to access data available in the database. It also makes sure who has the right to change the content. • Database Design: DBA is held responsible and accountable for logical, physical design, external model design, and integrity and security control. • Database Implementation: DBA implements DBMS and checks database loading at the time of its implementation. • Query Processing Performance: DBA enhances query processing by improving speed, performance, and accuracy. • Tuning Database Performance: If the user is not able to get data speedily and accurately then it may lose organization’s business. So by tuning SQL commands DBA can enhance the performance of the database. Various Responsibilities of Database Administrator (DBA) • Responsible for designing overall database schema (tables & fields). • To select and install database software and hardware. • Responsible for deciding on access methods and data storage. • DBA selects appropriate DBMS software like oracle, SQL server or MySQL. • Used in designing recovery procedures. • DBA decides the user access level and security checks for accessing, modifying or manipulating data. • DBA is responsible for specifying various techniques for monitoring the database performance. • DBA is responsible for operation managements. Centralized and Distributed Database System A Centralized Database is a type of database that is stored, located as well as maintained at a single location only. This type of database is modified and managed from that location itself. This location is thus mainly any database system or a centralized computer system. The centralized location is accessed via an internet connection (LAN, WAN, etc). This centralized database is mainly used by institutions or organizations. Advantages • Since all data is stored at a single location only thus it is easier to access and coordinate data. • The centralized database has very minimal data redundancy since all data is stored in a single place. • It is cheaper in comparison to all other databases available. • It provide better data security. • Suitable for small size organization. • Central processing helps in reducing the cost because it does not required more hardware and machine. Disadvantage: • The data traffic in the case of a centralized database is more. • If any kind of system failure occurs in the centralized system then the entire data will be destroyed. • It is not suitable for large size organization. • Large storage is required at the central information system. Distributed Database System A distributed database is basically a type of database which consists of multiple databases that are connected with each other and are spread across different physical locations. The data that is stored in various physical locations can thus be managed independently of other physical locations. The communication between databases at different physical locations is thus done by a computer network. Advantages: • This database can be easily expanded as data is already spread across different physical locations. • The distributed database can easily be accessed from different networks. • This database is more secure in comparison to a centralized database. • Suitable for large size organization. • It can support large number of user at the same time. • Failure of one system does not affect the whole computer system. Disadvantages: • This database is very costly and is difficult to maintain because of its complexity. • Complex to implement and manage. • Chance of data hacking. • Network traffic is high. Normalization Data base Security Database security involves protecting a database from unauthorized access, data breaches, and other potential threats. It encompasses a range of strategies, technologies, and best practices to ensure the confidentiality, integrity, and availability of the data stored in a database. Here's a breakdown of its key aspects: Key area of database security Data Confidentiality: Ensuring that sensitive data remains private and accessible only to authorized individuals. This involves encryption techniques, access controls, and data masking to protect confidential information. Data Integrity: Maintaining the accuracy and consistency of data throughout its lifecycle. This includes data validation, error checking, and backup mechanisms to prevent data corruption and unauthorized modifications. Data Availability: Ensuring that data is accessible to authorized users when needed. This involves redundancy techniques, disaster recovery planning, and regular backups to minimize downtime and data loss. Data Confidentiality: • Encryption: Protecting sensitive data by converting it into an unreadable format. • Access Controls: Implementing robust authentication and authorization mechanisms to limit access to authorized users. • Data Masking: Hiding sensitive data from unauthorized users by replacing it with non- sensitive values. 2. Data Integrity: • Data Validation: Ensuring data accuracy and consistency through validation rules and constraints. • Error Checking: Detecting and correcting errors in data entry and processing. • Backup and Recovery: Regularly backing up data and implementing recovery procedures to minimize data loss. 3. Data Availability: • Redundancy: Creating multiple copies of data to ensure availability in case of failures. • Disaster Recovery Planning: Developing plans to restore database operations in case of disasters. • Regular Maintenance: Performing regular maintenance tasks to optimize database performance and prevent downtime. 4. Network Security: • Firewalls: Protecting the database server from unauthorized network access. • Intrusion Detection Systems: Monitoring network traffic for signs of malicious activity. • Secure Network Protocols: Using secure protocols like HTTPS to encrypt communication between the database and applications. 5. Application Security: • Input Validation: Validating user input to prevent SQL injection and other attacks. • Secure Coding Practices: Following secure coding guidelines to minimize vulnerabilities in database applications. • Regular Security Testing: Conducting regular security testing to identify and address vulnerabilities. 6. User Awareness and Training: • Security Awareness: Educating users about security best practices to prevent human error. • Password Policies: Enforcing strong password policies to protect user accounts. • Regular Security Training: Providing regular training to keep users informed about the latest security threats and best practices. 7. Monitoring and Logging: • Activity Monitoring: Monitoring database activity to detect suspicious behavior. • Log Analysis: Analyzing logs to identify potential security incidents. • Alerting: Configuring alerts to notify administrators of security events. Data integrity Data integrity refers to the accuracy, consistency, and reliability of data throughout its lifecycle. It ensures that data remains unaltered and trustworthy during creation, storage, processing, and transmission, except through authorized and intended actions. Key Aspects of Data Integrity • Accuracy – Data must be correct and represent the intended value without errors. • Consistency – Data should remain uniform across different systems and formats. • Completeness – All required data fields must be populated and not missing essential information. • Validity – Data must adhere to defined rules, formats, and constraints. Types of Data Integrity • Physical Integrity Protects data against physical risks like hardware failures, power outages, or environmental hazards. Example:-Using redundant storage and regular backups. • Logical Integrity Ensures that data remains accurate and consistent based on logical rules and constraints. Example: Relational database constraints like primary keys, foreign keys, and unique fields.