Reviewer - Module 6 Database
Reviewer - Module 6 Database
Commands:
• SELECT - retrieve data from a database
• INSERT - insert data into a table
• UPDATE - updates existing data within a table
• DELETE - Delete all records from a database table
• MERGE - UPSERT operation (insert or update)
Data Control Language
Commands:
• GRANT - allow users access privileges to the database
• REVOKE - withdraw users access privileges given by using
the GRANT command
Commands:
• COMMIT - commits a Transaction
• ROLLBACK - rollback a transaction in case of
any error occurs
INTERFACES
• These interfaces present the user with lists of options (called menus) that lead the user
through the formulation of a request. Menus do away with the need to memorize the specific
commands and syntax of a query language; rather, the query is composed step-by step by
picking options from a menu that is displayed by the system.
• Pull-down menus are a very popular technique in Web-based user interfaces. They are
also often used in browsing interfaces, which allow a user to look through the contents of
a database in an exploratory and unstructured manner.
Forms-based Interfaces
• A GUI typically displays a schema to the user in diagrammatic form. The user then can
specify a query by manipulating the diagram. In many cases, GUIs utilize both menus and
forms.
Natural language interface
• These interfaces accept requests written in English or some other language and
attempt to understand them.
• A natural language interface usually has its own schema, which is similar to the database
conceptual schema, as well as a dictionary of important words. The natural language interface
refers to the words in its schema, as well as to the set of standard words in its dictionary,
that are used to interpret the request.
• If the interpretation is successful, the interface generates a high-level query
corresponding to the natural language request and submits it to the DBMS for
processing; otherwise, a dialogue is started with the user to clarify the request.
• These are somewhat similar to Web search engines, which accept strings of natural
language (like English or Spanish) words and match them with documents at specific sites (for
local search engines) or Web pages on the Web at large (for engines like Google or Ask).
• They use predefined indexes on words and use ranking functions to retrieve and
present resulting documents in a decreasing degree of match. Such “free form” textual
query interfaces are not yet common in structured relational databases, although a research
area called keyword-based querying has emerged recently for relational databases.
• Limited use of speech as an input query and speech as an answer to a question or result
of a request is becoming commonplace.
• Applications with limited vocabularies, such as inquiries for telephone directory, flight
arrival/departure, and credit card account information, are allowing speech for input and output
to enable customers to access this information.
• The speech input is detected using a library of predefined words and used to set up the
parameters that are supplied to the queries. For output, a similar conversion from text or
numbers into speech takes place.
• Parametric users, such as bank tellers, often have a small set of operations that they must
perform repeatedly.
• For example, a teller is able to use single function keys to invoke routine and repetitive
transactions such as account deposits or withdrawals, or balance inquiries.
• Systems analysts and programmers design and implement a special interface for each
known class of naive users. Usually a small set of abbreviated commands is included, with
the goal of minimizing the number of keystrokes required for each request.
Interfaces for the DBA
• Most database systems contain privileged commands that can be used only by the DBA
staff. These include commands for creating accounts, setting system parameters, granting
account authorization, changing a schema, and reorganizing the storage structures of a
database.