1. Explain the following primary file organizations: (1) a heap file (2) a sorted file.
2. Why is choosing a file organization important for a database?
3. If the primary index file contains bi blocks, how many of block accesses to get the block containing a particular record?
4. Which indexes are based on sequentially ordered files (a) primary index (b) clustering index (c) secondary index (d) B-tree index (e) B+-tree (have more than one correct answer)?
5. Explain the circumstances you should not create indexes?
Q1)
1. Heap File organization: It is the simplest and basic file organization method. In the heap file organization, the records get inserted at the end of the file. It won't sort or order the record during insertion. If the data block is full, new records are added to some other block, which need not to be the very next data block, but it can select any data block in the memory to store new records. This kind of fille organization is also known as an un-ordered file organization (refer figure. heap)
Pros and cons:
1) Fetching and retrieval of records from smaller database is faster and efficient when compared to sorted/ ordered file organization.
2)It is a very good method of file organization for bulk insertion.
3) This file organization is not suitable for large databases
2) Sorted file organization :In this method, the files are sorted sequentially. This can be categorized into two.
pile file method: Where the record are sorted one after another as they get inserted. In case of any modification or deletion, the record will be searched in the memory blocks and then processed.
sorted file method.: The records are sorted (either ascending or descending) each time they are inserted into the system. The sorting of the record is done in terms of primary key or any other columns.
Q2) Database consists of tables, index, procedures, functions etc. Databases stores huge volume of data, since it will be in physical storage devices. In the physical memory, the data items are not stored as such, it is converted into binary format. Any user who wants to view these data or modify these data, simply fires SQL query and gets the result on the screen. For the past processing of query, it is important to choose simple data organization methods.
Q4) indexes are based on sequentially ordered files are
Q5. Explain the circumstances you should not create indexes?

1. Explain the following primary file organizations: (1) a heap file (2) a sorted file. 2....
Problem 1. Consider a disk with block size B=1024 bytes. A block pointer is P = 8 bytes long, and a record pointer is R =7 bytes long. A file has r=5,000,000 EMPLOYEE records of fixed- length. Each record has the following fields: NAME (30 bytes), SSN (9 bytes), DEPARTMENTCODE (9 bytes), ADDRESS (35 bytes), PHONE (9 bytes), BIRTHDATE (8 bytes), SEX (1 byte), JOBCODE (4 bytes), SALARY (4 bytes, real number). An additional byte is used as a deletion...
1 Overview The goal of this assignment is to help you understand caches better. You are required to write a cache simulator using the C programming language. The programs have to run on iLab machines. We are providing real program memory traces as input to your cache simulator. The format and structure of the memory traces are described below. We will not give you improperly formatted files. You can assume all your input files will be in proper format as...
ChangeRequest(CRID, CRType, CRTitle, CROriginDate, CRPriority, CRNeedEvent, CRStatus) NeedByEvent(Event) CRPrevState(CRID, CRState, StartDate, EndDate) CRAssigned(CRID, EmpID, StartDate, EndDate) Employees(EmpID, FirstName, LastName, JobTitle) ChangeRequest(CRID, CRType, CRTitle, CROriginDate, CRPriority, CRNeedEvent, CRStatus) The CRID is the primary key, it is unique, and it is an positive integer The CRType may be one of two values: "Deficiency" or "Enhancement" CRTitle is a variable length string that may be up to 2048 characters CROriginDate is a date CRPriority is an integer that may assume a value of...
plo:0 3G STAY HOME I.. 3 من 3 2 is 1 Does CompStat Reduce Crime? CASE STUDY SELBdsde COM STAT ) the comparison with the pre s tand New York City Police purtment NYPD) for establishing trends The Compania in 1991 when Brason was police Issues weekly commander profile porto ser compartir measure the performance of precinct commander city-wide s that reconds all spend time or The weekly commander profile reports include cumplaints and summer and in each Information on...
Please read the article and answer about questions. You and the Law Business and law are inseparable. For B-Money, the two predictably merged when he was negotiat- ing a deal for his tracks. At other times, the merger is unpredictable, like when your business faces an unexpected auto accident, product recall, or government regulation change. In either type of situation, when business owners know the law, they can better protect themselves and sometimes even avoid the problems completely. This chapter...