You are on page 1of 14

Database Design

1. Question 1. What Is Database Design?

Answer :

Database design is the process of producing a detailed data model of database. This data
model contains all the needed logical and physical design choices and physical storage
parameters needed to generate a design in a data definition language, which can then be
used to create a database.

2. Question 2. What Is The Logical Design Of A Database?

Answer :

The process of logical design involves arranging data into a series of logical relationships
called entities and attributes. An entity represents a chunk of information. In relational
databases, an entity often maps to a table. An attribute is a component of an entity and
helps define the uniqueness of the entity.

3. Question 3. What Is The Structure Of A Database?

Answer :

Instead of having all the data in a list with a random order, a database provides a structure
to organize the data. One of the most common data structures is a database table. A
database table consists of rows and columns. A database table is also called a two-
dimensional array.

4. Question 4. What Is A Logical Data Model?

Answer :

A logical data model or logical schema is a data model of a specific problem domain
expressed independently of a particular database management product or storage
technology (physical data model) but in terms of data structures such as relational tables
and columns, object-oriented classes, or XML tags.

5. Question 5. What Is A Conceptual Data Model?

Answer :

A conceptual schema is a high-level description of a business's informational needs. It


typically includes only the main concepts and the main relationships among them. ... The
conceptual model is also known as the data model as data model can be used to describe
the conceptual schema when a database system is implemented.

6. Question 6. What Is The Physical Data Model?

Answer :

A physical database model shows all table structures, including column name, column
data type, column constraints, primary key, foreign key, and relationships between tables.
Features of a physical data model include: Specification all tables and columns. Foreign
keys are used to identify relationships between tables.

7. Question 7. What Is The Conceptual Design Of A Database?

Answer :

This phase is called conceptual design. The result of this phase is an Entity-Relationship
(ER) diagram or UML class diagram. It is a high-level data model of the specific
application area. It describes how different entities (objects, items) are related to each
other.

8. Question 8. What Is A Conceptual Model For Research?

Answer :

A conceptual model is a representation of a system, made of the composition of concepts


which are used to help people know, understand, or simulate a subject the model
represents. Some models are physical objects; for example, a toy model which may be
assembled, and may be made to work like the object it represents.

9. Question 9. What Is An Iconic Model?

Answer :

An Iconic Model is a look-alike representation of some specific entity. (e.g. a house)


Classification. Iconic Models can be represented in: - Two Dimensions : e.g. photos,
drawings, etc.

10. Question 10. What Is The Framework Of A Research?

Answer :

Theories are formulated to explain, predict, and understand phenomena and, in many
cases, to challenge and extend existing knowledge within the limits of critical bounding
assumptions. The theoretical framework is the structure that can hold or support a theory
of a research study.
11. Question 11. What Is The Conceptual Framework?

Answer :

A conceptual framework is an analytical tool with several variations and contexts. It is


used to make conceptual distinctions and organize ideas. Strong conceptual frameworks
capture something real and do this in a way that is easy to remember and apply.

12. Question 12. What Is A Working Model?

Answer :

Working Model is an engineering simulation software product by Design Simulation


Technologies, Inc.. Virtual mechanical components, such as springs, ropes, and motors
are combined with objects in a 2D working space.

13. Question 13. What Is An Example Of A Physical Model?

Answer :

Physical model (most commonly referred to simply as a model but in this context
distinguished from a conceptual model) is a smaller or larger physical copy of an object.
The object being modelled may be small (for example, an atom) or large (for example,
the Solar System).

14. Question 14. What Is The Internal Working Model?

Answer :

This internal working model is a cognitive framework comprising mental representations


for understanding the world, self and others.

15. Question 15. What Is The Data Modeling?

Answer :

Data modeling is often the first step in database design and object-oriented programming
as the designers first create a conceptual model of how data items relate to each other.
Data modeling involves a progression from conceptual model to logical model to
physical schema.

16. Question 16. What Are The Features Of A Physical Data Model?

Answer :

Features of a physical data model include:


