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 happens if a label is too long for a cell in a spreadsheet?

If labels are longer than the column width allowed, the spreadsheet does not "lose" the extra characters; instead they are not displayed if the cell to their right has an entry.

Disadvantage of redundancy?

  • high cost to create redundancy in network
  • increased broadcast storm in network.

What is the use of spfile and init.ora in oracle?

init.ora and SPfile both contain information about DB parameters. The database cannot start without an INIT.ORA but can start without an SPfile. An SPfile cannot be edited directly , but one can be configured via the pfile (init.ora) Init.ora is saved in ascii text format whereas the SPfile is saved in a binary format. If both files exist , the database reads the SPfile first before processing the init.ora. Oracle Guru's step in and correct if necessary .......... :) , Lekarshi

Who would use a query?

Just about anyone who will use access will need to use a query (interrogated the data) at some point

What are the types of end users?

There are two types of End user
1.Native User
2.Sophisticated User (Technical User)

You're creating a workbook called Contacts which is currently open Which steps will move the Agents worksheet from the Employees workbook to between Sheet1 and Sheet2 in the Contacts workbook?

Select Contacts in the To book drop-down list box

Ensure the worksheet is located before Sheet2

In the Employees workbook, open the Move or Copy dialog box

Open the Employees workbook

What is an excel query?

Excel can make queries through using the Filter options. They are not known as queries in Excel, but it is what they can do.

Explain the process of converting tree to a binary tree?

A general tree is an unordered hierarchical data structure with unlimited children nodes for each parent. A binary tree only has a maximum of two children nodes for each parent, commonly called left node and right node.

Converting from tree to binary tree would simply require that you start with the root node and start copying each node into the binary tree. The only rules would be that each node cannot have more than two children, including the root node.

You alo need to know a little about the target binary tree, such as should it be ordered? Should it be complete?

--

I am just adding few more points to this answer.

In Binary tree each node can have 0,1,2 children. The number children can;t exceed 2, where as in ordinary tree node can have any number of children. So while concerting ordinary tree we should fix the maximum number of nodes.

This is the information i found found from( All the credits goes the original Author, since i forgot original URL, i am pasting contents as it is)

General Trees and Conversion to Binary Trees

General trees are those in which the number of subtrees for any node is not

required to be 0, 1, or 2. The tree may be highly structured and therefore

have 3 subtrees per node in which case it is called a ternary tree.

However, it is often the case that the number of subtrees for any node may

be variable. Some nodes may have 1 or no subtrees, others may have 3, some

4, or any other combination. The ternary tree is just a special case of a

general tree (as is true of the binary tree).

General trees can be represented as ADT's in whatever form they exist.

However, there are some substantial problems. First, the number of references

for each node must be equal to the maximum that will be used in the tree.

Obviously, some real problems are presented when another subtree is added to

a node which already has the maximum number attached to it. It is also

obvious that most of the algorithms for searching, traversing, adding and

deleting nodes become much more complex in that they must now cope with

situations where there are not just two possibilities for any node but

multiple possibilities. It is also possible to represent a general tree in

a graph data structure (to be discussed later) but many of the advantages of

the tree processes are lost.

Fortunately, general trees can be converted to binary trees. They don't

often end up being well formed or full, but the advantages accrue from

being able to use the algorithms for processing that are used for binary

trees with minor modifications. Therefore, each node requires only two

references but these are not designated as left or right. Instead they are

designated as the reference to the first child and the reference to next

sibling. Therefore the usual left pointer really points to the first child

of the node and the usual right pointer points to the next sibling of the

node. One obvious saving in this structure is the number of fields which

must be used for references. In this way, moving right from a node accesses

the siblings of the node ( that is all of those nodes on the same level as

the node in the general tree). Moving left and then right accesses all of

the children of the node (that is the nodes on the next level of the general

tree).

Creating a Binary Tree from a General Tree

Since the references now access either the first child or successive siblings,

the process must use this type of information rather than magnitude as was

the case for the binary search tree. Note that the resulting tree is a

binary tree but not a binary search tree.

The process of converting the general tree to a binary tree is as follows:

* use the root of the general tree as the root of the binary tree

* determine the first child of the root. This is the leftmost node in the

general tree at the next level

* insert this node. The child reference of the parent node refers to this

node

* continue finding the first child of each parent node and insert it below

the parent node with the child reference of the parent to this node.

* when no more first children exist in the path just used, move back to the

parent of the last node entered and repeat the above process. In other

words, determine the first sibling of the last node entered.

* complete the tree for all nodes. In order to locate where the node fits

you must search for the first child at that level and then follow the

sibling references to a nil where the next sibling can be inserted. The

children of any sibling node can be inserted by locating the parent and then

inserting the first child. Then the above process is repeated.

Traversing the Tree

Since the general tree has now been represented as a binary tree the

algorithms which were used for the binary tree can now be used for the

general tree (which is actually a binary tree). In-order traversals make no

sense when a general tree is converted to a binary tree. In the general

tree each node can have more than two children so trying to insert the

parent node in between the children is rather difficult, especially if there

are an odd number of children.

Pre-order

This is a process where the root is accessed and processed and then each of

the subtrees is preorder processed. It is also called a depth-first

traversal. With the proper algorithm which prints the contents of the nodes

in the traversal it is possible to obtain the original general tree. The

algorithm has the following general steps:

* process the root node and move left to the first child.

* each time the reference moves to a new child node, the print should be

indented one tab stop and then the node processed

* when no more first children remain then the processing involves the right

sub-tree of the parent node. This is indicated by the nil reference to

another first child but a usable reference to siblings. Therefore the first

sibling is accessed and processed.

* if this node has any children they must be processed before moving on to

other siblings. Therefore the number of tabs is increased by one and the

siblings processed. If there are no children the processing continues

through the siblings.

* each time a sibling list is exhausted and a new node is accessed the

number of tab stops is decreased by one.

In this way the resulting printout has all nodes at any given level starting

in the same tab column. It is relatively easy to draw lines to produce the

original general tree except that the tree is on its side with it's root at

the left rather than with the root at the top.

What is Kals Information Systems Ltd?

KALS Information Systems Ltd is a public listed software services & consulting company based in Bangalore, India.

The company employs about 100 professionals. Its turnover is about 2.5 crores.

The company was established in 1995 & has a proven track record in South East Asia & Japan markets.

The company works in almost all known technologies including but not limited to legacy, open source, Java, Microsoft, Oracle & other technologies.

The company is a leading provider of transition management to large end-users.

Visit www.kalsinfo.com for more details.

Differentiate complete and full binary trees?

BINARY TREE ISN'T NECESSARY THAT ALL OF LEAF NODE IN SAME LEVEL BUT COMPLETE BINARY TREE MUST HAVE ALL LEAF NODE IN SAME LEVEL.

A complete binary tree may also be defined as a full binary tree in which all leaves are at depth n or n-1 for some n. In order for a tree to be the latter kind of complete binary tree, all the children on the last level must occupy the leftmost spots consecutively, with no spot left unoccupied in between any two. For example, if two nodes on the bottommost level each occupy a spot with an empty spot between the two of them, but the rest of the children nodes are tightly wedged together with no spots in between, then the tree cannot be a complete binary tree due to the empty spot.

A full binary tree, or proper binary tree, is a tree in which every node has zero or two children.

A perfect binary tree (sometimes complete binary tree) is a full binary tree in which all leaves are at the same depth.

Raushan Kumar Singh.

What are 3 whole numbers whose product is 72?

There are twelve possible ways to multiply whole numbers for a product of 72 (excluding different arrangements of the same numbers), of which eight combinations do not repeat any factors:

  • 1×1×72 = 72
  • 1×2×36 = 72
  • 1×3×24 = 72
  • 1×4×18 = 72
  • 1×6×12 = 72
  • 1×8×9 = 72
  • 2×2×18 = 72
  • 2×3×12 = 72
  • 2×4×9 = 72
  • 2×6×6 = 72
  • 3×3×8 = 72
  • 3×4×6 = 72

