answersLogoWhite

0

📱

Database Programming

Databases are collections of tables that maintain and display information, often collaboratively; this information can be used for interaction with an application or gaining general knowledge. Questions about database engines and modifying or using them belong in this category.

8,803 Questions

What is the difference between register stacks and memory stacks?

Registers are normally memory spaces internal to the processor or very close to it. They are generally faster than main memory and will be small in size and will hold very frequently used data.

Register stacks are a set of such register memory locations.

Memory refers to computers main memory outside CPU. It is used to keep data and programs. Memory stack is a series of memory locations.
The difference between register stack and memory stack is...

What is the advantage of circular queue over simple queue?

Circular queue have less memory consuption as compared to linear queue because while doing insertion after deletion operation it allocate an extra space the first remaining vacant but in circular queue the first is used as it comes immediate after the last.

What is the advantages of computer application in business?

Computer applications make it easier for employees to carry out the functions of their jobs. With software, the business can input data quicker instead of creating templates each time.

What is the difference between stack and queues?

A queue is a first-in-first-out (FIFO) data structure, while a stack is a first-in-last-out (FILO) data structure.

Think of a queue as a line to get on a ride at a theme park, you get on the ride in the order than you joined the line.

Think of a stack as a pile of heavy objects stacked on top of each other, new objects get put on top of the pile, and when you take objects off of the pile you must take off the one that is currently on top, which is also the one you most recently added. The first object placed on the stack is at the bottom and will be the last one removed.

What is meta gaming?

Meta-gaming is a term used in Role Play games. In most role play games there is in character chat (IC) and out of character chat(OOC), Meta-gaming is using Out of Character knowledge, in character chat. Here's an example of meta gaming, In character chat: "your mom" "log on to your alt" "I have to go wash the dishes brb." "How old are you irl"

All of these sentences are Meta-gaming. Even using of the words "lol" "lmao" Etc.... are typically Out of Character Chat, cause you wouldn't typically say "lol" or "lmao" In real life. Make the game fun for everyone else, don't meta game.

What is the difference between extended binary tree and a binary search tree?

A strictly binary tree is one where every node other than the leaves has exactly 2 child nodes. Such trees are also known as 2-trees or full binary trees.

An extended binary tree is a tree that has been transformed into a full binary tree. This transformation is achieved by inserting special "external" nodes such that every "internal" node has exactly two children.

How you can delete a column from the table?

Can you be more specific? What kind of table do you mean, and what program are you using? A SQL statement like this will do it: alter table tblName drop column colName tblName is the name of the table colName is the name of the column

Random access and sequential access file in vb 6.0?

To access a particular data item in a sequential file, you need to read in all items in the file prior to the item of interest. This works acceptably well for small data files of unstructured data, but for large, structured files, this process is time-consuming and wasteful. Sometimes, we need to access data in non-sequential ways. Files which allow non-sequential access are random access files.

Why should database be protected?

Database contains data which might be confidential. Data in any organization is confidential. To prevent confidentiality of the firm security need to be implemented.

So that information can not be stolen.

How tree can be represented using linked list?

A tree is a linked list. Well, sort of... An ordinary linked list has one forward node pointer within each node, while a tree has more than one. Often, in a tree, there is a relationship between nodes, such as an ordering based on which sub-node pointer the current node is a child of.

What is mean void in c plus plus?

Void means there is no data type. So if you have a void function it does not return a value (and attempting to do so will cause an error) whereas a non-void function (ex. int, long, String, bool, etc) will return a value of that type.

Explain how memory is represented in a linked list data structure?

Type your answer here...  Let lists be a linked. Then list will be maintained in memory unless otherwise specified or implied as follows. First of all list required two liner array we will call them here INFO and LINK such that INFO[K] and LINK[K] contain, respectively, the information part and the next pointer filed of a node of list.

 As noted above list also required a variable name such as start which will contain the location of the beginning of the lists and the next pointer sentinel denoted as null which indicates the end of the lists

 Since the subscripts of the array INFO and LINK will usually be positive, we will chose null otherwise started.

What are Sample of application letter for data encoder position?

Peter Ho

123 Sue Circle

Smithtown, CA 08067

909-123-5235

Peter.ho@emailexample.com

Date

John Ka

HR manager

XYZ Company

87 Delaware Road

Hatfield, CA 08065

Dear Mr. John,

I am writing this letter to apply for the position of Data entry encoder at ABC Inc. I have been well familiar with your company products for many years and would be very excited to have an opportunity to work for your company and help increase the sales of your products. The position was introduced by a friend of mine, Dr. Peter Ho, whom I have contacted directly for this position. I have worked with him for many years in the industry and I believe that I am a perfect candidate for this position.

I have good experience in dealing with similar products, thank to thank, I have good knowledge on overall businesses that may be of your interest. Previously, I was a dogcare junior manager in AAA company where I succeeded in expanding my territory by over 30% for the first year. During four years when I worked for AAA, I managed to set up a branch as well as recruit an additional 300 employees and achieved profit objectives.

