answersLogoWhite

0

Database Design

Database design is the process of creating a detailed data model of a database. It is the next step after requirement gathering and before coding begins. A good database design can save a lot of time during the database development.

1,295 Questions

What can you do in database?

A database is a program in which to store information. Such information can be sorted and manipulated to create reports, and aid an advertising mail-merge, and so on.

What is difference between Horizontal and Vertical Partitioning?

Horizontal partitioning:

Horizontal partitioning is partitioning the table into no.of smaller tables on the basis of rows.

Eg:

In an employee table, employees with salary less than $10,000 will be partitioned into different table.

Vertical Partitioning:

Vertical parttioning is dividing the table based on the different columns.

Eg:

In the same employee table, retrieving oly the name and contact number of all the employees into a different table.

How do you make object persistent?

Persistent objects exist even after the program exits. They are persistent because they reside inside non RAM memory or ROM memory.

Eg: Object variables used to create for an application or an user session.

How do you draw the class diagram for courier service?

To draw a class diagram for a courier service, identify the main entities involved, such as Courier, Customer, Package, Delivery, and Payment. Define the attributes and methods for each class; for instance, the Courier class might have attributes like courierID, name, and vehicleType, while Package might include weight, dimensions, and status. Establish relationships between the classes, such as a one-to-many relationship between Customer and Package, and a many-to-one relationship between Delivery and Courier. Use UML notation to represent these classes, their attributes, methods, and relationships visually.

Disadvantages of a file management system?

Traditional file management lacks in may ways from DBMS we use today.1) Traditional FPS does not maintain data integrity.

2) Traditional FPS does not maintain data consistency.

3) Traditional FPS does not support and allow to use query .

Design an demonstrated family relationship in data structure using c?

Well.. Let me explain what are the designing concepts rather than how to implement Family Relationship Data Structure by using C. I don't know how your question related to the Databases. I think it's related to the Data Structures and Algorithms. Yeah.. you can use it as a Database by doing few modifications.

In a Family Relationship we can identify these objects

1. People (Male and Female)

2. Marriages

3. Children

There is nothing big deal. It's just another data structure. Not a linked list not a graph, but combination of all. I'll give you a hint.

Male and female getting married. So together they make a family. In this case we can identify Marriage object as Marriage certificate and also a family. One person can have more than one marriages (In case of divorce or death). For each marriage, there is a partner and zero or more children.

It's the simplest organisation of data nodes. When family grows that simple organisation grows and makes hierarchical big data structure. That data structure we call Family Relationship data structure.

If you know how to create Linked List or Graph by using C. It's easy to build this. You may have to use malloc, free, and some structs (nodes). And you have to implement queries (functions to retrieve data).

This is a research paper. It may be useful to you. It has almost everything in pseudo code algorithms.

http://goo.gl/PuheD

But I don't recommend you to implement by using this research. It's for just get an idea. Better to try your own design.

Remember the problem is not in the language. It's about the design and the concept.

Sorry, the word you are looking for is not in the Database

answer : උත්තර දෙනවා | උත්තරය | ප්‍රත්‍යුත්තර දෙනවා | ප්‍රත්‍යුත්තරය | ප්‍රතිවචනය | පිළිතුර | පිළිතුරු දෙනවා | පිළිවදන් දෙනවා | වග කියනවා

What is free lanching?

Free lancers are the person who does not work for any company or organisation. They work for themselves when and where needed. Companies uses these people on contractual basis to work for them whenever required. And this process is called Free Lancing.

What is database organization?

A database organization is exactly what it sounds like. This is a database that is organized in some way, shape, or form.

What is the difference between sorting and searching?

Think of it this way. You tear all of the pages out of a book and throw them on the floor.

Now I say go find (XYZ) content on page 234.

Well now you need to sort through this mess just to find page 234; THEN locate the content.

If the pages were still in the book you could turn to page 234 pretty darn quick.

Further if their were a legend in the beginning of the book that said (XYZ) content was on page 234, second paragraph, third sentence, you would be able to turn right to what I want.

SQL Server.

Select one or more rows (Single row index / Composite index) and create an index on this data.

Now when you run queries you can sort by the data that you need rather than SCANNING the entire table looking for it.

SO in conclusion you want to SEARCH for data against an INDEX (Sort) for performance, scalability, speed.

What is write-ahead log protocol?

The Write-Ahead Logging Protocol:Must force the log record for an update before the corresponding data page gets to disk.Must write all log records for a Xact before commit. #1 guarantees Atomicity.#2 guarantees Durability.

How many types of normal forms?