Explain normal forms with simple example?

Normal Forms

First Normal Form: Every field of the table must be atomic(indivisible)i.e there must be no composite or multivalued fields.Eg.Consider a table Employee such that it has 5 fields Name,Age,Sex,TelephoneNo,we represent it as

Employee(EmpNo,Name,Age,Sex,Tno).

Empno Name Age Sex Tno

1001 A 24 M 234567,678901

1002 B 25 F 123456

Clearly, the above table is not in 1NF as the field Tno may contain more than one values because each employee may have more than one Telephones.

To make it in 1NF,however, we can do some improvisations,

First Improvisation

Add an extra field "Tno2", our table Employee now looks like Employee(EmpNo,Name,Age,Sex,Tno1,Tno2)

Second Improvisation

Repeate the remaining field values for each Telephone value

Empno Name Age Sex Tno

1001 A 24 M 234567

1001 A 24 M 678901

1002 B 25 F 123456

As you can see both these improvisations have added extra information storage overhead with them. So the most recommended one is the DECOMPOSITION.

Here we will Decompose our erroneous table into more tables.

Employee1(EmpNo,Name,Age,Sex)

Employee2(EmpNo,Tno1,Tno2)

Now our tables will look like this

Employee1

Empno Name Age Sex

1001 A 24 M

1002 B 25 F

Employee2

Empno Tno1 Tno2

1001

File processing system with example?

A file processing system is a collection of files and programs that access/modify these files. Typically,

new files and programs are added over time (by different programmers) as new information needs to be

stored and new ways to access information are needed.

Problems with file processing systems:

• data redundancy and inconsistency

• difficulty of accessing data

• problems with concurrent access

Example: assume I'm paying for groceries with my MAC card at the same time my pay check is being

deposited (and my bank uses a file processing system):

a.)withdrawal program deposit program

1. read balance from checking account

file as $51

2. read balance from checking account file as $51

3. subtract $50 (for groceries)

4. update checking account file

(new balance: $1)

5. add $100 (my salary)

6. update checking account file (new balance: $151)

It is difficult to prevent such problems unless programs (example: withdrawal and deposit) are coordi-

nated or integrated.

b.)atomicity problems - ensuring that a system failure during a database update does not leave the

database in an inconsistent state

c.)security problems

- not all users should have access to all data

- example: bank payroll personnel shouldn't know my checking account balance

- difficult to enforce security in an ad hoc system

d.) integrity problems

- data may need to satisfy certain conditions, called consistency constraints

- example: account balances should never fall below $0

- difficult to enforce/add/change consistency constraints in a file processing system

DBMSs were developed to remedy these problems.

Is ms access is DBMS?

No. MS Access is an application which uses a (sort of) DBMS. The power of the DBMS it uses is limited which is why it is not used for larger applications.

What is Hash file organization in DBMS?

Hashing is the most common form of purely random access to a file or database. It is

also used to access columns that do not have an index as an optimisation technique.

Hash functions calculate the address of the page in which the record is to be stored

based on one or more fields in the record. The records in a hash file appear randomly

distributed across the available space. It requires some hashing algorithm and the

technique. Hashing Algorithm converts a primary key value into a record address. The

most popular form of hashing is division hashing with chained overflow.

Convert 11000100 from binary to decimal?

in decimal = 196

The rightmost digit represents how many 1s (in this example 0)

The next digit left represents how many 2s (in this example 0)

The next digit left represents how many 4s (in this example 1)

The next digit left represents how many 8s (in this example 0)

The next digit left represents how many 16s (in this example 0)

The next digit left represents how many 32s (in this example 0)

The next digit left represents how many 64s (in this example 1)

The next digit left represents how many 128s (in this example 1)

so the answer is calculated by: 4 + 64 + 128 = 196