I am confident that I am a good candidate for the position you are requiring, so I would like it very much to have an opportunity to further discuss with you regarding your offer at ABC inc.

Sincerely,

Peter Ho

Enc. Resume

What is file structure in c?

You mean source-file? The simplest format is one single main function:

int main (void)

{ puts ("Hello, World"); return 0; }

Difference between file processing and dbms?

File based approach can be attributed to two factors:

1. the definition of the data is embedded in the application programs, rather than being stored separately and independently.

2. there is no control over the access and manipulation of data beyond that imposed by the application programs.

To become more effective, a new approach was required. What emerged were the database and the DBMS (Database management system).

What is the algorithm to delete a child node in binary tree?

as far as i know u have 4 cases for the node u wanna delete

1.It's a leaf (has no children)

2.It has only left child

3.it has only right child

4.it has both children ,left and right

now, let's work on it :>

set a pointer node to the root

while the element to be deleted doesnt equal the pointer

if it's smaller, move the pointer to the left subtree

if it's large , move the pointer to the right subtree

if pointer reached the end of the tree , null, break the loop (unluckly that means u didnt find the element that should be removed)

end while //(now u must have found the target, the while condition is breaked normally)

// this is case 4

if both children don't equal null

get the most left node in the subtree of the pointer node

assign its value to the pointer node.

remove it (set that most left thing to equal null)

//...case 2

if pointer node.right only equals null

pointer node = pointer node.left

//...case3

if pointer node.left only equals null

pointer node = pointer node.right

//... case 1

if pointer node.left and .right equals null

pointer node.data = null

maybe it doesnt look like any algorithm style ,sorry for that, that's as far as i knw, i doubt case 4 anyways..

What is data redundancy and data integrity?

Data inconsistency exists when different and conflicting versions of the

same data appear in different places. Data inconsistency creates

unreliable information, because it will be difficult to determine which

version of the information is correct. (It's difficult to make correct - and

timely - decisions if those decisions are based on conflicting information.)

Data inconsistency is likely to occur when there is data redundancy. Data

redundancy occurs when the data file/database file contains redundant -

unnecessarily duplicated - data. That's why one major goal of good

database design is to eliminate data redundancy.

In the below link you can find more details.

http://opencourseware.kfupm.edu.sa/colleges/cim/acctmis/mis311/files%5CChapter1-Database_Systems_Topic_2_Introducing_Databases.pdf

Level triggered and edge triggered advantages and disadvantages?

Level Trigger:

1) The input signal is sampled when the clock signal is either HIGH or LOW.

2) It is sensitive to Glitches.

Example: Latch.

Edge Trigger:

1) The input signal is sampled at the RISING EDGE or FALLING EDGE of the clock signal.

2) It is not-sensitive to Glitches.

Example: Flipflop.

Cor c source code for Bank Management System?

code]

//***********************************************************************//

//***********************************************************************//

//******COMPUTERISED BANKING SYSTEM BY ****//

//Declaration of header files

#include <iostream.h>

#include <fstream.h>

#include <process.h>

#include <string.h>

#include <stdio.h>

#include <ctype.h>

#include <conio.h>

#include <dos.h>

#include <stdlib.h>

#include <iomanip.h>

#include <graphics.h>

typedef char option[15];

const int ROW = 10,COL = 10;

int scan;

// To hold the special characters for moving the prompt in menu

int ascii;

// To display the main menu options

option a[]= {

"NewAccount",

"ListofAccounts",

"IndAccount",

"DailyTrans",

"MonthlyReport",

"EditAccount",

"Exit"};

// Displays the modify menu options

option b[] = {

"Modify Account",

"Closeaccount",

"Quit"

};

// Function used to do screening

class main_menu

{

int i,done;

public:

void normalvideo(int x,int y,char *str);

void reversevideo(int x,int y,char *str);

void box(int x1,int y1,int x2,int y2);

char menu();

void control_menu();

char e_menu();

void edit_menu();

void help(void);

};

/* Class member functions for drawing boxes */

class shape

{

public:

void line_hor(int, int, int, char);

void line_ver(int, int, int, char);

void box(int, int, int, int, char);

};

// Class contains the initial deposit of customers

class initial

{

public:

void add_to_file(int, char t_name[30], char t_address[30], float); // For initial deposits in customers account

void display_list(void); // Displaying customers account list

void delete_account(int); // Deleting customers account

void update_balance(int, char t_name[30], char t_address[30], float); // For updating the customer account

void modify(void); // To modify the customer account information

int last_accno(void); // To know the last account number

int found_account(int); // To found the account is in "INITIAL.dat" or not

char *return_name(int); // Function for validation entry of customer name

char *return_address(int); // Function for validation entry of customer address

float give_balance(int); // To print the balance amount of a particular customer

int recordno(int);

void display(int); // To display the customer account

private:

void modify_account(int, char t_name[30], char t_address[30]); // Function to modify the customer account

int accno;

char name[30], address[30];

float balance;

};

