Identifying all attributes and decide primary key of invoice

Assignment Help Database Management System
Reference no: EM13926174

Question 1 - Normalization

Considering the following example of Invoice, you will design relational database by following the step suggested. Please, answer each step.

130_img1.png

Step1: Identifying all attributes and decide primary key of INVOICE relation.

Step2: Identifying all (minimal) functional dependencies.

Step3: Normalize INVOICE to 3 NF.

Question 2 - Query Optimizer

You are managing the following database system:

• DBMS: Oracle 11g
• OS: Sun Solaris
• System architecture: Web-based application using ASP.Net
• Purpose of Server: HR management
• Total size of database: 120 MB
• Total number of table: 12
• Total number of index including Primary Key: 18
• Daily average number of transactions: 400
• Complexity of SQL: simple
• Update: not frequently

As a database administrator, you need to decide query optimizer, i.e., CBO (Cost-based optimizer) or RBO (Rule-based optimizer).

Which one are you going to select for your system? Any Why?

Question 3 - Query Execution Plan

You are using Oracle 11g DBMS with Cost-Based Optimizer (CBO). In order to perform SQL tuning for a query, you decide to use ‘set autotrace' option of SQ*Plus as below:

SQL> SET AUTOTRACE ON
SQL> select d.department_name, sum(e.salary)
2 from employees e, departments d
3 where e.department_id = d.department_id
4 and e.salary>= 3000
5* group by d.department_name

Execution Plan

Id Operation Name Rows Bytes Cost
0 SELECT STATEMENT
27 567 5
1 HASH GROUP BY
27 567 5
2 NESTED LOOPS
106 2226 4
3 TABLE ACCESS FULL EMPLOYEES 107 535 3
4 TABLE ACCESS BY INDEC ROWID DEPARTMENTS 1 16 1
5 INDEX UNIQUE SCAN DEPT_ID_PK 1
0

Explain about the output (i.e., Execution Plan) including order of execution and statistical data.

Question 4 - Indexing: B+-tree.

Consider constructing a B+-tree of order 3 (i.e. p=3 and p leaf = 2)

Show the each step and resulting trees for inserting keys 8, 5, 1, 7, 3, 12, 9, 6 in this order.

520_img4.png

Step 2: After inserting 3

Step 3: After inserting 12

Step 4: After inserting 9

Step 5: After inserting 6

Consider the B+-tree constructed above, i.e., the result of Step 5, and then assign nodeID (1, 2, 3 ....) from top to bottom, and let to right. For example, root node has nodeID=1.

When you look up the key "8", how many nodes do you need to visit? Also, state the list of nodeID that you need to visit in order.

Question 5 - A bout B+ Tree properties which of the following is FALSE?
A. All the leaf nodes are at the same level
B. Deletion always happens at the leaf level
C. All the data pointers are spread among internal nodes and leaf nodes
D. Insertion always happens at the leaf level

Question 6 - Suppose a data file contains 30,000 records and each record is 200 bytes.The size of the disk block is 2.048 bytes,the length of key field is 9 bytes and the length of data pointer is 6 bytes.How many disk blocks do we need to create a secondary index file?
A. 10 blocks
B. 136 blocks
C. 221 blocks
D. 442 blocks

Question 7 - Which of the following is TRUE?
A. Secondary index provides a logical ordering
B. Primary index provides a physical ordering
C. Cluster index provides physical ordering
D. All of above

Question 8 - Which of the following statement is TRUE?
A. Dense index has an index entry for every search key values
B. Sparse index has an index entry only for some search key values
C. For primary index the total number of index entries is same as the number of disk blocks in the ordered data file
D. All of above

Question 9 - Which of the following statement is TRUE?
A. The index field of primary is on key field hence is dense index
B. The index field of cluster index is on non-key filed hence is dense index
C. We could have multiple primary and secondary indexes on a data file
D. None of above

Reference no: EM13926174

Questions Cloud

Company potential growth and worldwide acceptance : The website has over 500,000 listings in 33,000 cities and 192 countries across the world. Airbnb has developed a new industry of peer to peer accommodation rentals, which leaves room for the company's potential growth and worldwide acceptance.
Was such cross- subsidization in the public interest : Prior to 1982, AT&T kept local phone rates low by subsi- dizing them from long-distance profits. Was such cross- subsidization in the public interest? Explain.
Writer work for acme global consultant : This writer work's for Acme Global Consultant, Inc. We are a small consulting company that is hired to come in and fix small logistical problems.
Areas of statistical data analysis : The following paper seeks to provide basic knowledge in some specific areas of statistical data analysis. While there are no hard and fast distinctions for analyzing statistical data, ensuring that you have a methodical approach is vital to an acc..
Identifying all attributes and decide primary key of invoice : Considering the following example of Invoice, you will design relational database by following the step suggested. Please, answer each step. Step1: Identifying all attributes and decide primary key of INVOICE relation. Step2: Identifying all (minima..
Determining managerial commitment to expanding globally : Which is not a vital consideration for determining managerial commitment to expanding globally?
Case management quandary of individual and master calendar : Comprising the rotation of magistrates amid subdivisions is suggestively more challenging than managing individual calendaring of cases supported by general magistrates, attorneys, and superintendents.
How are implied volatilities used to quote options prices : Why and how are implied volatilities used to quote options prices? Can implied volatilities be expected to vary for options on the same stock with the same expiration but different exercise prices?
Interquartile range in grade distribution : Which quiz has less interquartile range in grade distribution?

Reviews

Write a Review

Database Management System Questions & Answers

  Describe a business scenario

Constraints Business Scenario: Describe a business scenario and specify the types of constraints that would be appropriate to ensure the integrity of the database. Be sure to include every constraint discussed .

  Write command to list all employees in descending order

Write a command to list all the employees hired in 2003 and 2004. Sort the rows by the hire_date column in descending order.

  Create a database named ctsdb studentid

Create a text file named Create_ StudentID .sql (for example, Create_3087654.sql) that will contain SQL statements to: Create a database named CTSDB StudentID.

  Display last name customer associated with order id

You have to write a query to display last name customer associated with order id in given database.

  Create oracle database tables

Create Oracle database tables using SQL Data Definition Language (DDL) for each table listed in Project 1. Make sure that entity and referential integrity are enforced by declaring a primary key for each table (these may be composite keys) and dec..

  List the price of the item called back scratcher

List the first and last names of any customers who have bought all of the items. (This does not need to be as part of a single purchase).

  Your company has put in the request for a new database

your company has put in the request for a new database system and you have been tasked with architecting the security

  Question 1 for each of the following tasks youll use the

question 1 for each of the following tasks youll use the xxxxxxxx database. you need only provide the query or command

  Create an actual web page document

Modify the XML document in Exercise 2 to include a namespace URL from which the elements of the XML document in Exercise 3 will be associated with. Make any changes to the XML document that are necessary as a result of the namespace URL inclusion.

  Explain role of a database administrator

Explain the role of a database administrator,the tasks performed by this role and why this role is important in Database Management.

  Designing of database

a. Discuss the degree to which you believe the Visio diagram reflects the database design. b. Describe any assumptions that you had to make about the business rules to in order to create the Visio diagram and the associated relationships.

  How much factory supervision and indirect factory labor cost

How much factory supervision and indirect factory labor cost would be assigned to the Batch Set-Up activity cost pool and how much factory supervision and indirect factory labor cost would NOT be assigned to products using the activity-based costing..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd