Friday, 31 July 2015

dbms basic questions

1- what is database management ?
ans--
A database management system (DBMS) is system software for creating and managing databases. The DBMS provides users and programmers with a systematic way to create, retrieve, update and manage data.
A DBMS makes it possible for end users to create, read, update and delete data in a database. The DBMS essentially serves as an interface between the database and end users or application programs, ensuring that data is consistently organized and remains easily accessible

2- what is schema ?
ans-A database schema (/ˈski.mə/ SKEE-mə) of a database system is its structure described in a formal language supported by the database management system (DBMS) and refers to the organization of data as a blueprint of how a database is constructed (divided into database tables in the case of Relational Databases). The formal definition of database schema is a set of formulas (sentences) called integrity constraints imposed on a database.

a data base schema consists of
(A)-  integrity constraints applied on the attributes.
 (B)- relation ship between attributes.
(C)- it is the blueprint of the data base .
(D)- A database schema specifies, based on the database administrator's knowledge of possible applications, the facts that can enter the database, or those of interest to the possible end-users.

3- types of schema ?
 ans - database consists of  mainly 3 types of schema .
 1 - conceptual schema .
  2- physical schema .
  3- external schema .


  • The 3 Schema Architecture in Database Systems
    • As we have seen above, a Database System must accommodate the information need of many different kinds of users E.g.: Personel information system, Payroll, Medical information, Inventory, Sales, Archival, etc., etc.
    • To accommodate this large number of users that use the same database system , the database schema (= description of the database) uses the 3 different types of schemas :
        1. A high level description (schema) called external schema:
            • Used by non-experts (= users of the DBMS) to specify their needs

        2. A intermediate level description (schema) called conceptual schema
            • Used by the designer of the database to specify how the data will be stored inside the DBMS

        3. A low level description (schema) called internal schema
            • Used by the database administrator to specify how the files used in the conceptual schema will be stored How a file is stored will determine many properties:
                • How fast can the data in the file be accessed ?
                • How much space will be needed to store the file.
                • And so on.






  • The 3 Database Schemas (description methods) in more detail
    • External schema:
      • An external schema describe how a user view/perceives the data Different users will have different needs and have different perceptions of the data
        E.g., a CEO and a clerk of the same company will have different needs and perceptions of the same company
      • There are usually multiple external schemas in one database schema (or database description)
      • External schemas are examples of high level models


    • Conceptual schema:
      • The Conceptual schema describe the various fields in data files without giving details on how the data files are stored
      • There is only ONE conceptual schema for each database.
      • The conceptual schema must encompass all the external schemas in the database In other words:

          You must be able to obtain each external view through a mapping/merging operation (through a computer program) onto the conceptual schema.
      • The conceptual schema is the most important data description in a database system and must be designed with care (we will learn more about how to design the conceptual schema next)
        Also, you do NOT allow an average Joe to get his hand on the conceptual schema
        The Database Administrator (DBA) is usually responsible for managing the conceptual schema.
      • The Conceptual schema is an example of the implementation data model


    • Physical schema:
      • The Physical schema describe how the data file are stored inside the computer and how to BEST access the data files (e.g., through indices)
      • The Physical schema includes things like:
        • File storage structures
        • Keys
        • Indices
        • Etc...
      • There is also only ONE physical schema for each database.
      • The Physical schema is an example of the low level model


Q-what is the difference between select and project operation in java ?
ans-Select Operation : This operation is used to select rows from a table (relation) that specifies a given logic, which is called as a predicate. The predicate is a user defined condition to select rows of user's choice.
Project Operation : If the user is interested in selecting the values of a few attributes, rather than selection all attributes of the Table (Relation), then one should go for PROJECT Operation.
also in sql both select and project  operations are combined in a single statement .....
basically select is for retrive the data and project for display the data .



***************

No comments:

Post a Comment