Ans: Data model: A data model is  the collection of conceptual tools for describing data, data relationships, data  semantics and consistency constrains. A data model provides a way to describe  the design of a database at the physical, logical and view level.
There are a number of different data models. The data models can be  classified in four different categories:
- Relational model: The relational model uses a collection of tables to represent both data and the relationships among those data. Each table has multiple columns and each column has a unique name. The relational model is an example of a record based model and so named because the database is structured in fixed format records of several types. Each table contains records of a particular type and defines a fixed number of fields or attributes. The columns of the table correspond to the attributes of the record type.
 - The entity relationship model: The entity relationship data model is based on a perception of a real world that consists of a collection of basic objects, called entities and of relationships among these objects. An entity is a “thing” or “object” in the real world that is distinguishable from other objects.
 
- Object base data model: The object oriented data model is another data model that has seen increasing attention. The object oriented model can be seen as extending to E-R model with notations of encapsulation, methods and object identity. The object relational data model combines features of the object oriented data model and relational data model.
 - Semi structured  data model: The semi structured data model permits the specification of  data where individual data items of the same type may have different sets of  attributes. This is in contrast to the data models mentioned earlier where  every data item of a particular type must have the same set of attributes. The  extensible markup language is widely used to represent semi structured data.
 
Q. What do you mean by database language? Give the  classification of database language with explanation.
  Ans: Database language: A database  system provides a data definition language to specify the database schema and a  data manipulation language to express database queries and updates. In practice  data definition and the data manipulation language are not two separate languages,  instead they simply form parts of a single database language, such as the  widely used SQL language.
  Data  – Manipulation Language (DML): A data – manipulation language is a  language that enables users to access or manipulate data as organized by the  appropriate data model. The types of access are:
- Retrieval of information stored in the database.
 - Insertion of new information into the database.
 - Deletion of information from the database.
 - Modification of information stored in the database.
 
There are basically two types ---
- Procedural DMLs require a ser to specify what data are needed and how to get those data.
 - Declarative DMLs require a user to  specify what data are needed without specifying how to get those data.
 
Data  – Definition Language (DDL): A data definition language is a language  for specifying the database schema and as well as other properties of the data.
The storage structure and access methods used by the database system by  a set of statements in a special type of DDL called a data storage and  definition language. The data values stored in the database must satisfy  certain consistency constraints. Database systems concentrate on integrity constraints  that can be tested with minimal overhead:
- Domain constraints: A domain of possible values must be associated with every attribute. Domain constrains are the most elementary form of integrity constraint. They are tested easily by the system whenever a new data item is entered into the database.
 - Referential integrity: Database modifications can cause violations of referential integrity. When a referential integrity constraint is violated, the normal procedure is to reject the action that caused the violation.
 - Assertions: An assertion is any condition that the database must always satisfy. Domain constraints and referential integrity constraints are special forms of assertions. When an assertion is created, the system tests it for validity. If the assertion is valid then the future modification to the database is allowed only if it does not cause that assertion to be violated.
 - Authorizations: We may want to differentiate among the users as far as the type of access they are permitted on various data values in the database. These differentiations are expressed in terms of authorization, the most common being:
 - Read authorization, which allows reading, but not modification of data.
 - Insert authorization, which allows insertion of new data, but not modification of existing data.
 - Update authorization, which allows modification, but not deletion of data.
 - Delete authorization,  which allows deletion of data.
 
Q. Define Query.
  Ans: Query: A query is a statement  requesting the retrieval of information. The portion of a DML that involves information  retrieval is called a query language. Although technically incorrect, it is common  practice to use the terms query language and data manipulation language synonymously.
There are a number of database query languages in use, either commercially  or experimentally. SQL is the example query language.

No comments:
Post a Comment