The formal classifications describing the level of database normalization in a data model are called Normal Forms (NF) and the process of doing this is Normalization.

First normal form


First normal form (1NF) lays the groundwork for an organised database design:

Ensure that each table has a primary key: minimal set of attributes which can uniquely identify a record.

Eliminate repeating groups (categories of data which would seem to be required a different number of times on different records) by defining keyed and non-keyed attributes appropriately.

Atomicity: Each attribute must contain a single value, not a set of values.

'First normal form' depends on functional dependency formula f(x)=y. For every value of x there is value for y.


Second normal form

Second normal form (2NF) If a table has a composite key, all attributes must be related to the whole key:

The database must meet all the requirements of the first normal form.

The relational schema should not have any partial functional dependency i.e. No proper subset of the primary key should derive a functional dependency belonging to the same schema. For example, consider functional dependencies FD:{AB->C, A->D, C->D} here AB is the primary key, as A->D this relational schema is not in 2NF.


Third normal form

Third normal form (3NF) requires that data stored in a table be dependent only on the primary key, and not on any other field in the table.

The database must meet all the requirements of the first and second normal form.

All fields must be directly dependent on the primary key field. Any field which is dependent on a non-key field which is in turn dependent on the Primary Key (ie a transitive dependency) is moved out to a separate database table.

4 FOURTH AND FIFTH NORMAL FORMS
Fourth [5] and fifth [6] normal forms deal with multi-valued facts. The multi-valued fact may correspond to a many-to-many relationship,

4.1 Fourth Normal Form
Under fourth normal form, a record type should not contain two or more independent multi-valued facts about an entity. In addition, the record must satisfy third normal form.

Fifth normal form deals with cases where information can be reconstructed from smaller pieces of information that can be maintained with less redundancy. Second, third, and fourth normal forms also serve this purpose, but fifth normal form generalizes to cases not covered by the others.

Boyce-Codd normal form

Boyce-Codd normal form (or BCNF) requires that there be no non-trivial functional dependencies of attributes on something other than a superset of a candidate key (called a superkey).

Characteristics of a table in Unnormalized form?

A table that contains one or more repeating groups.

What is database softwaer?

The correct spelling is database software instead of database softwear. Database software is a utility or software program. It is used to make databases and manage and edit the information that is kept in them.

Use of lock and unlock operations in concurrent transaction?

If you lock a row in a database you maintain data integrity. If two sources attempt to update the same record at the same time you could run into concurrency issues.

The database momentarily locks a record when you are updating it on its own.

To specifically lock a record, and subsequently unlock the record gives you more control. This is load bearing on the database and typically you do not want to do this.

One such case that this makes sense would be in the following situation:

If you need to update a row and that update is based on calculation that you will make; based upon information presently in that record and other associated records / tables, AND this calculation may take a few seconds (rather than instant); THEN you will want to lock the associated records, perform your calculations; update the data and then release the lock.

This insures that no changes will occur to the data, that your calculations are relying on, while you are performing your task.

What is primery key?

primary key is a column or set of columns (called composite primary key ) that identify the table & make every table unique .
value of a primary key can not duplicated & can not be NULL .

What is a nested list?

A list within a list (or a list within another nested list).

A list contains entries, which can be anything.

Suppose those entries were lists themselves. Then they would be nested lists.

What are function of DDBMS?

Except DDBM to have the funcationality of DBMS. It also has the folliwing funcationalities:

1. Extended Communication Services.

2. Extended Data Dictionary.

3. Distributed Query Processing.

4. Extended Concurrency Control.

5. Extended Recovery Services.

How do you create a supermarket database where a person can check on the price of the available products?

Assume that you are creating a database table to hold the information of the Items in the Super market. Write down the data type suitable to hold the following information:

a) Item Number

b) Item Description

c) Unit Price

d) Stock Balance

e) Reorder Level

f) Store Location

What type of variable is a telephone area code?

A telephone area code is numeric data, but in some cases it may be more appropriate to store it as a text field because many countries quote telephone area codes including the trunk prefix 0. For example, Liverpool, England, is in UK area code 0151. Also, it is sometimes more appropriate in countries that have variable-length area codes to sort them lexically, so that 031, 0321, 0322, 0325, and 033 would appear in that order.

What is a one-to-many relationship?

It is a term from computer databases. A relational database can have a one-to-many relationship in its data. For example, if you have a customer order database, one table will contain customer names and another will contain their orders. Each customer will only be listed once, but each customer can make many orders. So one customer can be related to many orders. Incorporating that into a database requires the creation of a one to many relationship.