1. Specification all tables and columns.
2. Foreign keys are used to identify relationships between tables.
3. Denormalization may occur based on user requirements.
4. Physical considerations may cause the physical data model to be quite different
from the logical data model.
5. Physical data model will be different for different RDBMS. For example, data
type for a column may be different between MySQL and SQL Server.
17. Question 17. What Are The Steps To Design A Physical Model?

Answer :

The steps for physical data model design are as follows:

1. Convert entities into tables.


2. Convert relationships into foreign keys.
3. Convert attributes into columns.
4. Modify the physical data model based on physical constraints / requirements.

IDMS (Integrated Database Management System) Interview Questions

18. Question 18. What Are The Features Of Conceptual Data Model?

Answer :

Features of conceptual data model include:

1. Includes the important entities and the relationships among them.


2. No attribute is specified.
3. No primary key is specified.
o Question 19. What Are The Difference Between Logical Data Model And
Conceptual Data Model?

Answer :

1. In a logical data model, primary keys are present, whereas in a conceptual data
model, no primary key is present.
2. In a logical data model, all attributes are specified within an entity. No attributes
are specified in a conceptual data model.
3. Relationships between entities are specified using primary keys and foreign keys
in a logical data model. In a conceptual data model, the relationships are simply
stated, not specified, so we simply know that two entities are related, but we do
not specify what attributes are used for this relationship.
2. Question 20. What Are The Steps To Design Logical Data Model?

Answer :
The steps for designing the logical data model are as follows:

1. Specify primary keys for all entities.


2. Find the relationships between different entities.
3. Find all attributes for each entity.
4. Resolve many-to-many relationships.
5. Normalization.

Data modeling
 Question 1. What Is Data Modeling?

Answer :

A data model is a conceptual representation of business requirement (logical data model) or


database objects (physical) required for a database and are very powerful in expressing and
communicating the business requirements and database objects. The approach by which data
models are created is called as data modeling.

 Question 2. What Does Data Model Contain?

Answer :

 Logical Data Model: Entity, Attributes, Super Type, Sub Type, Primary Key, Alternate
Key, Inversion Key Entry, Rule, Relationship, Definition, business rule, etc
 Physical Data Model: Table, Column, Primary key Constraint, Unique Constraint or
Unique Index, Non Unique Index, Check Constraint, Default Value, Foreign Key,
comment etc.

 Question 3. What Is A Logical Data Model And Logical Data Modeling?

Answer :

A logical data model is the version of a data model that represents the business requirements
(entire or part of an organization). This is the actual implementation and extension of a
conceptual data model. Logical Data Models contain Entity, Attributes, Super Type, Sub Type,
Primary Key, Alternate Key, Inversion Key Entry, Rule, Relationship, Definition etc. The
approach by which logical data models are created is called as logical data modeling.

 Question 4. What Is A Physical Data Model And Physical Data Modeling?

Answer :

Physical data model includes all required tables, columns, relationship, database properties for
the physical implementation of databases. Database performance, indexing strategy, and physical
storage are important parameters of a physical model. The important or main object in a database
is a table which consists or rows and columns. The approach by which physical data models are
created is called as physical data modeling.

 Question 5. What Is The Difference Between A Logical And Physical Data Model?

Answer :

Logical | Physical Data Modeling:

When a data modeler works with the client, his title may be a logical data modeler or a physical
data modeler or combination of both. A logical data modeler  designs the data model to suit
business requirements, creates and maintains the lookup data, compares the versions of data
model, maintains change log, generate reports from data  model and whereas a physical data
modeler has to know about the source and target databases properties.

A physical data modeler should know the technical-know-how  to create data models from
existing databases and to tune the data models with referential integrity, alternate keys, indexes
and how to match indexes to SQL code. It  would be good if the physical data modeler knows
about replication, clustering and so on.

 Question 6. What Is A Table (entity)?

Answer :

Data stored in form of rows and columns is called as table. Each column has datatype and based
on the situation, integrity constraints are enforced on columns.

 Question 7. What Is A Column (attribute)?