// Class contains the customers daily transaction entry

class account

{

public:

void new_account(void); // Function to create a new account

void close_account(void); // Function to close an account

void display_account(void); // Function to display the accounts

void transaction(void); // To display the transaction process

void clear(int, int); // Function to perform a clear screen function

void month_report(void); // Function to list monthWise transaction report

private:

void add_to_file(int, int, int, int, char, char t_type[10], float, float, float);

// Function to add transaction records

void delete_account(int); // Function to delete a transaction record

int no_of_days(int, int, int, int, int, int); // Function to find the total days

float calculate_interest(int, float);

// Function for calculating interest of anaccount

void display(int); // Function to display a transaction account

void box_for_display(int); // Function for displaying box

int accno;

char type[10]; // Account type as Cheque or Cash

int dd, mm, yy; // To store the system date/ Enter date

char tran; // As the account type is Deposit or Withdraw

float interest, amount, balance;

};

// Function to displays all the menu prompt messages from the pointer array of option a[]

void main_menu::normalvideo(int x,int y,char *str)

{

gotoxy(x,y);

cprintf("%s",str);

}

// Function to move the cursor on the menu prompt with a reverse video color

void main_menu::reversevideo(int x,int y,char *str)

{

textcolor(5+143);

textbackground(WHITE);

gotoxy(x,y);

cprintf("%s",str);

textcolor(GREEN);

textbackground(BLACK);

}

void main_menu::box(int x1,int y1,int x2,int y2)

{

for(int col=x1;col<x2;col++)

{

gotoxy(col,y1);

cprintf("%c",196);

gotoxy(col,y2);

cprintf("%c",196);

}

for(int row=y1;row<y2;row++)

{

gotoxy(x1,row);

cprintf("%c",179);

gotoxy(x2,row);

cprintf("%c",179);

}

gotoxy(x1,y1);

cprintf("%c",218);

gotoxy(x1,y2);

cprintf("%c",192);

gotoxy(x2,y1);

cprintf("%c",191);

gotoxy(x2,y2);

cprintf("%c",217);

}

char main_menu::menu()

{

clrscr();

textcolor(22);

box(20, 6, 65, 20);

box(18, 4, 67, 22);

textcolor(5+143);

gotoxy(36, 5);

textbackground(BLUE);

cprintf("B A N K I N G");

textbackground(BLACK);

textcolor(22);

for(i = 1; i < 7; i++)

normalvideo(32, i+10, a[i]);

reversevideo(32, 10, a[0]);

i = done = 0;

_setcursortype(_NOCURSOR);

do

{

int key = getch();

switch (key)

{

case 00:

key = getch();

switch (key)

{

case 72:

normalvideo(32, i+10, a[i]);

i--;

if (i '0')

return;

if (strlen(t_address) > 25)

{<br

What is the number of nodes in a complete binary tree of level 5?

If the number of levels is L, the maximum number of nodes N in a binary tree is N = 2L-1.

For L = 5, N equates to 31 thus.

Why do you need Documentation?

The best way I can explain this is to give you an example of code with no documentation. If there was documentation, you would be able to tell what this code did in a matter of seconds. Without it you could waste many minutes, or even hours, trying to understand it.

inline unsigned char f_1(const unsigned char *ptr, const unsigned int i) {

const div_t d = div(i, 8);

return (ptr[d.quot] & (1 << d.rem))?1:0;

}

inline void f_2(unsigned char *ptr, const unsigned int i) {

const div_t d = div(i, 8);

ptr += d.quot;

*ptr = *ptr | (1 << d.rem);

}

inline void f_3(unsigned char *ptr, const unsigned int i) {

const div_t d = div(i, 8);

const unsigned char n = 1 << d.rem;

ptr += d.quot;

*ptr = ((*ptr | n ) ^ n);

}

void f(const unsigned int n) {

const unsigned int m = n + (n%8==0?0:8-n%8);

const unsigned int n = m / 8;

const unsigned int m_2 = m / 2;

unsigned int i, j;

unsigned char *a = malloc(sizeof(unsigned char) * n);

memset(a, 0xaa, n);

f_3(a, 1);

f_2(a, 2);

for( i = 3; i < m_2; i+=2 ) {

while(i < m_2 && !f_1(a, i))

i+=2;

for( j = i + i; j < m; j+=i )

f_3(a, j);

}

free(a);

}

Difference between direct sequential file and index sequential file?

Explain the difference between sequential and direct file access.

A. Sequential access to data is used when the data has to be read from the start, in sequence. It is the normal method of access for magnetic tape. Direct access is used when it is possible to jump directly to a file or data item without reading through all the items stored before it. This is the normal method used for hard disks.

Advantages of file organization?

File organization is the methodology which is applied to structured computer files. Files contain computer records which can be documents or information which is stored in a certain way for later retrieval.