Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Notes  >  Database Languages and Interfaces

Database Languages and Interfaces - Computer Science Engineering (CSE) PDF Download

Database Languages and Interfaces

 The DBMS must provide appropriate languages and interfaces for each category of users. In this section we discuss the types of languages and interfaces provided by a DBMS and the user categories targeted by each interface.

1. DBMS Languages

Once the design of a database is completed and a DBMS is chosen to implement the database, the first step is to specify conceptual and internal schemas for the database and any mappings between the two. In many DBMSs where no strict separation of levels is maintained, one language, called the data definition language (DDL), is used by the DBA and by database designers to define both schemas. The DBMS will have a DDL compiler whose function is to process DDL statements in order to identify descriptions of the schema constructs and to store the schema description in the DBMS catalog.

In DBMSs where a clear separation is maintained between the conceptual and internal levels, the DDL is used to specify the conceptual schema only. Another language, the storage definition language (SDL), is used to specify the internal schema. The mappings between the two schemas may be specified in either one of these languages. In most relational DBMSs today, there is no specific language that performs the role of SDL. Instead, the internal schema is specified by a combination of functions, parameters, and specifications related to storage. These permit the DBA staff to control indexing choices and mapping of data to storage. For a true three-schema architecture, we would need a third language, the view definition language (VDL), to specify user views and their mappings to the conceptual schema, but in most DBMSs the DDL is used to define both conceptual and external schemas. In relational DBMSs, SQL is used in the role of VDL to define user or application views as results of predefined queries (see Chapters 4 and 5).

Once the database schemas are compiled and the database is populated with data, users must have some means to manipulate the database. Typical manipulations include retrieval, insertion, deletion, and modification of the data. The DBMS pro-vides a set of operations or a language called the data manipulation language (DML) for these purposes.

In current DBMSs, the preceding types of languages are usually not considered distinct languages; rather, a comprehensive integrated language is used that includes constructs for conceptual schema definition, view definition, and data manipulation. Storage definition is typically kept separate, since it is used for defining physical storage structures to fine-tune the performance of the database system, which is usually done by the DBA staff. A typical example of a comprehensive database language is the SQL relational database language (see Chapters 4 and 5), which represents a combination of DDL, VDL, and DML, as well as statements for constraint specification, schema evolution, and other features. The SDL was a component in early versions of SQL but has been removed from the language to keep it at the conceptual and external levels only.

There are two main types of DMLs. A high-level or nonprocedural DML can be used on its own to specify complex database operations concisely. Many DBMSs allow high-level DML statements either to be entered interactively from a display monitor or terminal or to be embedded in a general-purpose programming language. In the latter case, DML statements must be identified within the program so that they can be extracted by a precompiler and processed by the DBMS. A low-level or procedural DML must be embedded in a general-purpose programming language. This type of DML typically retrieves individual records or objects from the database and processes each separately. Therefore, it needs to use programming language constructs, such as looping, to retrieve and process each record from a set of records. Low-level DMLs are also called record-at-a-time DMLs because of this property. DL/1, a DML designed for the hierarchical model, is a low-level DML that uses commands such as GET UNIQUE, GET NEXT, or GET NEXT WITHIN PARENT to navigate from record to record within a hierarchy of records in the database. High-level DMLs, such as SQL, can specify and retrieve many records in a single DML statement; therefore, they are called set-at-a-time or set-oriented DMLs. A query in a high-level DML often specifies which data to retrieve rather than how to retrieve it; therefore, such languages are also called declarative.

Whenever DML commands, whether high level or low level, are embedded in a general-purpose programming language, that language is called the host language and the DML is called the data sublanguage. On the other hand, a high-level DML used in a standalone interactive manner is called aquery language. In general, both retrieval and update commands of a high-level DML may be used interactively and are hence considered part of the query language.

Casual end users typically use a high-level query language to specify their requests, whereas programmers use the DML in its embedded form. For naive and parametric users, there usually are user-friendly interfaces for interacting with the data-base; these can also be used by casual users or others who do not want to learn the details of a high-level query language. We discuss these types of interfaces next.

2. DBMS Interfaces

User-friendly interfaces provided by a DBMS may include the following:

