Loading, please wait ...
Open its course - Database Systems

Short Questions for Physical Database Design

  • ×

    Hidden Questions!

    Some short questions are not visible. Usually teachers hides their visibility if they are few in number. Subject Expert recommends them to have more than 70+ questions against the topic and make them public.

  • 1 DBMSs provides which types of database security?

    Answer
    DBMSs generally provide two types of database security: 

    • System security: Covers access and use of the database at the system level, such as a user name and password 
    • Data security: Covers access and use of database objects (such as relations and views) and the actions that users can have on the objects


  • 2 Write some guidelines for indexes.

    Answer

    • Do not index small relations 
    • In general, index the primary key of a relation if it is not a key of the file organization 
    • Add a secondary index to a foreign key if it is frequently accessed 
    • Add a secondary index to any attribute that is heavily used as a secondary key Add a secondary index on attributes that are frequently involved in: 
      • (a) selection or join criteria 
      • (b) ORDER BY 
      • (c) GROUP BY 
      • (d) other operations involving sorting (such as UNION or DISTINCT) 
    • Add a secondary index on attributes involved in built-in aggregate functions, along with any attributes used for the built-in functions 
    • Avoid indexing an attribute or relation that is frequently updated 
    • Avoid indexing an attribute if the query will retrieve a significant proportion (for example 25%) of the tuples in the relation 
    • Avoid indexing attributes that consist of long character strings


  • 3 Write some overheads of indexes.

    Answer

    Following are the overheads when indexes are applied:
    • Adding an index record to every secondary index whenever a tuple is inserted into the relation 
    • Updating a secondary index when the corresponding tuple in the relation is updated 
    • The increase in disk space needed to store the secondary index 
    • Possible performance degradation during query optimization, as the query optimizer may consider all secondary indexes before selecting an optimal execution strategy


  • 4 Write two examples, one for primary and second for clustering indexes.

    Answer
    Primary index on the PropertyForRent relation based on the propertyNo attribute: 

     CREATE UNIQUE INDEX PropertyNoInd ON PropertyForRent(propertyNo);
     
    Clustering index on the PropertyForRent relation based on the staffNo attribute: 
     CREATE INDEX StaffNoInd ON PropertyForRent(staffNo) CLUSTER;


  • 5 What are the main types of file organization during physical database design?

    Answer

    • Heap (unordered) files Records are placed on disk in no particular order. 
    • Sequential (ordered) files Records are ordered by the value of a specified field. 
    • Hash files Records are placed on disk according to a hash function.


  • 6 DreamHome has a rule that prevents a member of staff from managing more than 100 properties at the same time. Write SQL Constraint for above situation.

    Answer

    CONSTRAINT StaffNotHandlingTooMuch

      CHECK (NOT EXISTS (SELECT staffNo

    FROM PropertyForRent

    GROUP BY staffNo

      HAVING COUNT(*) > 100))


  • 7 Describe physical database design. Does this includes integrity constraints and security measures?

    Answer
    The process of producing a description of the implementation of the database on secondary storage. It describes the base relations, file organizations, and indexes used to achieve efficient access to the data. 

    Yes, It also consider any associated integrity constraints and security measures


Contact Us

support@subexpert.com
Write to Us View Help
Subject Expert Logo

Subject Expert

Learn, Evaluate and Optimize

Follow Us
Facebook Switch Display Mode Enable Translation
© 2024 - Subject Expert