The document discusses the commercial query language Query-by-Example (QBE) which was developed by IBM in the 1970s as a graphical query language based on relational algebra. QBE allows users to express queries by filling in example tables representing the relations and attributes being queried. The document provides examples of different types of queries that can be expressed in QBE including selection, projection, join, grouping, and aggregate queries.
This document describes a database project for a supermarket management system. The objectives are to automate the management of sales, stock, and other activities in a supermarket to make the system more reliable, fast, and easy to use. It involves adding product data, processing customer purchases and payments, updating stock levels, and ordering more products from suppliers when needed. The document discusses the data tables required, their attributes, relationships between tables, and normalization steps to reduce redundancy and improve the database structure. The goal is to make managing the supermarket more efficient by storing data electronically and reducing manual processes.
The document discusses first normal form (1NF) in databases. 1NF requires that each attribute contain atomic (non-divisible) values, and disallows composite attributes or attributes with multiple values. The example database violates 1NF by having a location attribute with composite values. There are three proposed solutions: 1) split the relation into two tables, 2) expand the key to separate tuples for each location, or 3) introduce additional attributes to store each location value separately.
State transition testing involves designing tests to trigger valid and invalid state transitions of a system. It is used when a system's features are represented as a finite number of states that transform based on rules. Tests are created for each initial state by identifying the input, current state, and expected output. An example is testing an ATM that allows a withdrawal if funds are available but refuses if the account is empty due to a prior withdrawal.
The document provides instructions and examples for using basic mathematical functions like SUM, AVERAGE, and subtraction in Microsoft Excel. It demonstrates how to add the values in a range of cells using the SUM function and how to subtract numbers by typing them out or using a subtraction formula. Examples are given of adding quantities and prices of food items in a table and computing the total.
This document describes a pizza ordering system with the following key features:
1. The system allows administrators to manage stores, food items, and order statuses while customers can view stores, add items to a cart, modify orders, make payments and view past orders.
2. Both administrators and customers can change their passwords and logout of active sessions. If a previous session was not logged out, the user will be notified to either continue the session or logout.
3. If a customer cancels an order, the payment amount is immediately refunded to their account. The system also provides customers with offer notifications.
The document outlines specifications for a bank management system that allows customers to create and manage bank accounts. It includes sections on team members, aims, problem description, requirements, module descriptions, entity relationship diagrams, outputs, conclusions, and screenshots. The system provides customers access to create accounts, deposit/withdraw funds, and view reports. It was developed to meet banking needs and allow additional functionality beyond conventional systems.
Database recovery is the process of restoring a database to its most recent consistent state before a failure occurred. The purpose is to preserve the ACID properties of transactions and bring the database back to the last consistent state prior to the failure. Database failures can occur due to transaction failures, system failures, or media failures. A good recovery plan is important for making a quick recovery from failures.
This document describes a database project for a supermarket management system. The objectives are to automate the management of sales, stock, and other activities in a supermarket to make the system more reliable, fast, and easy to use. It involves adding product data, processing customer purchases and payments, updating stock levels, and ordering more products from suppliers when needed. The document discusses the data tables required, their attributes, relationships between tables, and normalization steps to reduce redundancy and improve the database structure. The goal is to make managing the supermarket more efficient by storing data electronically and reducing manual processes.
The document discusses first normal form (1NF) in databases. 1NF requires that each attribute contain atomic (non-divisible) values, and disallows composite attributes or attributes with multiple values. The example database violates 1NF by having a location attribute with composite values. There are three proposed solutions: 1) split the relation into two tables, 2) expand the key to separate tuples for each location, or 3) introduce additional attributes to store each location value separately.
State transition testing involves designing tests to trigger valid and invalid state transitions of a system. It is used when a system's features are represented as a finite number of states that transform based on rules. Tests are created for each initial state by identifying the input, current state, and expected output. An example is testing an ATM that allows a withdrawal if funds are available but refuses if the account is empty due to a prior withdrawal.
The document provides instructions and examples for using basic mathematical functions like SUM, AVERAGE, and subtraction in Microsoft Excel. It demonstrates how to add the values in a range of cells using the SUM function and how to subtract numbers by typing them out or using a subtraction formula. Examples are given of adding quantities and prices of food items in a table and computing the total.
This document describes a pizza ordering system with the following key features:
1. The system allows administrators to manage stores, food items, and order statuses while customers can view stores, add items to a cart, modify orders, make payments and view past orders.
2. Both administrators and customers can change their passwords and logout of active sessions. If a previous session was not logged out, the user will be notified to either continue the session or logout.
3. If a customer cancels an order, the payment amount is immediately refunded to their account. The system also provides customers with offer notifications.
The document outlines specifications for a bank management system that allows customers to create and manage bank accounts. It includes sections on team members, aims, problem description, requirements, module descriptions, entity relationship diagrams, outputs, conclusions, and screenshots. The system provides customers access to create accounts, deposit/withdraw funds, and view reports. It was developed to meet banking needs and allow additional functionality beyond conventional systems.
Database recovery is the process of restoring a database to its most recent consistent state before a failure occurred. The purpose is to preserve the ACID properties of transactions and bring the database back to the last consistent state prior to the failure. Database failures can occur due to transaction failures, system failures, or media failures. A good recovery plan is important for making a quick recovery from failures.
This documentation has been prepared to give an overview of the Super shop management software system specification for the real-life projects that each student of Database Design and Development , has to develop and implement group. Super shop management software system should be purchased from software package vendors and customized to the departmental Super shop’s needs, if necessary. Customer service refers to a departmental Super shop ability to satisfy the needs of its customers by this Super shop management software system.
Limit Pricing content slideshow. Designed for the Economic A level qualification. Can be used in revision and in class.
Subtopics
Intro to Limit Pricing
Spotting & Evaluating Limit Pricing
This document discusses data independence in databases. It defines database schemas, including the internal, conceptual, and external schemas that make up the three-schema architecture. The database state and valid state are also defined. Logical data independence allows changes to the conceptual schema without changing external schemas or applications. Physical data independence allows changes to the internal schema without changing the conceptual schema. Both help ensure that changes to lower-level schemas do not require changes to higher-level schemas and applications.
Hospital Management system Database designElias Dinsa
The document describes an entity relationship diagram (ERD) for a hospital management system. The ERD includes entities for patients, doctors, labs, inpatients, outpatients, rooms, and bills. It shows the attributes and relationships between these entities, such as patients being linked to doctors, labs, and bills, and inpatients and outpatients being linked to rooms. The ERD is used to model the relationships between key objects in the hospital system.
SUSHRUTA is an application developed for Pharmacy automation. All the process to be happened in a pharmacy can be done through this application and it will store the data in cloud. Also it will generate reports.
The document provides algorithms and flowcharts for:
1) Finding the average of two numbers by inputting the numbers, adding them, and dividing the sum by 2.
2) Summing the even numbers between 1 and 20 by initializing a sum and counter, adding the counter if it is even, and incrementing the counter until it reaches 20.
3) Finding the sum of the first 50 natural numbers by initializing a sum and counter, adding the counter to the sum, and repeating until the sum reaches 50.
In the long-run a firm can amend its size and organization to violate demand conditions. In other words, in the long-run the firm can adjust its scale of operations or size of plant to produce any required output in the most efficient way. Thus, in the long run fixed factors can be altered. Management can be restructured to run a firm of a different size. Capital can also be used differently. In short, all factors are variable in the long run and therefore the scale of operations can be altered
This document discusses different types of loops in R including for loops, while loops, repeat loops, and nested loops. It provides code examples and explanations of how each loop works. For loops are used to iterate over vectors and can iterate by value or index. While loops execute a block of code until a test condition is no longer satisfied. Repeat loops continuously iterate until a break statement is reached. Nested for loops are useful for traversing multi-dimensional data. Finally, apply functions like lapply and sapply implement looping internally to apply functions over lists or arrays.
CIS 2303 LO1: Introduction to System Analysis and DesignAhmad Ammari
This document provides an overview of the Systems Analysis and Design course, including describing the evolution of software development methodologies and outlining the learning objectives. It defines key terms like information systems, systems analysis and design, and IT. It also explains the systems development life cycle (SDLC) model and its phases of planning, analysis, design, implementation, and support.
This document outlines a proposed real estate management system with modules for property registration, vendor registration, client registration, and reporting. The system would allow users to register properties and documentation, vendors, and clients. It includes modules for login, property, registration, and reports. The system would be developed using Java programming on a Windows operating system with a MySQL backend for data storage.
This document discusses client-server architecture. It defines clients as workstations that rely on servers for resources like files, devices, and processing power. Servers are dedicated computers that manage disk drives, printers, or network traffic. In a client-server model, applications are split into client and server components, with clients accessing services provided by servers. There are two main types: 2-tier, with clients and a single server, and 3-tier, with separate servers for the interface, logic, and data layers, allowing for better scalability. Thin clients rely fully on servers, while fat clients run some application logic locally.
The document discusses deadweight loss that occurs due to taxes and monopolies. It provides the following key points:
- A tax creates a wedge between the price paid by buyers and received by sellers, resulting in a reduction in quantity traded and deadweight loss for society. The size of the deadweight loss depends on the price elasticities of supply and demand.
- Monopolies also create deadweight loss by setting price above marginal cost. Price discrimination allows monopolies to reduce deadweight loss by charging different prices to different customers.
- Estimating deadweight loss is difficult but important for evaluating market efficiency. Two approaches discussed are Harburger's method using industry profit margins and Cowling and Mueller's method
User Interface Design-Module 4 Windows
Subject Code:15CS832 USER INTERFACE DESIGN
VTU UNIVERSITY
Referred Text Book: The Essential Guide to User Interface Design (Second Edition) Author: Wilbert O. Galitz
This document discusses basic path testing, which is a white box testing method based on cyclomatic complexity. It uses control flow graphs to establish path coverage criteria. The key steps are: 1) drawing a control flow graph, 2) determining cyclomatic complexity using various formulas, 3) finding a basis set of independent paths, and 4) generating test cases to cover each path. The example provided calculates the cyclomatic complexity as 3 and identifies 3 paths to test for the given code fragment.
In today’s busy and expensive life we are in a great rush to make money. But at the end of the month we broke off. As we are unknowingly spending money on little and unwanted things. So, we have come over with the idea to track our earnings. Daily Expense Tracker (DET) aims to help everyone who are planning to know their expenses and save from it. DET is an android app which users can execute in their mobile phones and update their daily expenses so that they are well known to their expenses. Here user can define their own categories for expense type like food, clothing, rent and bills where they have to enter the money that has been spent and also can add some information in additional information to specify the expense. User can also define expense categories. User will be able to see pie chart of expense. Also, DET app is capable of clustering. Personal and administration clustering is possible by the use of Apriori algorithm. Although this app is focused on new job holders, interns, and teenagers, everyone who wants to track their expense can use this app.
This document outlines the syllabus for a Business Economics course. It includes required texts, grading criteria, and an overview of key economic concepts to be covered throughout the semester. Specifically, it will cover microeconomics and macroeconomics topics, including scarcity, production possibility frontiers, demand and supply analysis, and the role of economics in managerial decision making. Students will be evaluated based on class participation, assignments, presentations, exams and a final exam.
E-commerce is growing fast in today's world. It has Multiple Applications. As such, it is difficult to name each and every one of them. These are few of the most commonly used applications.
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
ONLINE FOOD ORDER SYSTEM is a website designed primarily for use in the food delivery industry. This system will allow hotels and restaurants to increase scope of business by reducing the labor cost involved. The system also allows to quickly and easily manage an online menu which customers can browse and use to place orders with just few clicks. Restaurant employees then use these orders through an easy to navigate graphical interface for efficient processing.
In this system we will make extensive use of files system in C++.
We will have a login id system initially. In this system we will be having separate functions for
• Getting the information
• Getting customer information who are lodged in
• Allocating a room to the customer
• Checking the availability
• Displaying the features of the rooms.
• Preparing a billing function for the customer according to his room no.
In the software developed separate functions will be there for each of the above points so that there is ample scope for adding more features in the near future.
Download From Here : https://drive.google.com/folderview?id=0B5y_t4zL91BZaWRkY1VPeElJNVE&usp=sharing
This document provides guidelines for designing effective dialog boxes in applications. It discusses the different types of dialogs including modal and modeless, and their appropriate uses. It recommends using verbs in titles for function dialogs and object names for property dialogs. The document also provides tips for managing content within dialog boxes, such as using tabbed, expanding, or cascading designs. It concludes with examples from applications like PowerPoint, Photoshop, and Dreamweaver that demonstrate best practices.
General form of a research paper presentationWaqar Younus
This document provides guidance on writing a research paper according to general standards. It discusses the typical sections of a research paper including the title page, abstract, introduction, materials and methods, results, discussion, and references. For each section, it provides the general intent, guidelines for writing that section, and tips on style. The document emphasizes writing concisely and focusing on the essential information needed for others to understand and potentially replicate the study.
This documentation has been prepared to give an overview of the Super shop management software system specification for the real-life projects that each student of Database Design and Development , has to develop and implement group. Super shop management software system should be purchased from software package vendors and customized to the departmental Super shop’s needs, if necessary. Customer service refers to a departmental Super shop ability to satisfy the needs of its customers by this Super shop management software system.
Limit Pricing content slideshow. Designed for the Economic A level qualification. Can be used in revision and in class.
Subtopics
Intro to Limit Pricing
Spotting & Evaluating Limit Pricing
This document discusses data independence in databases. It defines database schemas, including the internal, conceptual, and external schemas that make up the three-schema architecture. The database state and valid state are also defined. Logical data independence allows changes to the conceptual schema without changing external schemas or applications. Physical data independence allows changes to the internal schema without changing the conceptual schema. Both help ensure that changes to lower-level schemas do not require changes to higher-level schemas and applications.
Hospital Management system Database designElias Dinsa
The document describes an entity relationship diagram (ERD) for a hospital management system. The ERD includes entities for patients, doctors, labs, inpatients, outpatients, rooms, and bills. It shows the attributes and relationships between these entities, such as patients being linked to doctors, labs, and bills, and inpatients and outpatients being linked to rooms. The ERD is used to model the relationships between key objects in the hospital system.
SUSHRUTA is an application developed for Pharmacy automation. All the process to be happened in a pharmacy can be done through this application and it will store the data in cloud. Also it will generate reports.
The document provides algorithms and flowcharts for:
1) Finding the average of two numbers by inputting the numbers, adding them, and dividing the sum by 2.
2) Summing the even numbers between 1 and 20 by initializing a sum and counter, adding the counter if it is even, and incrementing the counter until it reaches 20.
3) Finding the sum of the first 50 natural numbers by initializing a sum and counter, adding the counter to the sum, and repeating until the sum reaches 50.
In the long-run a firm can amend its size and organization to violate demand conditions. In other words, in the long-run the firm can adjust its scale of operations or size of plant to produce any required output in the most efficient way. Thus, in the long run fixed factors can be altered. Management can be restructured to run a firm of a different size. Capital can also be used differently. In short, all factors are variable in the long run and therefore the scale of operations can be altered
This document discusses different types of loops in R including for loops, while loops, repeat loops, and nested loops. It provides code examples and explanations of how each loop works. For loops are used to iterate over vectors and can iterate by value or index. While loops execute a block of code until a test condition is no longer satisfied. Repeat loops continuously iterate until a break statement is reached. Nested for loops are useful for traversing multi-dimensional data. Finally, apply functions like lapply and sapply implement looping internally to apply functions over lists or arrays.
CIS 2303 LO1: Introduction to System Analysis and DesignAhmad Ammari
This document provides an overview of the Systems Analysis and Design course, including describing the evolution of software development methodologies and outlining the learning objectives. It defines key terms like information systems, systems analysis and design, and IT. It also explains the systems development life cycle (SDLC) model and its phases of planning, analysis, design, implementation, and support.
This document outlines a proposed real estate management system with modules for property registration, vendor registration, client registration, and reporting. The system would allow users to register properties and documentation, vendors, and clients. It includes modules for login, property, registration, and reports. The system would be developed using Java programming on a Windows operating system with a MySQL backend for data storage.
This document discusses client-server architecture. It defines clients as workstations that rely on servers for resources like files, devices, and processing power. Servers are dedicated computers that manage disk drives, printers, or network traffic. In a client-server model, applications are split into client and server components, with clients accessing services provided by servers. There are two main types: 2-tier, with clients and a single server, and 3-tier, with separate servers for the interface, logic, and data layers, allowing for better scalability. Thin clients rely fully on servers, while fat clients run some application logic locally.
The document discusses deadweight loss that occurs due to taxes and monopolies. It provides the following key points:
- A tax creates a wedge between the price paid by buyers and received by sellers, resulting in a reduction in quantity traded and deadweight loss for society. The size of the deadweight loss depends on the price elasticities of supply and demand.
- Monopolies also create deadweight loss by setting price above marginal cost. Price discrimination allows monopolies to reduce deadweight loss by charging different prices to different customers.
- Estimating deadweight loss is difficult but important for evaluating market efficiency. Two approaches discussed are Harburger's method using industry profit margins and Cowling and Mueller's method
User Interface Design-Module 4 Windows
Subject Code:15CS832 USER INTERFACE DESIGN
VTU UNIVERSITY
Referred Text Book: The Essential Guide to User Interface Design (Second Edition) Author: Wilbert O. Galitz
This document discusses basic path testing, which is a white box testing method based on cyclomatic complexity. It uses control flow graphs to establish path coverage criteria. The key steps are: 1) drawing a control flow graph, 2) determining cyclomatic complexity using various formulas, 3) finding a basis set of independent paths, and 4) generating test cases to cover each path. The example provided calculates the cyclomatic complexity as 3 and identifies 3 paths to test for the given code fragment.
In today’s busy and expensive life we are in a great rush to make money. But at the end of the month we broke off. As we are unknowingly spending money on little and unwanted things. So, we have come over with the idea to track our earnings. Daily Expense Tracker (DET) aims to help everyone who are planning to know their expenses and save from it. DET is an android app which users can execute in their mobile phones and update their daily expenses so that they are well known to their expenses. Here user can define their own categories for expense type like food, clothing, rent and bills where they have to enter the money that has been spent and also can add some information in additional information to specify the expense. User can also define expense categories. User will be able to see pie chart of expense. Also, DET app is capable of clustering. Personal and administration clustering is possible by the use of Apriori algorithm. Although this app is focused on new job holders, interns, and teenagers, everyone who wants to track their expense can use this app.
This document outlines the syllabus for a Business Economics course. It includes required texts, grading criteria, and an overview of key economic concepts to be covered throughout the semester. Specifically, it will cover microeconomics and macroeconomics topics, including scarcity, production possibility frontiers, demand and supply analysis, and the role of economics in managerial decision making. Students will be evaluated based on class participation, assignments, presentations, exams and a final exam.
E-commerce is growing fast in today's world. It has Multiple Applications. As such, it is difficult to name each and every one of them. These are few of the most commonly used applications.
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
ONLINE FOOD ORDER SYSTEM is a website designed primarily for use in the food delivery industry. This system will allow hotels and restaurants to increase scope of business by reducing the labor cost involved. The system also allows to quickly and easily manage an online menu which customers can browse and use to place orders with just few clicks. Restaurant employees then use these orders through an easy to navigate graphical interface for efficient processing.
In this system we will make extensive use of files system in C++.
We will have a login id system initially. In this system we will be having separate functions for
• Getting the information
• Getting customer information who are lodged in
• Allocating a room to the customer
• Checking the availability
• Displaying the features of the rooms.
• Preparing a billing function for the customer according to his room no.
In the software developed separate functions will be there for each of the above points so that there is ample scope for adding more features in the near future.
Download From Here : https://drive.google.com/folderview?id=0B5y_t4zL91BZaWRkY1VPeElJNVE&usp=sharing
This document provides guidelines for designing effective dialog boxes in applications. It discusses the different types of dialogs including modal and modeless, and their appropriate uses. It recommends using verbs in titles for function dialogs and object names for property dialogs. The document also provides tips for managing content within dialog boxes, such as using tabbed, expanding, or cascading designs. It concludes with examples from applications like PowerPoint, Photoshop, and Dreamweaver that demonstrate best practices.
General form of a research paper presentationWaqar Younus
This document provides guidance on writing a research paper according to general standards. It discusses the typical sections of a research paper including the title page, abstract, introduction, materials and methods, results, discussion, and references. For each section, it provides the general intent, guidelines for writing that section, and tips on style. The document emphasizes writing concisely and focusing on the essential information needed for others to understand and potentially replicate the study.
This document discusses column level encryption in Microsoft SQL Server. It begins with an introduction to the problem of protecting sensitive data like credit card numbers. It then provides an overview of encryption types in databases before detailing the encryption hierarchy and specific mechanisms in SQL Server, including Transact-SQL functions, asymmetric keys, symmetric keys, certificates, and Transparent Data Encryption (TDE). The document focuses on column level encryption, outlining the process of creating keys and certificates and using encryption at the column level, along with the advantages of high security and disadvantages of potential performance impacts.
This presentation discusses how young Indians can overcome distractions and worries to focus on their goals and responsibilities. It notes that many students are wasting time instead of concentrating on their careers, and youth are becoming a burden to their parents instead of leaders for the nation. The presentation provides tips for overcoming distractions, such as knowing the root causes, realizing the daily impacts, making oneself aware of consequences, aligning actions with thoughts, seeing things objectively, and keeping oneself busy. The overall message is that by implementing these tips sincerely, young Indians can maximize their potential to build a successful future.
1) The Internet originated in 1969 as ARPANET and has since evolved to include hundreds of millions of connected devices worldwide. It allows sharing of information between individuals and organizations.
2) An IP address uniquely identifies devices on the Internet, while domain names provide a text alternative. DNS servers translate domain names to IP addresses.
3) The World Wide Web is a collection of electronic documents accessed via the Internet using browsers like Internet Explorer or Chrome. Web pages have URLs and can include text, images, videos and other media.
This document provides an overview of key concepts related to databases, including defining databases and how they interact with data, the importance of data integrity, how data is organized in layers, techniques for file maintenance and validation, the differences between file processing and database approaches, functions of database management systems, characteristics of different types of databases, guidelines for database design, and the roles of database analysts and administrators. The document uses examples, figures, and key terms to explain database concepts and how databases are used to organize and manage an organization's valuable data and information assets.
This document provides an overview of the MySQL database including:
- The different types of databases including MySQL, MS SQL Server, Oracle Server, and MS Access.
- The advantages of using MySQL such as being open-source, powerful, standard SQL language, works on many operating systems and with many languages.
- Key aspects of MySQL including queries, clauses, operators, keys, joins, and datatypes. Queries are used to manipulate and retrieve data while keys uniquely identify records. Joins combine data from multiple tables.
This document discusses various methods of computer output and output devices. It describes display devices like LCD monitors, plasma monitors, and televisions. It explains different types of printers like inkjet printers, laser printers, and multifunction peripherals. It also covers audio output devices like speakers, headphones and earbuds. Other output devices discussed include data projectors, interactive whiteboards, and accessories for disabled users. The document provides details on the characteristics and uses of these common computer output hardware.
Chapter 12 information system developmenthaider ali
This document provides an overview of key concepts and activities related to system development, including defining system development and listing its phases. It discusses guidelines for system development such as grouping activities into phases, involving users, and defining standards. Each system development phase is then explained in detail, outlining the objectives and typical activities performed during planning, analysis, design, implementation, and operation/support phases. Diagrams and examples are provided to illustrate system development tools and methodologies.
1. A database is a collection of data organized in a structured format. Examples of databases include attendance registers, bank accounts, shopping lists, resume collections, contact lists, and notes.
2. A database management system (DBMS) is software that allows users to create, access, manage and control databases. Common DBMS functions include database creation, querying, manipulation, and controlling access.
3. The main differences between a database and a DBMS are that a database refers to the collection of data itself, while a DBMS is the software that manages the database and allows users to perform tasks like querying and updating the data.
The document discusses the functions and features of operating systems. It defines system software and describes the two main types: operating systems and utility programs. It explains that an operating system coordinates computer resources and provides functions like managing memory, multitasking programs, connecting to networks and the internet, updating software, and administering security. The document outlines features of several common operating systems and their use for both stand-alone and server environments.
This document outlines health and safety topics covered in an induction training. It discusses hazards associated with working at heights, proper use of ladders and scaffolding, fall protection, machine safety, chemical hazards, traffic safety, fire safety, and more. Safety signage and their meanings are explained. Penalties for safety infractions are listed to encourage compliance with safety rules and regulations. The goal is to educate workers on best practices to avoid accidents and injuries on the jobsite.
The document summarizes the findings of a usability test conducted on the XXXXX.gov website. It identifies 4 main problems: (1) poor search results and lack of highlighted search terms, (2) unclear purpose and intended audience of the site, (3) accessibility issues violating Section 508, and (4) confusion about which links were internal/external. It provides recommendations for addressing each problem and improving the user experience and accessibility of the site. The document reports an overall task success rate of XX% and that X users participated in the usability testing.
1. CS 222
Database Management System
Spring 2010-11
Lecture 3
Korra Sathya Babu
Department of Computer Science
NIT Rourkela
02/11/13 Lecture 3 1
2. Commercial Query Languages
• RA and RC are formal and abstract Languages developed for the
Relational model in the database technology
• Many languages were commercialized taking the foundations from the
abstract query languages
– QBE
– QUEL
– SQL
02/11/13 Lecture 3 2
4. Query-by-Example (QBE)
• Developed by Moshe M. Zoolf at IBM Research
during mid 1970s (in parallel to the development of SQL)
• A graphical query language which is based on the
notion of DRC
– QBE queries can be translated to DRC directly but queries containing
aggregate operators, sorting etc cannot be converted
• Two dimensional syntax – system creates
templates of relations that are requested by users
• Queries are expressed “by example”
5. Query-by-Example (QBE)
• A “GUI” for expressing queries.
– Actually invented before GUIs.
– Very convenient for simple queries.
– Awkward for complex queries.
• QBE an IBM trademark.
– But has influenced many projects
– Especially PC Databases: Paradox,
Access, etc.
6. Syntax
• QBE Queries are posed by placing constants and variables
(example elements) into individual columns and thereby
creating an example tuple of the query result
• Variables used are domain variables
• Variable symbols are prefixed by underscore
• Commands are followed by a dot
• The field that should appear in the answer are specified by
the command P. (stands for Print (also called retrieval
command))
• Equal operator is by default . Other comparison operators
can also be used
• Link establishment between relations is done by example
elements
7. Syntax
• Aggregate functions and Groupings used by
adding prefixes are
– CNT.ALL.
– SUM.ALL.
– CNT.UNQ.ALL.
– MAX.ALL.
– MIN.ALL
– AVG.ALL
– MOD.ALL
– G. (Groupings)
• Sorting commands used are
– .DO (Descending Order)
– .AO ( Ascending Order)
• General Commands used are
– P. (Print), I. (Insert), U. (Update), D. (Delete)
8. Example
Sno Sname Ratin Age Sid bid day bid bname color
g 22 101 10/10/08 101 Interlake Blue
22 Dustine 7 45.0
22 102 10/10/08 102 Interlake Red
29 Brutus 1 33.0
22 103 10/08/08 103 Clipper Green
31 Lubber 8 55.5
22 104 10/07/08 104 Marine red
32 Andy 8 25.5
31 102 10/10/08 Instance of Boats
58 Rusty 10 35.0
31 103 11/06/08
64 Horatio 7 35.0
31 104 11/12/08
71 Zorba 10 16.0
64 101 09/05/08
74 Horatio 9 35.0
85 Art 3 25.5 64 102 09/08/08
95 Bob 3 63.5 74 103 09/08/08
Instance of Instance of Reserves
Sailors
02/11/13 Lecture 3 8
9. `Example Tables’ in QBE
Relation name attributes
• QBE has its own screen Reserves sid bid day
editor
• Users specify a query by
filling in example tables, or
skeletons; we will use Boats bid bname color
these skeletons in our
examples.
Sailors sid sname rating age
10. `Creating Tables’ in QBE
Dictionary entry for Relation Reserves
I.P.I. Reserves sid bid day
Represent the dictionary entry of file columns of table Reserves
11. Basics
• To print names and ages of all sailors:
Sailors sid sname rating age
P._N P._A
Print all fields for sailors with rating > 8, in
ascending order by (rating, age):
Sailors sid sname rating age
P. AO(1). >8 AO(2).
QBE puts unique new variables in blank
columns. Above query in DRC (no ordering):
{ I, N , T , A | I, N , T , A ∈ Sailors ∧ T > 8}
12. And/Or Queries
• Names of sailors younger than 30 or older
than 20: Sailors sid sname rating age
P. < 30
P. > 20
Names of sailors younger than 30 and older than
20: Sailors sid sname rating age
_Id P. < 30
_Id P. > 20
Names of sailors younger than 30 and rating > 4:
Sailors sid sname rating age
_Id P. > 4 < 30
13. Duplicates
• Single row with P: Duplicates not eliminated
by default; can force elimination by using
UNQ.
Sailors sid sname rating age
UNQ. P. < 30
Multiple rows with P: Duplicates eliminated by
default! Can avoid elimination by using ALL.
Sailors sid sname rating age
ALL. _Id P. < 30
_Id P. > 20
14. Join Queries
• Names of sailors who’ve reserved a boat for
11/06/2008 and are older than 25 (note that
dates and strings with blanks/special chars
are quoted):
Sailors sid sname rating age
_Id P._S > 25
Reserves sid bid day
_Id ‘8/24/96’
Joins accomplished by repeating variables.
15. Join Queries (Contd.)
• Colors of boats reserved by sailors who’ve
reserved a boat for 8/24/96 and are older
than 25 :
Sailors sid sname rating age
_Id _S > 25
Reserves sid bid day
_Id _B ‘8/24/96’
Boats bid bname color
_B ‘Interlake’ P.
16. Join Queries (Contd.)
• Names and ages of sailors who’ve reserved
some boat that is also reserved by the sailor
with sid = 22:
Sailors sid sname rating age
_Id P. P.
Reserves sid bid day
22 _B
_Id _B
17. Unnamed Columns
• Useful if we want to print the result of an
expression, or print fields from 2 or more
relations.
– QBE allows P. to appear in at most one table!
Sailors sid sname rating age
_Id P. _R _A P._D P.(_R/_A)
Reserves sid bid day
_Id _D
18. “Negative Tables”
• Can place a negation marker in the
relation column:
Sailors sid sname rating age
_Id P._S
Reserves sid bid day
¬ _Id _B
Variables appearing in a negated table must
also appear in a positive table!
19. Aggregates
• QBE supports AVG, COUNT, MIN, MAX, SUM
– None of these eliminate duplicates, except COUNT
– Also have AVG.UNQ. etc. to force duplicate
elimination
Sailors sid sname rating age
_Id G. G.P.AO _A P.AVG._A
The columns with G. are the group-by fields; all
tuples in a group have the same values in these
fields.
— The(optional) use of .AO orders the answers.
— Every column with P. must include G. or an
aggregate operator to get the aggregates.
20. Conditions Box
• Used to express conditions involving 2 or
more columns, e.g., _R/_A > 0.2.
• Can express a condition that involves a
group, similar to the HAVING clause in SQL:
Sailors sid sname rating age CONDITIONS
G.P. _A AVG._A > 30
Express conditions involving AND and OR:
Sailors sid sname rating age CONDITIONS
P. _A 20 < _A AND _A < 30
21. Find sailors who’ve reserved all boats
• A division query; need aggregates (or update
operations) to do this in QBE.
Sailors sid sname rating age
P.G._Id
Reserves sid bid day CONDITIONS
_Id _B1 COUNT._B1= COUNT._B2
Boats bid bname color
_B2
23. Delete and Update
• Delete all reservations for sailors with rating < 4
Sailors sid sname rating age
_Id <4
Reserves sid bid day
D. _Id
Increment the age of the sailor with sid = 74
Sailors sid sname rating age
74 U._A+1
24. Restrictions on Update Commands
• Cannot mix I., D. and U. in a single example
table, or combine them with P. or G.
• Cannot insert, update or modify tuples using
values from fields of other tuples in the same
table. Example of an update that violates this
rule:
Sailors sid sname rating age
john _A
joe U._A+1
Should we update every Joe’s age?
Which John’s age should we use?
25. Find sailors who’ve reserved all boats
(Again!)
• We want to find sailors _Id such that there is
no boat _B that is not reserved by _Id:
Sailors sid sname rating age
_Id P._S
Boats bid bname color
¬ ¬
Reserves sid bid day
_B _Id _B
Illegal query! Variable _B does not appear in a
positive row. In what order should the two
negative rows be considered? (Meaning
changes!)
26. A Solution Using Views
• Find sailors who’ve not reserved some boat _B:
Sailors sid sname rating age BadSids sid
_Id P._S I. _Id
Boats bid bname color
¬
Reserves sid bid day
_B _Id _B
Next, find sailors not in this `bad’ set:
¬
Sailors sid sname rating age BadSids sid
_Id P._S _Id
27. Advantages of QBE
• User-friendly
• Order of the row is immaterial
• Highly non procedural query language
• Several ways to represent a query
• QBE is interpreter based so debugging is easy
28. Disadvantages of QBE
• QBE doesn’t support complete views
• QBE doesn’t have a preprocessor for
optimization
• Implementation of QBE is not complete but
theoretically its complete
29. Summary
• QBE is an elegant, user-friendly query language
based on DRC.
• Simple queries are especially easy to write in
QBE, and there is a minimum of syntax to learn.
• Has influenced the graphical query facilities
offered in many products, including Borland’s
Paradox and Microsoft’s Access.
Editor's Notes
1
3
3
4
5
6
7
8
9
10
Print the sname field of Sailors tuples such that there is no tuple in Reserves with the same value in the sid field.”
13
14
15 How can we modify this query to print the names of sailors who’ve reserved all boats?
16 How to insert multiple tuples
17
18 This update seeks to change Joe’s age based on John’s age. Since sname is not a key, the meaning of such a query is ambiguous—should we update every John’s age, and if so, based on which Joe’s age?
19 This query is illegal because the variable B does not appear in any positive row. Going beyond this technical objection, this QBE query is ambiguous with respect to the ordering of the two uses of ¬ . It could denote either the calculus query that we want to express or the following calculus query, which is not what we want: {I,N, T,A | I,N, T,A ∈ Sailors∧ ¬∃ Ir,Br,D ∈ Reserves ( ¬∃ B, BN,C ∈ Boats(I = Ir ∧ Br = B))} There is no mechanism in QBE to control the order in which the ¬ operations in a query are applied. (Incidentally, the above query finds all Sailors who have made reservations only for boats that exist in the Boats relation.)
20
22
22
22 It is quite expressive (relationally complete, if the update features are taken into account).