Menu-Based Interfaces for Web Clients or Browsing. These interfaces pre-sent 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 forms-based interface displays a form to each user. Users can fill out all of theform entries to insert new data, or they can fill out only certain entries, in which case the DBMS will retrieve matching data for the remaining entries. Forms are usually designed and programmed for naive users as inter-faces to canned transactions. Many DBMSs have forms specification languages, which are special languages that help programmers specify such forms. SQL*Forms is a form-based language that specifies queries using a form designed in conjunction with the relational database schema. Oracle Forms is a component of the Oracle product suite that provides an extensive set of features to design and build applications using forms. Some systems have utilities that define a form by letting the end user interactively construct a sample form on the screen.

Graphical User 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. Most GUIs use a pointing device, such as a mouse, to select certain parts of the displayed schema diagram.

Natural Language Interfaces. 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, to interpret the request. If the interpretation is successful, the inter-face 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. The capabilities of natural language interfaces have not advanced rapidly. Today, we see search engines that 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 or legacy model databases, although a research area called keyword-based querying has emerged recently for relational databases.

Speech Input and Output. 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.

Interfaces for Parametric Users. 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. For example, function keys in a terminal can be programmed to initiate various commands. This allows the parametric user to proceed with a minimal number of keystrokes.

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.

 

The document Database Languages and Interfaces - Computer Science Engineering (CSE) is a part of Computer Science Engineering (CSE) category.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)

FAQs on Database Languages and Interfaces - Computer Science Engineering (CSE)

1. What are the different types of database languages?
Ans. There are primarily three types of database languages: Data Definition Language (DDL), Data Manipulation Language (DML), and Data Control Language (DCL). DDL is used to define the structure of the database, including creating, altering, and dropping tables. DML is used to manipulate the data stored in the database, such as inserting, updating, and deleting records. DCL is used to control access to the database and manage user permissions.
2. What is the role of interfaces in database systems?
Ans. Interfaces in database systems act as a medium through which users can interact with the database. They provide a user-friendly way to perform operations on the database, such as querying, updating, and managing data. Interfaces can be graphical, allowing users to interact with the database using a visual interface, or they can be command-line based, where users input commands to perform operations.
3. How do database languages and interfaces work together?
Ans. Database languages and interfaces work together to provide a seamless experience for users interacting with the database. Database languages, such as SQL, are used to write queries and perform operations on the database. These queries and operations are then executed through the interfaces, which provide a way for users to input their requests and receive the desired results. The interfaces interpret the commands written in the database language and communicate with the database system to execute them.
4. Can different database systems use different languages and interfaces?
Ans. Yes, different database systems can use different languages and interfaces. While SQL (Structured Query Language) is the most commonly used language for relational databases, there are other languages specific to different database systems. For example, MongoDB uses a language called MongoDB Query Language (MQL). Similarly, interfaces can vary depending on the database system and the preferences of the users. However, SQL has become a standard language for interacting with relational databases, and many interfaces support it.
5. What is the importance of database languages and interfaces in computer science engineering?
Ans. Database languages and interfaces play a crucial role in computer science engineering as they enable efficient management and manipulation of data. These languages provide a standardized way to communicate with databases, allowing engineers to define the structure, insert, update, and retrieve data. Interfaces, on the other hand, provide an intuitive and user-friendly way to interact with the database, making it easier for engineers to work with complex data systems. Mastering database languages and interfaces is essential for computer science engineers to develop robust and scalable database systems.
Download as PDF

Top Courses for Computer Science Engineering (CSE)

Related Searches

Sample Paper

,

Exam

,

Previous Year Questions with Solutions

,

pdf

,

Viva Questions

,

practice quizzes

,

video lectures

,

Semester Notes

,

Extra Questions

,

study material

,

Important questions

,

shortcuts and tricks

,

ppt

,

MCQs

,

Database Languages and Interfaces - Computer Science Engineering (CSE)

,

Objective type Questions

,

Free

,

Summary

,

mock tests for examination

,

Database Languages and Interfaces - Computer Science Engineering (CSE)

,

past year papers

,

Database Languages and Interfaces - Computer Science Engineering (CSE)

;