Answer :

Column also known as field is a vertical alignment of the data and contains related information
to that column.

 Question 8. What Is A Row?

Answer :

Row also known as tuple or record is the horizontal alignment of the data.

 Question 9. What Is Er (entity Relationship) Diagram Or Erd?

Answer :
ER diagram is a visual representation of entities and the relationships between them. In a data
model, entities (tables) look like square boxes or rectangular boxes, which contain attributes and
these entities, are connected by lines (relationship).

 Question 10. What Is A Primary Key Constraint?

Answer :

Primary key constraint is imposed on the column data to avoid null values and duplicate values.
Primary Key=Unique + Not Null. Example: social security number, bank account number, bank
routing number

 Question 11. What Is A Composite Primary Key Constraint?

Answer :

When more than one column is a part of the primary key, it is called as composite primary key
constraint.

 Question 12. What Is A Surrogate Key?

Answer :

In normal practice, a numerical attribute is enforced a primary key which is called as surrogate
key.  Surrogate key is a substitute for natural keys. Instead of having primary key or composite
primary keys, the data modelers create a surrogate key; this is very useful for creating SQL
queries, uniquely identify a record and good performance.

 Question 13. What Is A Foreign Key Constraint?

Answer :

Parent table has primary key and a foreign key constraint is imposed on a column in the child
table.  The foreign key column value in the child table will always refer to primary key values in
the parent table.

 Question 14. What Is A Composite Foreign Key Constraint?

Answer :

When group of columns are in a foreign key, it is called as composite foreign key constraint.

 Question 15. What Are The Important Types Of Relationships In A Data Model?

Answer :
Identifying, Non-Identifying Relationship, Self-Recursive relationship are the types of
relationship.

 Question 16. What Is Identifying Relationship?

Answer :

Usually, in a data model, parent tables and child tables are present. Parent table and child table
are connected by a relationship line. If the referenced column in the child table is a part of the
primary key in the child table, relationship is drawn by thick lines by connecting these two
tables, which is called as identifying relationship.

Performance Management Tutorial

 Question 17. What Is Non-identifying Relationship?

Answer :

Usually, in a data model, parent tables and child tables are present. Parent table and child table
are connected by a relationship line. If the referenced column in the child table is a not a part of
the primary key and standalone column in the child table, relationship is drawn by dotted lines
by connecting these two tables, which is called as non-identifying relationship.

Oracle Performance Tuning Interview Questions

 Question 18. What Is Self-recursive Relationship?

Answer :

A standalone column in a table will be connected to the primary key of the same table, which is
called as recursive relationship.

 Question 19. What Is Cardinality?

Answer :

One to One, One to many, and many to many are different types of cardinalities. In a database,
high cardinality means more unique values are stored in a column and vice versa.

 Question 20. What Is A Conceptual Data Model And Conceptual Data Modeling?

Answer :

Conceptual data model includes all major entities and relationships and does not contain much
detailed level of information about attributes and is often used in the initial planning phase. Data
Modelers create conceptual data model and forward that model to functional team for their
review. The approach by which conceptual data models are created is called as conceptual data
modeling.

 Question 21. What Is An Enterprise Data Model?

Answer :

Enterprise data model comprises of all entities required by an enterprise. The development of a
common consistent view and understanding of data elements and their relationships across the
enterprise is referred to as Enterprise Data Modeling. For better understanding purpose, these
data models are split up into subject areas.

 Question 22. What Is Relational Data Modeling?

Answer :

The visual representation of objects in a relational database (usually a normalized) is called as


relational data modeling. Table contains rows and columns.

 Question 23. What Is Oltp Data Modeling?

Answer :

OLTP acronym stands for ONLINE TRANSACTIONAL PROCESSING. The approach by


which data models are constructed for transactions is called as OLTP data modeling. Example:
all online transactions, bank transactions, trading transactions.

Performance Management Interview Questions

 Question 24. What Is A Constraint? What Are The Different Types Of Constraint?

