This document discusses query languages in database management systems. It covers the main categories of query languages: procedural languages like relational algebra, and non-procedural languages like tuple and domain relational calculus. Relational algebra operators like selection, projection, union, and join are defined. Example queries are provided in both relational algebra and relational calculus formats. Functional dependencies, candidate keys, and the closure of attribute sets under a set of functional dependencies are also explained.
The document provides an overview of the relational model and relational algebra used in relational databases. It defines key concepts like relations, tuples, attributes, domains, schemas, instances, keys, and normal forms. It also explains the six basic relational algebra operations - select, project, union, difference, cartesian product, and rename - and how they can be composed to form complex queries. Examples of relations and queries involving operations like selection, projection, joins are provided to illustrate relational algebra.
This document provides an overview of the relational model and relational database concepts. It defines key terms like relation schemas, attributes, domains, tuples, keys, and foreign keys. It also explains relational algebra operations like select, project, join, and aggregate functions. Examples of relational queries on banking database relations like accounts, customers, loans are provided to illustrate concepts. The document is intended to help students learn and practice relational database and query language concepts.
CHAPTER 2 DBMS IN EASY WAY BY MILAN PATELShashi Patel
The document discusses the relational model for database management. It provides details on the structure of relational databases including domains, relations, and schemas. It describes fundamental relational algebra operations like selection, projection, join, and set operations. It also covers tuple and domain relational calculus as non-procedural query languages. The document provides examples of queries and operations on sample relations to illustrate relational concepts.
The document defines key concepts in relational databases such as super keys, candidate keys, and primary keys. It provides an example table to demonstrate how these concepts apply. The document also lists some common relational algebra operations and provides examples of how they can be used to write queries on sample databases.
The document provides an overview of relational algebra and database concepts including:
- The basic structure of relations and relation schemas using an example of customer data.
- Key concepts like primary keys, foreign keys, and relationships between relations.
- The six basic relational algebra operations - select, project, union, set difference, cartesian product, and rename. Examples are given for each.
- Additional relational algebra operations like set intersection, natural join, division, and assignment are described along with banking examples.
- The document concludes with a mention of extended relational algebra operations like generalized projection, aggregate functions, and outer join.
The document discusses relational algebra and accessing MySQL databases. It covers fundamental relational algebra operations like selection, projection, union, set difference, and cartesian product. It also describes how to create tables in a MySQL database, submit SQL queries, and access the database from the command line. Basic concepts like relations, attributes, tuples, schemas, and keys are defined. Examples are provided to illustrate relational algebra operations.
This document discusses relational algebra operations including select, project, union, set difference, cartesian product, and rename. It provides examples of how to write queries using these operations on sample relations like loan and borrower. The select operation filters tuples based on a predicate, project returns a relation with some attributes removed, union combines the tuples from two relations, set difference returns tuples in one relation not in another, cartesian product combines all tuples from two relations, and rename assigns a new name to the result of an expression. The goal is to help students understand relational algebra and how to write queries using its basic operations.
Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...Beat Signer
The document discusses Edgar Codd's relational model for data management. It describes how Codd developed the relational model while working at IBM and published a seminal paper on it in 1970. It also discusses how IBM initially did not implement the model, but later developed prototypes like System R that helped drive commercial relational database management systems. The document provides an introduction to key concepts of the relational model like relational algebra operations, relations, attributes, keys and database schemas.
The document provides an overview of the relational model and relational algebra used in relational databases. It defines key concepts like relations, tuples, attributes, domains, schemas, instances, keys, and normal forms. It also explains the six basic relational algebra operations - select, project, union, difference, cartesian product, and rename - and how they can be composed to form complex queries. Examples of relations and queries involving operations like selection, projection, joins are provided to illustrate relational algebra.
This document provides an overview of the relational model and relational database concepts. It defines key terms like relation schemas, attributes, domains, tuples, keys, and foreign keys. It also explains relational algebra operations like select, project, join, and aggregate functions. Examples of relational queries on banking database relations like accounts, customers, loans are provided to illustrate concepts. The document is intended to help students learn and practice relational database and query language concepts.
CHAPTER 2 DBMS IN EASY WAY BY MILAN PATELShashi Patel
The document discusses the relational model for database management. It provides details on the structure of relational databases including domains, relations, and schemas. It describes fundamental relational algebra operations like selection, projection, join, and set operations. It also covers tuple and domain relational calculus as non-procedural query languages. The document provides examples of queries and operations on sample relations to illustrate relational concepts.
The document defines key concepts in relational databases such as super keys, candidate keys, and primary keys. It provides an example table to demonstrate how these concepts apply. The document also lists some common relational algebra operations and provides examples of how they can be used to write queries on sample databases.
The document provides an overview of relational algebra and database concepts including:
- The basic structure of relations and relation schemas using an example of customer data.
- Key concepts like primary keys, foreign keys, and relationships between relations.
- The six basic relational algebra operations - select, project, union, set difference, cartesian product, and rename. Examples are given for each.
- Additional relational algebra operations like set intersection, natural join, division, and assignment are described along with banking examples.
- The document concludes with a mention of extended relational algebra operations like generalized projection, aggregate functions, and outer join.
The document discusses relational algebra and accessing MySQL databases. It covers fundamental relational algebra operations like selection, projection, union, set difference, and cartesian product. It also describes how to create tables in a MySQL database, submit SQL queries, and access the database from the command line. Basic concepts like relations, attributes, tuples, schemas, and keys are defined. Examples are provided to illustrate relational algebra operations.
This document discusses relational algebra operations including select, project, union, set difference, cartesian product, and rename. It provides examples of how to write queries using these operations on sample relations like loan and borrower. The select operation filters tuples based on a predicate, project returns a relation with some attributes removed, union combines the tuples from two relations, set difference returns tuples in one relation not in another, cartesian product combines all tuples from two relations, and rename assigns a new name to the result of an expression. The goal is to help students understand relational algebra and how to write queries using its basic operations.
Relational Model and Relational Algebra - Lecture 3 - Introduction to Databas...Beat Signer
The document discusses Edgar Codd's relational model for data management. It describes how Codd developed the relational model while working at IBM and published a seminal paper on it in 1970. It also discusses how IBM initially did not implement the model, but later developed prototypes like System R that helped drive commercial relational database management systems. The document provides an introduction to key concepts of the relational model like relational algebra operations, relations, attributes, keys and database schemas.
The document discusses tuple relational calculus and domain relational calculus. Tuple relational calculus describes the desired information as a set of tuples that satisfy a predicate, in the form {t | P(t)}. Domain relational calculus uses domain variables that take on attribute values rather than entire tuples. Both languages use atoms, formulae, and quantification to write queries. Expressions must be safe by only generating tuples within the domain to avoid infinite relations. Sample queries are provided to illustrate the languages.
This document provides an overview of data modeling and SQL. It introduces key concepts in relational databases including relations, schemas, tuples, domains, keys, and referential integrity. It also describes the relational data model including the structure of relations, attributes, and relation instances. Finally, it covers the relational algebra including operations like select, project, join, union, difference, and rename that form the basis for SQL queries. The document uses examples from a banking domain to illustrate these concepts.
Relational algebra is a collection of operations to manipulate or access tables. It includes set-oriented operations like selection, projection, join, division, as well as native relational operations like rename and assignment. Additional relational operators like aggregate functions, grouping, and outer joins were added to enhance its expressive power.
This document discusses query languages and relational algebra operations. It introduces relational algebra as a procedural query language. The basic relational algebra operations are selection, projection, union, set difference, cartesian product, and rename. Examples are provided to illustrate each operation. Additional operations like join, outer join, division and aggregation are also discussed. The document concludes with a discussion of database modification operations like deletion, insertion and updating.
This document provides an overview of SQL (Structured Query Language) including its history, data definition and manipulation capabilities. Key topics covered include SQL's data types, basic queries using SELECT, FROM and WHERE clauses, joins, aggregation, null values, triggers and indexes. The document also discusses SQL standards over time and commercial database implementations of SQL features.
The document discusses the relational model for databases. The relational model represents data as mathematical n-ary relations and uses relational algebra or relational calculus to perform operations. Relational calculus comes in two flavors: tuple relational calculus (TRC) and domain relational calculus (DRC). TRC uses tuple variables while DRC uses domain element variables. Expressions in relational calculus are called formulas and queries return tuples that make the formula evaluate to true.
Dbms ii mca-ch5-ch6-relational algebra-2013Prosanta Ghosh
The document discusses relational algebra, which defines a set of operations for the relational model. The relational algebra operations can be divided into two groups: set operations from mathematical set theory including UNION, INTERSECTION, and SET DIFFERENCE; and operations developed specifically for relational databases including SELECT, PROJECT, and JOIN. The six basic relational algebra operators are SELECT, PROJECT, UNION, INTERSECTION, SET DIFFERENCE, and CARTESIAN PRODUCT. RELATIONAL expressions allow sequences of these operations to be combined to retrieve and manipulate data from relations.
This document discusses the relational model and its core concepts. It defines relations as sets of tuples with attributes, and describes relation schemas, instances, keys such as candidate keys and foreign keys. It also introduces the concept of a relational database containing multiple relations and discusses query languages for retrieving information from the database.
The document discusses relational algebra and tuple relational calculus. It describes relational algebra as a procedural query language that uses unary operations like select and project and binary operations like join and union to derive result relations from existing relations. It then explains tuple relational calculus as a nonprocedural query language where queries return tuples satisfying a predicate. Examples of queries using both languages on banking relations are provided to illustrate their usage.
The document discusses query processing and optimization. It describes the basic steps in processing an SQL query which includes parsing, translating to relational algebra, optimization to find the most efficient execution plan, and evaluation. The optimizer uses statistical information from system catalogs about relations, attributes, and indexes to estimate the cost of different execution plans and select the most efficient one. The document also covers topics like selection operations, join operations, and methods for estimating the size and cost of different query plans.
The document discusses various concepts in relational databases including:
- Relation schemas define the structure of relations with attributes.
- Relations are sets of tuples that conform to a relation schema.
- Keys such as candidate keys and primary keys uniquely identify tuples.
- Foreign keys in one relation refer to primary keys in another.
- Relational algebra operators manipulate relations, including select, project, join, union and more.
The document discusses additional operations that can be performed in relational algebra beyond the fundamental operations. These additional operations - set intersection, natural join, division, and assignment - simplify common queries without adding expressive power. The document also covers extended relational algebra operations like generalized projection, aggregate functions, and outer joins.
This document provides an overview of arrays and strings in C programming. It discusses:
- Arrays can store a collection of like-typed data and each element is accessed via an index. Common array types include one-dimensional and multi-dimensional arrays.
- Strings in C are arrays of characters that are null-terminated. Functions like printf, scanf, gets and puts can be used to output and input strings.
- Linear and binary search algorithms are described for finding a value within an array. Sorting techniques like bubble, insertion and selection sorts are also mentioned.
The document provides an overview of the relational model and relational algebra used in relational databases. It defines key concepts like relations, tuples, attributes, domains, schemas, instances, keys, and normal forms. It also explains the six basic relational algebra operations - select, project, union, difference, cartesian product, and rename - and how they can be composed to form complex queries. Examples of relations and queries involving operations like selection, projection, joins are provided to illustrate relational algebra.
Lecture 06 relational algebra and calculusemailharmeet
The document discusses data manipulation languages (DML) for databases. There are two main types of DML: navigational/procedural and non-navigational/non-procedural. Relational algebra is a non-navigational DML defined by Codd that uses algebraic operations like selection, projection, join, etc. on tables. Relational calculus is also a non-navigational DML that defines new relations in terms of predicates on tuple variables ranging over named relations.
What is Relational model
Characteristics
Relational constraints
Representation of schemas
characteristics and Constraints of Relational model with proper examples.
Updates and dealing with constraint violations in Relational model
The document discusses tree data structures and binary trees. It provides definitions for key tree terminology like root, child, parent, leaf nodes, and discusses tree traversal methods like preorder, inorder, and postorder traversal. It also covers implementing binary trees using linked lists and building binary search trees with functions for insertion, searching, and deletion of nodes.
The document discusses various relational query languages including tuple relational calculus, domain relational calculus, query-by-example (QBE), and Datalog. It provides examples of queries expressed in these languages and details concepts like safety restrictions and the use of conditions boxes in QBE. Example queries are given using relations from a sample banking database schema.
The document describes the relational model for relational databases. It discusses the structure of relational databases including relations, tuples, attributes, domains, keys and relation schemas. It also describes the relational algebra query language including operators like select, project, join, union and set differences. Examples are provided to illustrate how to write queries using these operators to retrieve and manipulate data from relations that model real-world entities and relationships, like customers, accounts and loans in a banking example.
The document describes the relational model for databases. It defines key concepts like relations, attributes, tuples, domains, schemas, keys, and foreign keys. It explains basic relational algebra operations like select, project, join, union, difference, and cartesian product. It provides examples of how to express queries using these operations on sample relations from a banking database. Additional relational algebra operations like rename, intersection, and natural join are also introduced.
The document discusses tuple relational calculus and domain relational calculus. Tuple relational calculus describes the desired information as a set of tuples that satisfy a predicate, in the form {t | P(t)}. Domain relational calculus uses domain variables that take on attribute values rather than entire tuples. Both languages use atoms, formulae, and quantification to write queries. Expressions must be safe by only generating tuples within the domain to avoid infinite relations. Sample queries are provided to illustrate the languages.
This document provides an overview of data modeling and SQL. It introduces key concepts in relational databases including relations, schemas, tuples, domains, keys, and referential integrity. It also describes the relational data model including the structure of relations, attributes, and relation instances. Finally, it covers the relational algebra including operations like select, project, join, union, difference, and rename that form the basis for SQL queries. The document uses examples from a banking domain to illustrate these concepts.
Relational algebra is a collection of operations to manipulate or access tables. It includes set-oriented operations like selection, projection, join, division, as well as native relational operations like rename and assignment. Additional relational operators like aggregate functions, grouping, and outer joins were added to enhance its expressive power.
This document discusses query languages and relational algebra operations. It introduces relational algebra as a procedural query language. The basic relational algebra operations are selection, projection, union, set difference, cartesian product, and rename. Examples are provided to illustrate each operation. Additional operations like join, outer join, division and aggregation are also discussed. The document concludes with a discussion of database modification operations like deletion, insertion and updating.
This document provides an overview of SQL (Structured Query Language) including its history, data definition and manipulation capabilities. Key topics covered include SQL's data types, basic queries using SELECT, FROM and WHERE clauses, joins, aggregation, null values, triggers and indexes. The document also discusses SQL standards over time and commercial database implementations of SQL features.
The document discusses the relational model for databases. The relational model represents data as mathematical n-ary relations and uses relational algebra or relational calculus to perform operations. Relational calculus comes in two flavors: tuple relational calculus (TRC) and domain relational calculus (DRC). TRC uses tuple variables while DRC uses domain element variables. Expressions in relational calculus are called formulas and queries return tuples that make the formula evaluate to true.
Dbms ii mca-ch5-ch6-relational algebra-2013Prosanta Ghosh
The document discusses relational algebra, which defines a set of operations for the relational model. The relational algebra operations can be divided into two groups: set operations from mathematical set theory including UNION, INTERSECTION, and SET DIFFERENCE; and operations developed specifically for relational databases including SELECT, PROJECT, and JOIN. The six basic relational algebra operators are SELECT, PROJECT, UNION, INTERSECTION, SET DIFFERENCE, and CARTESIAN PRODUCT. RELATIONAL expressions allow sequences of these operations to be combined to retrieve and manipulate data from relations.
This document discusses the relational model and its core concepts. It defines relations as sets of tuples with attributes, and describes relation schemas, instances, keys such as candidate keys and foreign keys. It also introduces the concept of a relational database containing multiple relations and discusses query languages for retrieving information from the database.
The document discusses relational algebra and tuple relational calculus. It describes relational algebra as a procedural query language that uses unary operations like select and project and binary operations like join and union to derive result relations from existing relations. It then explains tuple relational calculus as a nonprocedural query language where queries return tuples satisfying a predicate. Examples of queries using both languages on banking relations are provided to illustrate their usage.
The document discusses query processing and optimization. It describes the basic steps in processing an SQL query which includes parsing, translating to relational algebra, optimization to find the most efficient execution plan, and evaluation. The optimizer uses statistical information from system catalogs about relations, attributes, and indexes to estimate the cost of different execution plans and select the most efficient one. The document also covers topics like selection operations, join operations, and methods for estimating the size and cost of different query plans.
The document discusses various concepts in relational databases including:
- Relation schemas define the structure of relations with attributes.
- Relations are sets of tuples that conform to a relation schema.
- Keys such as candidate keys and primary keys uniquely identify tuples.
- Foreign keys in one relation refer to primary keys in another.
- Relational algebra operators manipulate relations, including select, project, join, union and more.
The document discusses additional operations that can be performed in relational algebra beyond the fundamental operations. These additional operations - set intersection, natural join, division, and assignment - simplify common queries without adding expressive power. The document also covers extended relational algebra operations like generalized projection, aggregate functions, and outer joins.
This document provides an overview of arrays and strings in C programming. It discusses:
- Arrays can store a collection of like-typed data and each element is accessed via an index. Common array types include one-dimensional and multi-dimensional arrays.
- Strings in C are arrays of characters that are null-terminated. Functions like printf, scanf, gets and puts can be used to output and input strings.
- Linear and binary search algorithms are described for finding a value within an array. Sorting techniques like bubble, insertion and selection sorts are also mentioned.
The document provides an overview of the relational model and relational algebra used in relational databases. It defines key concepts like relations, tuples, attributes, domains, schemas, instances, keys, and normal forms. It also explains the six basic relational algebra operations - select, project, union, difference, cartesian product, and rename - and how they can be composed to form complex queries. Examples of relations and queries involving operations like selection, projection, joins are provided to illustrate relational algebra.
Lecture 06 relational algebra and calculusemailharmeet
The document discusses data manipulation languages (DML) for databases. There are two main types of DML: navigational/procedural and non-navigational/non-procedural. Relational algebra is a non-navigational DML defined by Codd that uses algebraic operations like selection, projection, join, etc. on tables. Relational calculus is also a non-navigational DML that defines new relations in terms of predicates on tuple variables ranging over named relations.
What is Relational model
Characteristics
Relational constraints
Representation of schemas
characteristics and Constraints of Relational model with proper examples.
Updates and dealing with constraint violations in Relational model
The document discusses tree data structures and binary trees. It provides definitions for key tree terminology like root, child, parent, leaf nodes, and discusses tree traversal methods like preorder, inorder, and postorder traversal. It also covers implementing binary trees using linked lists and building binary search trees with functions for insertion, searching, and deletion of nodes.
The document discusses various relational query languages including tuple relational calculus, domain relational calculus, query-by-example (QBE), and Datalog. It provides examples of queries expressed in these languages and details concepts like safety restrictions and the use of conditions boxes in QBE. Example queries are given using relations from a sample banking database schema.
The document describes the relational model for relational databases. It discusses the structure of relational databases including relations, tuples, attributes, domains, keys and relation schemas. It also describes the relational algebra query language including operators like select, project, join, union and set differences. Examples are provided to illustrate how to write queries using these operators to retrieve and manipulate data from relations that model real-world entities and relationships, like customers, accounts and loans in a banking example.
The document describes the relational model for databases. It defines key concepts like relations, attributes, tuples, domains, schemas, keys, and foreign keys. It explains basic relational algebra operations like select, project, join, union, difference, and cartesian product. It provides examples of how to express queries using these operations on sample relations from a banking database. Additional relational algebra operations like rename, intersection, and natural join are also introduced.
relational model in Database Management.ppt.pptRoshni814224
This document provides an overview of the relational model used in database management systems. It discusses key concepts such as:
- Relations, which are sets of tuples that represent entities and relationships between entities.
- Relation schemas that define the structure of relations, including the attributes and their domains.
- Keys such as candidate keys and foreign keys that uniquely identify tuples and define relationships between relations.
- Relational algebra, which consists of operators like select, project, join, and set operations to manipulate and query relations.
- An example banking schema is presented to demonstrate these concepts.
This document provides an introduction to relational calculus, including tuple relational calculus (TRC) and domain relational calculus (DRC). It defines relational calculus as a non-procedural query language that specifies what to do without explaining how. TRC works on tuples and allows selecting tuples that satisfy a condition, while DRC works on domains/attributes and allows selecting attributes. Examples of queries are provided for each that filter relations based on conditions.
This document provides a summary of the basic structure and key concepts of SQL, including:
1) SQL queries typically involve a SELECT statement to retrieve attributes from one or more relations based on conditions in a WHERE clause.
2) Common SQL clauses include SELECT, FROM, WHERE, GROUP BY, HAVING, and aggregate functions are used to perform calculations on groups of records.
3) Null values, three valued logic, and handling of duplicates are important concepts when working with SQL queries and relations.
This chapter discusses SQL and relational database concepts. It covers the basic structure of SQL queries involving SELECT, FROM, and WHERE clauses. It describes key SQL features like aggregate functions, null values, nested subqueries, and modification of databases through insertion, deletion, and updating of records. The document provides examples to illustrate concepts like joins, grouping, ordering results, and use of comparison and string operators in SQL queries.
A query language allows users to request information from a database. Query languages are higher-level than programming languages. Relational algebra is a procedural query language that uses operations like select, project, union, set difference, Cartesian product, and rename on relations. Select chooses tuples matching a predicate. Project removes attributes, listing those remaining. Union combines compatible relations. Set difference finds tuples in one relation not in another. Cartesian product combines information from any two relations. Rename renames a relation.
The document provides an overview of the basic structure and features of the SQL language, including: select, from, where clauses; aggregate functions; set operations; null values; and more. It describes the typical components of an SQL query, how they map to relational algebra operations, and provides examples to illustrate various SQL concepts and capabilities.
This chapter discusses other relational query languages beyond SQL, including tuple relational calculus, domain relational calculus, and query-by-example (QBE). Tuple relational calculus allows queries to select tuples where a predicate is true. Domain relational calculus uses domain variables instead of tuple variables and is equivalent in power. Example queries are provided to illustrate how to express various conditions and relationships between relations in these languages. Safety restrictions ensure queries return finite relations.
The document discusses the relational model for databases including:
1) The structure of relational databases including relations, tuples, attributes, domains, relation schemas, and relation instances.
2) Relational algebra which is a procedural query language using operators like select, project, join, and set operations.
3) Additional concepts like keys, normalization, and an example banking schema to demonstrate relational queries.
The document discusses the relational model for databases including:
1) The structure of relational databases including relations, tuples, attributes, domains, relation schemas, and relation instances.
2) Relational algebra which is a procedural query language using operators like select, project, join, and set operations.
3) Additional concepts like keys, normalization, and an example banking schema to demonstrate relational queries.
This document discusses tuple relational calculus (TRC) and domain relational calculus (DRC), which are nonprocedural query languages for relational databases. It provides examples of queries written in TRC and DRC on sample bank data. It also covers the syntax and semantics of predicates in TRC/DRC, including quantifiers, connectives, and safety conditions for queries to return finite result sets. Expressive power and equivalence between the basic relational algebra and the two calculi are also discussed.
The document discusses the relational model of databases and relational algebra operations. It covers:
1. The basic structure of relations including attributes, tuples, domains, and relation schemas.
2. Key relational algebra operations like selection, projection, union, set difference, and cartesian product and provides examples of each.
3. Additional topics like keys, foreign keys, query languages, and examples of queries using relational algebra on banking database relations.
This document discusses relational database management systems and SQL. It covers basic SQL queries involving selection, projection, and joins. It also discusses set operations in SQL like union, intersect, and except. Further, it describes complex queries, integrity constraints, domains, and data definition language commands for creating, altering, and dropping tables.
The document provides an overview of the relational model used in database management systems. It defines key concepts like relations, attributes, tuples, domains, schemas, keys, and foreign keys. It also describes common relational algebra operations like select, project, join, union, and set differences. Examples are provided to illustrate how these operations work on relations. Additional topics covered include query languages, normalization, and modeling a banking example database using these concepts.
relational algebra and calculus queries .pptShahidSultan24
This document provides an overview of key concepts in the relational model of databases, including:
- Relations are represented as tables with rows (tuples) and columns (attributes). The order of tuples and attributes is not important.
- A relational database contains multiple relations that each store a part of the overall database information. Keys are used to identify unique tuples.
- Relational algebra defines operations like select, project, join, and set operations that can be used to query and manipulate relations. Operations take relations as input and produce new relations as output.
The document discusses query optimization in database systems. It covers topics like:
- Estimating the cost of different query evaluation plans using statistical information about relations.
- Transforming relational expressions using equivalence rules to generate logically equivalent expressions with different evaluation orders.
- Choosing the lowest cost plan based on cost estimates to optimize query evaluation.
Lesson plan proforma database management systemSANTOSH RATH
This document contains a lesson plan and progress sheet for a Database Management System course being taught over 3 semesters in 2014-15. It lists 48 topics divided across 3 modules that will be covered over the course, along with the planned and actual dates for delivering each topic and any remarks. The topics include introductions to databases, data models, SQL, normalization, transactions, concurrency, locking, recovery techniques, and more advanced DBMS concepts.
This document contains a lesson plan and progress sheet for a Programming in C course being taught over 3 modules during the first semester of the 2014-2015 academic year at the Gandhi Institute for Education and Technology in Bhubaneswar, India. The plan outlines 46 topics to be covered, including introductions to algorithms, flowcharts, data types, operators, control structures, arrays, strings, pointers, functions, structures, unions, files and I/O. Dates are provided for when each topic is planned to be delivered and actual delivery dates and remarks.
This document contains a list of expected questions for the Theory of Computation subject in the 5th semester of the Computer Science branch. It includes short questions, long questions, and questions covering various topics like DFAs, NFAs, regular expressions, context-free grammars, pushdown automata, Turing machines, complexity classes, decidability, and more. The list was prepared by Assistant Professor Santosh Kumar Rath.
This document lists 30 short questions and 19 long questions related to the subject of Theory of Computation for 5th semester CSE students. The questions cover topics such as the differences between DFAs and NFAs, regular expressions, grammars, languages, automata, Turing machines, complexity classes, and decidability. Example problems include designing automata to recognize specific languages and proving properties of formal languages and grammars.
This document contains questions from various years (2008-2012) related to object oriented programming concepts in C++. The questions cover topics such as classes and objects, inheritance, polymorphism, exception handling, functions, pointers, arrays, operators, input/output etc. Short questions ranging from 2-5 marks and long questions ranging from 5-10 marks are included related to concepts, syntax, programs and differences.
This document contains questions for a database engineering examination. It includes questions about data definition language commands, differences between file processing systems and database systems, weak entity sets, cardinality, foreign keys, hashing techniques, lock types, differences between object-oriented and object-relational databases, rollup, entity-relationship modeling, converting models, B+ tree operations, relational algebra queries, relational calculus queries, SQL queries, and more. Students are asked to answer one compulsory question with multiple parts, and five questions from the remaining list.
This document lists expected questions from the Theory of Computation subject for 5th semester CSE students. It includes short questions and long questions on topics such as the differences between DFAs and NFAs, regular expressions, grammars, Turing machines, complexity classes, decidability, and more. A total of 30 short questions and 19 long questions are provided to help students prepare for their exam.
This document lists 30 short questions and 19 long questions related to the subject of Theory of Computation for 5th semester CSE students. The questions cover topics such as the differences between DFAs and NFAs, regular expressions, grammars, languages, automata, Turing machines, complexity classes, and decidability. Example problems include designing automata to recognize specific languages, proving languages are context-free, and determining the relationships between computational models such as finite automata and Turing machines.
This document contains a set of short and long questions related to database management systems. Some key topics covered include the entity-relationship model, relational data model, normalization, transaction processing, concurrency control, and database recovery. The questions range from definitions and short explanations to examples and multi-step problems involving conceptual and practical database concepts.
The document contains questions related to database management systems (DBMS). It covers topics like data modeling, relational algebra, SQL, transaction processing, concurrency control, and database design. Some key questions ask about the differences between primary and candidate keys, entity relationship modeling, normalization, and query optimization techniques.
This document contains model questions for an exam on object-oriented programming concepts in C++. It includes 30 short answer questions and 15 long answer questions covering topics such as object slicing, copy constructors, templates, exception handling, the this pointer, namespaces, inheritance, operator overloading, polymorphism, abstraction, iterators, containers, encapsulation, and friend functions. Students are asked to define key terms and write programs demonstrating various OOP concepts in C++.
System programming involves creating system software that provides services to computer hardware rather than users. It requires an awareness of hardware. The document discusses types of system software like operating systems, utility programs, and database management systems. It also discusses types of application software like spreadsheets and presentation programs. The evolution of system programming components is explained, including assemblers that translate assembly language into machine code, and loaders that load programs into memory for execution.
This document provides an overview of operating system concepts including system components, batch systems, spooling, multiprogramming, time-sharing systems, distributed systems, parallel systems, real-time embedded systems, system structures, system calls, system programs, and process management. It describes the basic functions of an operating system in managing hardware resources, running application programs, and allowing multiple processes to run concurrently through techniques like multiprocessing and time-sharing.
This document provides an overview of operating system concepts including system components, operating system services, system programs, system calls, process management, and process states. It describes the four main components of a computer system as hardware, operating system, application programs, and users. It defines key operating system concepts such as multiprogramming, time-sharing, distributed systems, and real-time systems. It also explains process management topics like process states, process control blocks, and context switching.
This document contains an assignment on operating system concepts from Gandhi Institute of Education & Technology. It includes short notes on topics like conditions of deadlock, page vs segment, Belady's anomaly, critical section, fragmentation, monitors vs semaphores, race condition, binary vs counting semaphores, thrashing, lazy swapper, garbage collection and priority inheritance protocol. It also contains 10 long questions covering concepts like Banker's algorithm, page replacement algorithms, Peterson's solution for critical section problem, semaphores, thrashing, segment replacement, busy waiting, conditions of deadlock, producer-consumer problem, page fault and demand paging.
This document contains a set of short questions and long questions related to operating system concepts for an assignment. The short questions cover topics like the differences between processes and programs, different scheduling algorithms, process states, and functions of operating systems. The long questions involve drawing Gantt charts for scheduling algorithms, calculating turnaround and waiting times, describing functions and models of operating systems, and explaining concepts like context switching, process control blocks, and inter-process communication.
This document contains 10 questions related to operating system concepts such as file accessing methods, storage area networks, cache hit ratio, disk scheduling algorithms, memory management, I/O subsystem services like buffering and caching, file allocation methods, and Unix concepts like filters and inodes. The questions are from previous years' assignments given by Gandhi Institute for Education & Technology and range from short answer to longer descriptive questions.
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...IJECEIAES
Climate change's impact on the planet forced the United Nations and governments to promote green energies and electric transportation. The deployments of photovoltaic (PV) and electric vehicle (EV) systems gained stronger momentum due to their numerous advantages over fossil fuel types. The advantages go beyond sustainability to reach financial support and stability. The work in this paper introduces the hybrid system between PV and EV to support industrial and commercial plants. This paper covers the theoretical framework of the proposed hybrid system including the required equation to complete the cost analysis when PV and EV are present. In addition, the proposed design diagram which sets the priorities and requirements of the system is presented. The proposed approach allows setup to advance their power stability, especially during power outages. The presented information supports researchers and plant owners to complete the necessary analysis while promoting the deployment of clean energy. The result of a case study that represents a dairy milk farmer supports the theoretical works and highlights its advanced benefits to existing plants. The short return on investment of the proposed approach supports the paper's novelty approach for the sustainable electrical system. In addition, the proposed system allows for an isolated power setup without the need for a transmission line which enhances the safety of the electrical network
Rainfall intensity duration frequency curve statistical analysis and modeling...bijceesjournal
Using data from 41 years in Patna’ India’ the study’s goal is to analyze the trends of how often it rains on a weekly, seasonal, and annual basis (1981−2020). First, utilizing the intensity-duration-frequency (IDF) curve and the relationship by statistically analyzing rainfall’ the historical rainfall data set for Patna’ India’ during a 41 year period (1981−2020), was evaluated for its quality. Changes in the hydrologic cycle as a result of increased greenhouse gas emissions are expected to induce variations in the intensity, length, and frequency of precipitation events. One strategy to lessen vulnerability is to quantify probable changes and adapt to them. Techniques such as log-normal, normal, and Gumbel are used (EV-I). Distributions were created with durations of 1, 2, 3, 6, and 24 h and return times of 2, 5, 10, 25, and 100 years. There were also mathematical correlations discovered between rainfall and recurrence interval.
Findings: Based on findings, the Gumbel approach produced the highest intensity values, whereas the other approaches produced values that were close to each other. The data indicates that 461.9 mm of rain fell during the monsoon season’s 301st week. However, it was found that the 29th week had the greatest average rainfall, 92.6 mm. With 952.6 mm on average, the monsoon season saw the highest rainfall. Calculations revealed that the yearly rainfall averaged 1171.1 mm. Using Weibull’s method, the study was subsequently expanded to examine rainfall distribution at different recurrence intervals of 2, 5, 10, and 25 years. Rainfall and recurrence interval mathematical correlations were also developed. Further regression analysis revealed that short wave irrigation, wind direction, wind speed, pressure, relative humidity, and temperature all had a substantial influence on rainfall.
Originality and value: The results of the rainfall IDF curves can provide useful information to policymakers in making appropriate decisions in managing and minimizing floods in the study area.
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Sinan KOZAK
Sinan from the Delivery Hero mobile infrastructure engineering team shares a deep dive into performance acceleration with Gradle build cache optimizations. Sinan shares their journey into solving complex build-cache problems that affect Gradle builds. By understanding the challenges and solutions found in our journey, we aim to demonstrate the possibilities for faster builds. The case study reveals how overlapping outputs and cache misconfigurations led to significant increases in build times, especially as the project scaled up with numerous modules using Paparazzi tests. The journey from diagnosing to defeating cache issues offers invaluable lessons on maintaining cache integrity without sacrificing functionality.
Introduction- e - waste – definition - sources of e-waste– hazardous substances in e-waste - effects of e-waste on environment and human health- need for e-waste management– e-waste handling rules - waste minimization techniques for managing e-waste – recycling of e-waste - disposal treatment methods of e- waste – mechanism of extraction of precious metal from leaching solution-global Scenario of E-waste – E-waste in India- case studies.
Design and optimization of ion propulsion dronebjmsejournal
Electric propulsion technology is widely used in many kinds of vehicles in recent years, and aircrafts are no exception. Technically, UAVs are electrically propelled but tend to produce a significant amount of noise and vibrations. Ion propulsion technology for drones is a potential solution to this problem. Ion propulsion technology is proven to be feasible in the earth’s atmosphere. The study presented in this article shows the design of EHD thrusters and power supply for ion propulsion drones along with performance optimization of high-voltage power supply for endurance in earth’s atmosphere.
Null Bangalore | Pentesters Approach to AWS IAMDivyanshu
#Abstract:
- Learn more about the real-world methods for auditing AWS IAM (Identity and Access Management) as a pentester. So let us proceed with a brief discussion of IAM as well as some typical misconfigurations and their potential exploits in order to reinforce the understanding of IAM security best practices.
- Gain actionable insights into AWS IAM policies and roles, using hands on approach.
#Prerequisites:
- Basic understanding of AWS services and architecture
- Familiarity with cloud security concepts
- Experience using the AWS Management Console or AWS CLI.
- For hands on lab create account on [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
# Scenario Covered:
- Basics of IAM in AWS
- Implementing IAM Policies with Least Privilege to Manage S3 Bucket
- Objective: Create an S3 bucket with least privilege IAM policy and validate access.
- Steps:
- Create S3 bucket.
- Attach least privilege policy to IAM user.
- Validate access.
- Exploiting IAM PassRole Misconfiguration
-Allows a user to pass a specific IAM role to an AWS service (ec2), typically used for service access delegation. Then exploit PassRole Misconfiguration granting unauthorized access to sensitive resources.
- Objective: Demonstrate how a PassRole misconfiguration can grant unauthorized access.
- Steps:
- Allow user to pass IAM role to EC2.
- Exploit misconfiguration for unauthorized access.
- Access sensitive resources.
- Exploiting IAM AssumeRole Misconfiguration with Overly Permissive Role
- An overly permissive IAM role configuration can lead to privilege escalation by creating a role with administrative privileges and allow a user to assume this role.
- Objective: Show how overly permissive IAM roles can lead to privilege escalation.
- Steps:
- Create role with administrative privileges.
- Allow user to assume the role.
- Perform administrative actions.
- Differentiation between PassRole vs AssumeRole
Try at [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
Advanced control scheme of doubly fed induction generator for wind turbine us...IJECEIAES
This paper describes a speed control device for generating electrical energy on an electricity network based on the doubly fed induction generator (DFIG) used for wind power conversion systems. At first, a double-fed induction generator model was constructed. A control law is formulated to govern the flow of energy between the stator of a DFIG and the energy network using three types of controllers: proportional integral (PI), sliding mode controller (SMC) and second order sliding mode controller (SOSMC). Their different results in terms of power reference tracking, reaction to unexpected speed fluctuations, sensitivity to perturbations, and resilience against machine parameter alterations are compared. MATLAB/Simulink was used to conduct the simulations for the preceding study. Multiple simulations have shown very satisfying results, and the investigations demonstrate the efficacy and power-enhancing capabilities of the suggested control system.
Comparative analysis between traditional aquaponics and reconstructed aquapon...bijceesjournal
The aquaponic system of planting is a method that does not require soil usage. It is a method that only needs water, fish, lava rocks (a substitute for soil), and plants. Aquaponic systems are sustainable and environmentally friendly. Its use not only helps to plant in small spaces but also helps reduce artificial chemical use and minimizes excess water use, as aquaponics consumes 90% less water than soil-based gardening. The study applied a descriptive and experimental design to assess and compare conventional and reconstructed aquaponic methods for reproducing tomatoes. The researchers created an observation checklist to determine the significant factors of the study. The study aims to determine the significant difference between traditional aquaponics and reconstructed aquaponics systems propagating tomatoes in terms of height, weight, girth, and number of fruits. The reconstructed aquaponics system’s higher growth yield results in a much more nourished crop than the traditional aquaponics system. It is superior in its number of fruits, height, weight, and girth measurement. Moreover, the reconstructed aquaponics system is proven to eliminate all the hindrances present in the traditional aquaponics system, which are overcrowding of fish, algae growth, pest problems, contaminated water, and dead fish.
1. DATABASE MANAGEMENT SYSTEM
(FOR BOTH CSE-4TH
-SEM/MECH-3RD
SEM
DEPARTMENT)
MODULE-II
Query Language in which user requests information from the database.
Categories of languages
1. Procedural language.
2. Nonprocedural language.
Procedural Language: in procedural language the user interface the system
to perform a sequence of operation on the database to compute the
desired result. Example: Relational Algebra.
Non-Procedural Language: in non-procedural language the user describe
information desired without giving a specific procedure for obtaining that
information. Example Tuple & Domain calculus.
Relational Algebra:
-It is a Procedural language.
- it consist of a set of operation that take one or two relation as input and
produce a new output.
-Six basic operators are used in procedural language.
1. select: σ
2. project: ∏
3. union: ∪
4. set difference: –
5. Cartesian product: x
6. rename: ρ
2. The operators take one or two relations as inputs and produce a new
relation as a result.
1. Selection Operation:
- it is unary operations.
- it is represented by the lower Greek letter sigma. (σσσσ))))
- Syntax: <selection-condition>(<Relation>)
-Notation: σ p(r)
-p is called the selection predicate
- Defined as:σp(r) = {t | t ∈ r and p(t)}
Where p is a formula in propositional calculus consisting of terms
Connected by: ∧ (and), ∨ (or), ¬ (not)
Each term is one of: <attribute> op <attribute> or <constant>
Where op is one of: =, ≠, >, ≥. <. ≤
-Example of selection:
σ branch_name=“Perryridge”(account)
2. Project Operation
-Notation: where A1, A2 are attribute names and r is a relation name.n the
result is defined as the relation of k columns obtained by erasing the
columns that are not listed
-Duplicate rows removed from result, since relations are sets
-Example: To eliminate the branch_name attribute of account
∏account_number, balance (account)
3. Union Operation
Notation: r ∪ s
-Defined as:r ∪ s = {t | t ∈ r or t ∈ s}
-For r ∪ s to be valid.
3. 1. r, s must have the same arity (same number of attributes)
2. The attribute domains must be compatible (example: 2nd column
of r deals with the same type of values as does the 2nd
column of s)
-Example: to find all customers with either an account or a loan
∏customer_name (depositor) ∪ ∏customer_name (borrower)
Union Operation – Example
Relations r, s:
4. Set Difference Operation
-Notation r – s
- Defined as:
r – s = {t | t Î r and t Ï s}
- Set differences must be taken between compatible relations.
-r and s must have the same arity
- Attribute domains of r and s must be compatible
Set Difference Operation – Example
Relations r, s:
r-s
5. Cartesian Product
Operation:
-Notation r x s
- Defined as: r x s = {t q | t Î r and q Î s}
4. - Assume that attributes of r(R) and s(S) are disjoint. (That is, R Ç S = Æ).
- If attributes of r(R) and s(S) are not disjoint, then renaming must be used.
Cartesian product Operation – Example
Relations r, s:
rXs
Example Queries:
Q1.Find all loans of over $1200
Ans: σamount > 1200 (loan)
Q2.Find the loan number for each loan of an amount greater than $1200
σamount > 1200 (loan)
Αns: ∏loan_number (σamount > 1200 (loan))
Q3.Find the names of all customers who have a loan, an account, or both,
from the bank
Αns: ∏customer_name (borrower) ∪ ∏customer_name (depositor)
Q4. Find the names of all customers who have a loan at the Perryridge
Branch
Ans: ∏customer_name (σbranch_name=“Perryridge”
(σborrower.loan_number = loan.loan_number(borrower x loan)))
Q5. Find the names of all customers who have a loan at the
Perryridge branch but do not have an account at any branch of
the bank.
Ans: ∏customer_name (σbranch_name = “Perryridge”
(σborrower.loan_number = loan.loan_number(borrower x loan))) –
∏customer_name(depositor)
5. Q6. Find the names of all customers who have a loan at the Perryridge
branch.
Ans: ∏customer_name (σbranch_name = “Perryridge” (
σborrower.loan_number = loan.loan_number (borrower x loan)))
Formal Definition:
A basic expression in the relational algebra consists of either one of the
following:
-A relation in the database
-A constant relation
- Let E1 and E2 be relational algebra expressions; the following are all
relational algebra expressions:
-E1 ∪ E2
-E1 – E2
-E1 x E2
-σp (E1), P is a predicate on attributes in E1
-∏s (E1), S is a list consisting of some of the attributes in E1
-ρ x (E1), x is the new name for the result of E1
Additional Operations
We define additional operations that do not add any power to the
Relational algebra, but that simplifies common queries.
-Set intersection
- Natural join
- Division
- Assignment
Set Intersection Operation:
Notation: r ∩ s
Defined as: r ∩ s = { t | t ∈ r and t ∈ s }
Assume: r, s have the same arty attributes of r and s are compatible
Note: r ∩ s = r – (r – s)
6. Set Intersection Operation – Example
Relation r, s:
r s
Natural Join Operation:
-Let r and s be relations on schemas R and S respectively.
Then, r s is a relation on schema R ∪ S obtained as follows:
-Consider each pair of tuples tr from r and ts from s.
-If tr and ts have the same value on each of the attributes in R ∩ S, add a
tuple t to the result, where
t has the same value as tr on r
t has the same value as ts on s
- Example:
R = (A, B, C, D)
S = (E, B, D)
-Result schema = (A, B, C, D, E)
-r s is defined as:
Natural Join Operation – Example
Relations r, s:
Lossless Design: Outer Join
An extension of the join operation that avoids loss of information.
-Computes the join and then adds tuples form one relation that does not
match tuples in the other relation to the result of the join.
- Uses null values:
-null signifies that the value is unknown or does not exist
7. -All comparisons involving null are (roughly speaking) false by
definition.
Outer Join – Example
Relation loan
Relation borrower
Outer Join – Example:
Left Outer Join: take all the tuples from left relation and match with right
relation, which didn’t match with all the attributes.
8. Right Outer Join: take all the tuples from right relation and match with left
relation, which didn’t match with all the attributes with left relation.
Relational Calculus Languages:
-Tuple Relational Calculus
-Domain Relational Calculus
-QuerybyExample (QBE)
Tuple Rellational Calculus:
-A nonprocedural query language, where each query is of the form
{t | P (t ) }
- It is the set of all tuples t such that predicate P is true for t
- t is a tuple variable, t [A ] denotes the value of tuple t on attribute A
- t Î r denotes that tuple t is in relation r
- P is a formula similar to that of the predicate calculus.
Banking Example
Branch (branch_name, branch_city, assets )
Customer (customer_name, customer_street, customer_city )
Account (account_number, branch_name, balance )
9. Loan (loan_number, branch_name, amount )
Depositor (customer_name, account_number )
Borrower (customer_name, loan_number )
Example Queries
-Q1.Find the loan_number, branch_name, and amount for loans of over
$1200
Ans: {t | t ∈ loan ∧ t [amount ] 1200}
-Q2.Find the loan number for each loan of an amount greater than $1200
Ans: {t | ∃ s ∈ loan (t [loan_number ] = s [loan_number ] ∧ s [amount ]
1200)}.Notice that a relation on schema [loan_number ] is implicitly
defined by the query.
Q3.Find the names of all customers having a loan, an account, or both at
the bank
Ans: {t | ∃s ∈ borrower ( t [customer_name ] = s [customer_name ])
∧ ∃u ∈ depositor ( t [customer_name ] = u [customer_name] )
Q4.Find the names of all customers who have a loan and an account
at the bank
Ans: {t | ∃s ∈ borrower ( t [customer_name ] = s [customer_name ])
∨ ∃u ∈ depositor ( t [customer_name ] = u [customer_name ])
Q5.Find the names of all customers having a loan at the Perryridge branch
Ans: {t | ∃s ∈ borrower (t [customer_name ] = s [customer_name ]
∧ ∃u ∈ loan (u [branch_name ] = “Perryridge”∧ u [loan_number ] = s
[loan_number ]))
Q6. Find the names of all customers who have a loan at the
Perryridge branch, but no account at any branch of the bank
Ans: {t | ∃s ∈ borrower (t [customer_name ] = s [customer_name ]
∧ ∃u ∈ loan (u [branch_name ] = “Perryridge”
∧ u [loan_number ] = s [loan_number ])) ∧ not ∃v ∈ depositor
(v [customer_name ] =t [customer_name ])} }
Domain Relational Calculus:
-A nonprocedural query language equivalent in power to the tuple
relational calculus
10. - Each query is an expression of the form:
{ x1, x2, …, xn | P (x1, x2, …, xn)}
-x1, x2, …, xn represent domain variables,
-P represents a formula similar to that of the predicate calculus.
Example Queries
Q1.Find the loan_number, branch_name, and amount for loans of over
$1200
Ans: { l, b, a | l, b, a ∈ loan ∧ a 1200}
Q2.Find the names of all customers who have a loan from the Perryridge
branch and the loan amount:
Ans: { c | ∃ l, b, a ( c, l ∈ borrower ∧ l, b, a ∈ loan ∧ a 1200)}
Q3. Find the names of all customers who have a loan from the Perryridge
branch and the loan amount:
Ans: { c, a | ∃ l ( c, l ∈ borrower ∧ ∃b ( l, b, a ∈ loan ∧ b =
“Perryridge”))}
{ c, a | ∃ l ( c, l ∈ borrower ∧ l, “ Perryridge”, a ∈ loan)}
{ c | ∃ l, b, a ( c, l ∈ borrower ∧ l, b, a ∈ loan ∧ a 1200)}
Q.Find the names of all customers who have a loan of over $1200
{ l, b, a | l, b, a ∈ loan ∧ a 1200}
Database Design Life Cycle:
Data base design means to design the logical and physical
structure of data stored in a database to meet the required
information needed for different applications.
- In DDLC held the following phase for design the database.
Requiring Collection and analysis:
- It is the first step in the database design.
- During this step database design the detailed requirement by
interacting with potential users to identify their particular
needs based on the problems.
Conceptual database design:
- It is the second step in the database design.
- In this step to create a conceptual scheme for the database
that is independent of a specific database management
system(DBMS)
11. - The conceptual scheme includes detailed description of the
user and entity types, relationship and constraints.
- It provides a concept to the high level model such as entity
Relationship model.
Data Model mapping:
- It is also called logical database design.
- During this phase the transformation of the conceptual
scheme into the actual implementation of the database is
done.
- This may be carried out as DBMS package such as ORACLE,
MY SQL, and SQLSERVER.
Physical database Design:
- In this phase we design the specification for sorting database
in term of physical storage structure, access path and file
organizations.
- The design corresponds to designing the internal scheme of
the three level DBMS architecture.
Functional Dependency:
- Functional dependencies are constraints on the set of legal
relations.
- It plays important role in database design.
- The functional dependencies is denoted by , between
two set of attributes ,
- Let R is a relation scheme and C and then the
functional dependencies holds on R. if in any legal
relation r(R) for all pairs of tuples t1 in t2 such that.
- t1[ ]=t2[ ] and their must be t1[ ]=t2[ ]
- Fd represents an interrelationship among attributes of an
entity represented by a relation.
12. Armstrong Axioms
- Let F be a set of functional dependency the closure of F is the
set of all functional dependencies logically implied by F.
- We denoted the closure of F by F+.
- We can find the F+ given by F by using following rule.
- A) Reflexive rule
- B)Augmentation rule
- C) Transitive Rule
- These three rule are sound because do not generate any
incorrect functional dependency.
- The three rules are complete because for a given set F of FD
and they allowed generate all F+.
- These three rules is known as Armstrong Rules.
I. Reflexive Rule:
- if are the set of attributes and then is FD.
- Proof: let t1 and t2 be the two tuples of relations R such that
t1[ ]=t2[ ]
It means that all the attributes of t1 and t2 are same.
Then is another set of set attributes which is subset of .
so t1[ ]=t2[ ]
So is FD.
II. Augmentation Rule:
If is a FD and r is set of attributes the r r is FD.
Proof: let t1, t2 be the two tuples of relation R.
Let us assume that the FD r -r is not FD in a relation R.
Since - is satisfied on R so we get t1 [ ] =t2 [ ] -------- (1)
t1[ ]=t2[ ] ------------(2)
since r r does not hold on Relation R
t1[r ]=t2[r ]---------------(3)
t1[r ]=t2[r ]----------------(4)
from equ(1) and (3)
we get t1[r]-t2[r]--------(5)
from equ(2) and (5)
t1[ r]=t2[ r]---------------(6)
from equ(3) and (6) we get r -r (proved)
13. III. Transitive Rule:
If - and -r are FD then -r is FD.
Proof: let t1 and t2 are two tuples of relation R
Since - is satisfied on R
so we get t1 [ ] =t2 [ ] -------- (1)
t1[ ]=t2[ ] ------------(2)
since - satisfy on R
we get t1[ ]=t2[ ]------------------(3)
t1[r]=t2[r]-------------------(4)
from equ (1) and (4) we get
-r which holds the relation R (proved)
Closure of attributes sets:
Let R be v=the relation schema with set of functional dependency F.
let be the set of attributes, the closure of attributes set under a
set of FD and is denoted by +.
Compute the candidate Key:
1) Determine each set of attributes X for which left-hand side of
FD in F must be a subset of X.
2) Compute X+ under given set of FD in F.
3) If X+={R} then X is a candidate key R.
Example: let us consider r= {A, B, C, D, E, F, G, H, I}
And set of FD {AB-C, A-DE, B-F, F-GH,D-IJ}
Find out candidate key of R.
Ans: A+ under F= {A, D, E, I, J}
B+ under F= {B, F, G, H}
D+ under F= {D, I, J}
F+ under F= {F, G, H}
AB+ under f F={A,B,C,D,E,F,H,I,J}={R}
Hence AB is the candidate key of R.
Prime Attributes Non-Prime Attributes:
An attributes A in a relation schema is a prime attributes. If A is
part of any candidate key of relation R is known prime attributes.
If A is not part of any candidate key of R A is called non-prime
attributes.
14. Database normalization
Normalization is the process of efficiently organizing data in a
database. There are two goals of the normalization process:
eliminating redundant data (for example, storing the same data in
more than one table) and ensuring data dependencies make sense
(only storing related data in a table). Both of these are worthy goals
as they reduce the amount of space a database consumes and
ensure that data is logically stored.
First Normal Form - 1NF:
First normal form (1NF) sets the very basic rules for an organized
database:
• Eliminate duplicative columns from the same table.
• Create separate tables for each group of related data and identify
each row with a unique column or set of columns (the primary
key).
The first normal form only says that the table should only include
atomic values, i.e. one value per box. For example, we cannot in
Table 1 below put in both Volvo and SAAB in the same box even if
we buy cars from both suppliers. We must use to different rows for
storing that. In most RDBMSs it is not allowed to assign more than
one value to each box that result in that all tables are in first
normal form.
15. Second Normal Form - 2NF
The second normal form says that a table, despite being in 1NF, is
not allowed to contain any full functional dependencies on
components of the primary key.
- A relation schema R is 2NF if every nonprime attributes A in R
is fully functional dependency on P.K of R.
- Fully Functional Dependency: functional dependency is
constraints on the set of legal relations.
- It plays important role in database design.
- The functional dependency is denoted by - , between two
set of attributes , .
- Let R is a relation scheme and and then the
functional dependency - hold on R. if in any legal relation
r(R) for all pairs of tuples t1 and t2 in r such that
t1[ 1]-t2[ 2] and their must be t1[ 1]-t2[ 2]
- FD represent on interrelationship among attributes of an
entity represented by a relation.
- A better definition of 2NF: To fulfill 2NF a table should fulfill
1NF and in addition every non-key attribute should be FFD of
every candidate key.
Third Normal Form - 3NF
A table is said to be third normal form, if all the non key field of the
table are independent of other non-key field of the table.
- 3rd NF is based on the concept of transitive dependency.
- A functional dependency X-Y in a relation schema R is
transitive dependency. If there is set of attributes Z that is
neither a candidate key nor a subset of key and both X-Z and
Z-Y is hold.
- When a non key attributes depends on other non key
attributes is called a transitive dependency.
Sl.NO ORIGIN DESTINATION DISTANCE
Here non key attributes Distance dependent on other non
key attributes Origin and Destination.
Origin, Destination- Distance is transitive dependency.
16. Boyce Codd Normal Form - BCNF
Every non-trivial functional dependency in the table is a
dependency on a super key.
- Trivial functional dependency:
A trivial functional dependency is a functional dependency of
an attribute on a superset of itself. {Employee ID, Employee
Address} {Employee Address} is trivial, as is {Employee
Address} {Employee Address}.
- BCNF is simple form of 3NF.but it is much strict then 3NF.it
means that every BCNF relation is also 3Rd NF, but a relation
in 3RD NF is not a BCNF.
- A relation schema R is in BCNF with respect to a set of FD, if
for all FD in F+ of the form -- where and at least
one of the following rule hold.
- A) - is trival functional dependency that
- B) is super key of schema R.
PID C_NAME PLOT_NO AREA PRICE TAX_RATE
FD1
FD2
FD4 FD3
FD5
The plot schema is not 3Rd NF, since the FD3 and FD4 violates the
3NF. Hence it is decomposed into BCNF as follow.
Area--------- Price
C_Name--------- Tax_Rate
17. PID C_NAME PLOT_NO AREA
FD1
FD2
FD3
Area Price C_Name Tax_Rate
R1 R2
In the relation R is in 3RD Nf but it is not BCNF. since Area-
C_name violates the BCNF because Area is not super key.
So R3 is decomposed R31, R32.hence the PID is super key.
The BCNF relations are:
R1(Area,Price)
R2(C_Name,Tax_Rate)
R3(Area,C_Name)
R4(PId,Plolt_no,Area)
Fourth Normal Form - 4NF: A relation schema R is in 4NF with
respect to a set D of Functional dependency and multivalve
dependencies in D+ of the form - --- where R and R at
least one of the following rule hold.
1) --- -- is multi-value dependency
2) is a super key of R(Schema)
if -- -- is a multi-valuee dependency on schema R, so
-- -- is trival if or U =R
Table: loan_info
Loan_no Cust_Name Street City
110 Ram G.Nagar B.Patana
110 Ram I.Nagar B.Patana
120 Hari K.Nagar Rkl
18. Here we find the cust_name--- - Street,city is MVD and
cust_name is not super key of R. we replace the loan_info into two
schema. Borrower
Cust_name Loan_no
Ram 110
Hari 120
Customer
Cust_Name Strret City
Ram G.Nagar B.Patana
Ram I.Nagar B.Patana
Hari K.Nagar Rkl
Fifth Normal Form - 5NF: it is based on join dependency calllled
project join dependency.
- A relation schema R is in PJNF w.r.t D of functional
dependency,multi-value dependency. If for all join dependency
in D+ of the form *(R1, R2, R3………..Rn) where Ri R and
R= R1UR2UR3uR4………Urn at least one of the following rule
hold.
1) *(R1, R2, R3………..Rn) is a trival join dependency.
2) Every Ri is super key of R.
Join dependency: A table T is subject to a join dependency if T can
always be recreated by joining multiple tables each having a subset
of the attributes of T.
If r=R1UR2UR3…………….Rn, we say that relation r(R) satisfy
the join dependency *(R1, R2, R3………….Rn).this dependency
require for all legal r( R)= R1(r) X R2 (r)………………. Rn (r)
19. Important Points
Functional dependency
In a given table, an attribute Y is said to have a functional
dependency on a set of attributes X (written X Y) if and only if
each X value is associated with precisely one Y value. For example,
in an Employee table that includes the attributes Employee ID
and Employee Date of Birth, the functional dependency {Employee
ID} {Employee Date of Birth} would hold. It follows from the
previous two sentences that each {Employee ID} is associated with
precisely one {Employee Date of Birth}.
Trivial functional dependency
- Let R is a relation and FD -- is trival dependency if
- A Fd is said to be trival functional dependency they are
satisfied all relations.
- A A,AB A
A trivial functional dependency is a functional dependency of an
attribute on a superset of itself. {Employee ID, Employee Address}
{Employee Address} is trivial, as is {Employee Address} {Employee
Address}.
Full functional dependency
An attribute is fully functionally dependent on a set of attributes X
if it is:
• functionally dependent on X, and
• not functionally dependent on any proper subset of X.
{Employee Address} has a functional dependency on
{Employee ID, Skill}, but not a full functional dependency,
because it is also dependent on {Employee ID}.
20. Transitive dependency
A transitive dependency is an indirect functional dependency, one
in which X Z only by virtue of X Y and Y Z.
Multivalued dependency
A multivalued dependency is a constraint according to which the
presence of certain rows in a table implies the presence of certain
other rows.
Join dependency
A table T is subject to a join dependency if T can always be
recreated by joining multiple tables each having a subset of the
attributes of T.
Superkey
A superkey is a combination of attributes that can be used to
uniquely identify a database record. A table might have many
superkeys.
Candidate key
A candidate key is a special subset of superkeys that do not have
any extraneous
Non-prime attribute
A non-prime attribute is an attribute that does not occur in any
candidate key. Employee Address would be a non-prime attribute in
the Employees' Skills table.
Prime attribute:A prime attribute, conversely, is an attribute that
does occur in some candidate key.
21. Primary key
Most DBMSs require a table to be defined as having a single unique
key, rather than a number of possible unique keys. A primary key is
a key which the database designer has designated for this purpose.
Query Processing
Query processing refer to no of activity involved in retrieve or
extracting data from database.
- Transfer query in High level language (SQL) into Low level
language (Relational algebra)
- Execute to retrieve of data.
Query Optimization: query optimizer is the process of selecting the
most efficient query among many strategies, i.e. usually possible for
processing.
- Query optimization reduces the execution time of query.
- Scanner, Parser, and validator
Internal representation of query
Plan
Generation
Cost
Estimation
Execute query
Query code generator
Code execute in query
Run-time database
processor.
Result query
System catalogue
manager
22. - A query expressed in high level language such as sql must first
scanned, parsed and validated.
- Scanner: identify the language taken such as sql ,keyboard,
attribute name and relational schema name.
- Parser: Parser check the query syntax to determine whether it
is formulated according to syntax rule or not.
- Validator: checking all the attributes and relation names are
valid and semantically meaningful name exist in database or
not.
- Internal representation of query: it is usually as tree data
structure called query tree. it can also represented query
graph
- Query Optimizer: is responsible for identifying an efficient
execution plan for evaluating query.
- I) optimizer generates alternate plan and choose plan with
least estimated cost.
- II) To estimate cost of plan, optimizer uses the system
catalog/data dictionary.
- Code generator: it generates the code to execute the plan,
chosen by query optimizer.
- Runtime Time Database: the processor has the task of
running the query code to produce the query result.
****************************End of Module II*********************
Possible Questions: (2 Marks)
Difference between natural join and inner join:
- It is a binary operation that allows us to combine certain
selection and a Cartesian product into one operation.
- It is denoted as
- It generates a Cartesian product of its two arguments and
performs a selection forcing equality on those attributes that
appear in both relations.
23. - It removes duplicate attributes.
Inner Join:
- it is binary operation
- it is represented by command inner join
- it generates new relation that contain tuples are common in
both relation with conditions.
- It cannot remove the duplicate attributes.
Update anomalies:
- The redundancy causes problems with storage, retrieval, and
updating of data.
- The redundancy can lead to update anomalies such as
inserting, modifying, and deleting data may cause
inconsistency.
Multivalued dependency
- A multivalued dependency is a constraint according to which
the presence of certain rows in a table implies the presence of
certain other rows.
- Let R be the relation schema and ( Subset) and
(subset). The multivalue dependency --- - in R.
Semi less join:
- It reduce the number of tuples in arelation before transferring
to another relation.
- It follows that the resulting relation will have two attributes
with non identical values in every tuples.
- If one of the these attributes is projected away and the other
renamed(if necessary)
- After applying semi less join , the resulting relation has exactly
the same set of tuples, but a difference name and a difference
schema.