File Structure Capsule by Aryadrj

 

File Structure Capsule by AryaDrj



1. Can we do file structure project in Python?

  • Yes you can do, even you can use java,php etc

2. Which software is best for C++?

  • Dev c++. (It is very lite)

3. What is file structure?

  • File Structures is the Organization of Data in Secondary Storage devices in such a way that minimize the access time and the storage space. A File structure is a combination of representations for data in files and of operations for accessing the data. A File structure allows applications to read, write and modify data. It might also support finding the data that matches some search criteria or reading through the data in some particular order.

4. What is Fixed length record.?

Fixed length record
  • A record which is predetermined to be the same length as the other records in the file.
  • The file is divided into records of equal size.
  • All records within a file have the same size.
  • Programs which access the file must know the record length.
  • There may be internal fragmentation (unused space within records.)
  • There will be no external fragmentation

5. Simple program for reading and writing in c++

// writing on a text file

#include <iostream>

#include <fstream>

using namespace std;

int main () {

ofstream myfile ("example.txt");

if (myfile.is_open())

{

myfile << "This is a line.\n";

myfile << "This is another line.\n";

myfile.close();

}

else cout << "Unable to open file";

return 0;

}


Output:

[file example.txt]

This is a line.

This is another line.

What is Direct access?

  • Accessing data from a file by record position with the file, without accessing intervening records.

What is Relative record number?

  • An ordinal number indicating the position of a record within a file.

What is Primary key?

  • A key which uniquely identifies the records within a file.

What is Secondary key?

  • A search key other than the primary key.

What is Secondary index?

  • An index built on a secondary key.

What is cosequential processing?

  • The process of forming a list containing all items common to two or more lists.
Cosequential match algorithm:
  • Initialize (open the input and output files.)
  • Get the first item from each list.
  • While there is more to do:
    • Compare the current items from each list.
    •  If the items are equal,
      •  Process the item.
      • Get the next item from each list.
      • Set more to true iff none of this lists is at end of file.
    • If the item from list A is less than the item from list B,
      • Get the next item from list A.
      • Set more to true iff list A is not at end-of-file.
    • If the item from list A is more than the item from list B,
      • Get the next item from list B.
      • Set more to true iff list B is not at end-of-file.
  • Finalize (close the files.)
Cosequential merge algorithm:
    Merge: The process of forming a list containing all items in any of two or more lists.

    Initialize (open the input and output files.)
    Get the first item from each list.
    While there is more to do:
    • Compare the current items from each list.
    • If the items are equal,
      • Process the item.
      • Get the next item from each list.
    • If the item from list A is less than the item from list B,
      • Process the item from list A.
      • Get the next item from list A.
    • If the item from list A is more than the item from list B,
      • Process the item from list B.
      • Get the next item from list B.
    • Set more to false iff all of this lists are at end of file.
    Finalize (close the files.)

    Few questions your teacher can ask


    1. Which language you have used for front end?

    2. Which language you have used for back end?

    3. Which concept you have used?

    4. Tell me something about your project?

    5. What is indexing?

    6. What is hashing?

    7. Show the connection code of Front end and back end.

    8. Write and Run one simple php program.

    9. What is fstream in c++?

    10. What is difference between primary and secondary memory in computer?

    11. What is Function to open a file in c++?

    12. What is Fixed length record?

    13. What is difference between Variable length record and Fixed length record?

    14. What is B+ Tree?

    15. What is sequential search?


    **Thank you for reading**

    If you have any doubt/queries then please contact me

    You can ask any question.

    Contact Details :


    Comments

    Popular posts from this blog

    How to set image in carousel using flask?

    Invalid syntax , perhaps you forgot a comma? Error in Python

    How to run PL/SQL Code With Command Line?