Answer :

Constraint is a rule imposed on the data.  The different types of constraints are primary key,
unique, not null, foreign key, composite foreign key, check constraint etc.

 Question 25. What Is A Unique Constraint?

Answer :

Unique constraint is imposed on the column data to avoid duplicate values, but it will contain
NULL values.

 Question 26. How Many Null Values Can Be Inserted In A Column That Has Unique
Constraint?
Answer :

Many null values can be inserted in an unique constraint column because one null value is not
equal to another null value.

 Question 27. What Is A Check Constraint?

Answer :

Check constraint is used to check range of values in a column.

 Question 28. What Is Index?

Answer :

Index is imposed on a column or set of columns for fastest retrieval of data.

 Question 29. What Is A Sequence?

Answer :

Sequence is a database object to generate unique number.

 Question 30. What Is Normalization?

Answer :

E.F. Codd gave some rules to design relational databases and the rules were focused on
removing data redundancy which helps to overcome normal data modeling problems. The
process of removing data redundancy is known as normalization.

 Question 31. What Are The Types Of Normalization?

Answer :

First normal form, Second normal form, third normal forms are three types of normalization used
in practice. Beyond these normal forms, Boyce-Codd fourth and fifth normal forms are also
available.

 Question 32. What Is De-normalization?

Answer :

De-Normalization is a process of adding redundancy to the data. This helps to quickly retrieve
the information from the database.
 Question 33. What Is Data Model Meta Data?

Answer :

You can take a report of the entire data model, or subject or part of the data model. The data
about various objects in the data model is called as data model Metadata. .Data Modeling Tools
have options to create reports by checking the various options. Either you can create logical data
model Meta data of physical model Meta data.

 Question 34. What Is Data Model Repository?

Answer :

Data Model and its relevant data like entity definition, attribute definition, columns, data types
etc. are stored in a repository, which can be accessed by data modelers and the entire team.

 Question 35. What Is Forward Engineering In A Data Model?

Answer :

Forward Engineering is a process by which DDL scripts are generated from the data model. Data
modeling tools have options to create DDL scripts by connecting with various databases. With
these scripts, databases can be created.

 Question 36. What Is Reverse Engineering In A Data Model?

Answer :

Reverse Engineering is a process useful for creating the data models from database or scripts.
Data modeling tools have options to connect to the database by which we can reverse engineer a
database into a data model.

 Question 37. What Is A Subtype And Super Type Entity?

Answer :

An entity can be split into many entities (sub-entities) and grouped based on some characteristics
and each sub entity will have attributes relevant to that entity. These entities are called subtype
entities. The attributes which are common to these entities are moved to a super (higher) level
entity, which is called as supertype entity.

 Question 38. Give Us A Non-computer Example Of Preemptive And Non-preemptive


Scheduling?

Answer :
Consider any system where people use some kind of resources and compete for them. The non-
computer examples for preemptive scheduling the traffic on the single lane road if there is
emergency or there is an ambulance on the road the other vehicles give path to the vehicles that
are in need. The example for preemptive scheduling is people standing in queue for tickets.

 Question 39. What Is The Difference Between Star Flake And Snow Flake Schema?

Answer :

Star Schema: Well in star schema you just enter your desired facts and all the primary keys of
your dimensional tables in Fact table. And fact tables primary is the union of its all dimension
table key. In star schema dimensional tables are usually not in BCNF form.

Snow Flake: Its almost like starschema but in this our dimension tables are in 3rd NF, so more
dimensions tables. And these dimension tables are linked by primary, foreign key relation.

 Question 40. What Is Data Sparsity And How It Effect On Aggregation?

Answer :

Data sparsity is term used for how much data we have for a particular dimension/entity of the
model.

It affects aggregation depending on how deep the combination of members of the sparse
dimension make up. If the combination is a lot and those combination do not have any factual
data then creating space to store those aggregations will be a waste as a result, the database will
become huge.

