Home TechnologyProgramming Subscribe to RSS
 

What Is A Query? Where And Why It Is Used?

Answer Question

2 Answers - Sort by: Date | Rating

    Normally the term query is used in database systems. These term usually refers to the commands written in a non procedural language (like SQL) to manipulate a data base.
    The use of these queries (in a non procedural language) improves the application interface. The user just specifies what to do without defining how to do the requested tasks on database. Thus it hides the low level implementation details from the user. It allows the user to specify complex tasks in a simple way while hiding the internal physical organization of data.

    The query is actually a statement that extracts specific information from the database. A query specifies the relation name, field names, and predicated and a clause that specifies the task that is to be performed on that data. The query can also define the criteria for extracting the data from the database relations.

    There are different uses of a query as:
    1. Extracting the records from the database that satisfy the defined criteria.
    2. To sort the records of a relation in a specified order.
    3. To display the specified fields of a relation.
    4. To add or delete the records as well as fields from a relation in the database.
    0 0

    Raaga 

    answered 3 years ago

      A query is command which is used to manipulate data in the database. The query can be used to create the database structure. We can use queries to create tables, to insert data into tables, to modify data from the tables and to delete the data from the tables.

      Different types of query languages are used for this purpose. The most commonly used language is SQL (Structured Query Language). The other query languages are DMX, Datalog, XQuery, CODASYL, MDX, SPARQL, OQL and OPath. The query languages are the high level programming languages. These languages use human like syntax. All most all the Database Management Systems supports query languages.

      The query languages have the data definition commands to define the structure of the database or we can say to create, modify or delete the tables. Data manipulation commands to insert, retrieve, modify and merge the data.  Transaction controls to start, commit or rollback the transactions. Data control commands to authorize the users for specific actions.

      The examples of the queries are as follows:
      Create table table_name (column_name data type(size), column_name data type(size), ...)
      This command is used to create a table with specified columns and its data type.
      0 0

      Abadit 

      answered 3 years ago

        Answer Question - Answers are editable for 5 min.

        If you do not Sign-in or Register your answers will be anonymous,

        your answers may also be checked before going online.

        More

        More

           
           

          Ask a Question via Twitter

          Send a question to @askblurtit and we will publish it online and send you a reply everytime you receive an answer.

          Blurtit Store

          Get T-shirts, hoodies, caps and more at the Blurtit store

          Blurtit International