Oracle Performance Tuning Interview Questions

 Question 41. What Is The Difference Between Hashed File Stage And Sequential File
Stage In Relates To Datastage Server?

Answer :

In datastage server jobs, can we use sequential filestage for a lookup instead of hashed filestage.
If yes ,then what’s the advantage of a Hashed File stage over sequential filestage

search is faster in hash files as you can directly get the address of record directly by hash
algorithm as records are stored like that but in case of sequential file u must compare all the
records.

 Question 42. When Should You Consider Denormalization?

Answer :
Denormalization is used when there are a lot of tables involved in retrieving data.
Denormalization is done in dimensional modelling used to construct a data ware house. This is
not usually done for data bases of transactional systems.

 Question 43. What Is Erd?

Answer :

Data models are tools used in analysis to describe the data requirements and assumptions in the
system from a top-down perspective. They also set the stage for the design of databases later on
in the SDLC.

 There are three basic elements in ER models:


 Entities are the “things” about which we seek information.
 Attributes are the data we collect about the entities.
 Relationships provide the structure needed to draw information from multiple entities

 Question 44. What Is Third Normal Form?

Answer :

An entity is in the third normal form if it is in the second normal form and all of its attributes are
not transitively dependent on the primary key. Transitive dependence means that descriptor key
attributes depend not only on the whole primary key, but also on other descriptor key attributes
that, in turn, depend on the primary key. In SQL terms, the third normal form means that no
column within a table is dependent on a descriptor column that, in turn, depends on the primary
key.

For 3NF, first, the table must be in 2NF, plus, we want to make sure that the non-key fields are
dependent upon ONLY the PK, and not other non-key fields for its existence. This is very similar
to to 2NF, except that now you are comparing the non-key fields to OTHER non-key fields.
After all, we know that the relationship to the PK is good, because we established that in 2NF.

 Question 45. Why Are Recursive Relationships Are Bad? How Do You Resolve Them?

Answer :

Recursive relationships are an interesting and more complex concept than the relationships you
have seen in the previous chapters, such as a one-to-one, one-to-many, and many-to-many. A
recursive relationship occurs when there is a relationship between an entity and itself. For
example, a one-to-many recursive relationship occurs when an employee is the manager of other
employeess. The employee entity is related to itself, and there is a one-to-many relationship
between one employee (the manager) and many other employees (the people who report to the
manager). Because of the more complex nature of these relationships, we will need slightly more
complex methods of mapping them to a schema and displaying them in a style sheet.
 Question 46. Is This Statement True Or False? All Databases Must Be In Third Normal
Form?

Answer :

In general all organization data bases are normalized to 3nf in order to remove redundancy and
efficient access. A data base can also be created without normalization. Hence it is not a
mandatory that a database should be in 3nf.

 Question 47. What Is An Artificial (derived) Primary Key? When Should It Be Used?

Answer :

Using a name as the primary key violates the principle of stability. The social security number
might be a valid choice, but a foreign employee might not have a social security number. This is
a case where a derived, rather than a natural, primary key is appropriate. A derived key is an
artificial key that you create. A natural key is one that is already part of the database.

 Question 48. What Is Second Normal Form?

Answer :

An entity is in the second normal form if all of its attributes depend on the whole (primary) key.
In relational terms, every column in a table must be functionally dependent on the whole primary
key of that table. Functional dependency indicates that a link exists between the values in two
different columns.

If the value of an attribute depends on a column, the value of the attribute must change if the
value in the column changes. The attribute is a function of the column. The following
explanations make this more specific:

If the table has a one-column primary key, the attribute must depend on that key.

If the table has a composite primary key, the attribute must depend on the values in all its
columns taken as a whole, not on one or some of them.

If the attribute also depends on other columns, they must be columns of a candidate key; that is,
columns that are unique in every row.

If you do not convert your model to the second normal form, you risk data redundancy and
difficulty in changing data. To convert first-normal-form tables to second-normal-form tables,
remove columns that are not dependent on the primary key.

You might also like