If you're looking for Data Modeling Interview Questions for Experienced or Freshers, you are in right place. There are a lot of opportunities from many reputed companies in the world. According to research Data Modeling has a market share of about 15.43%. So, You still have the opportunity to move ahead in your career in Data Modeling Architecture.
Mindmajix offers Advanced Data Modeling Interview Questions 2021 that helps you in cracking your interview & acquire a dream career as a Data Modeling Architect.
If you want to enrich your career and become a professional in Data Modelling, then visit Mindmajix - a global online training platform: "Data Modelling Training" This course will help you to achieve excellence in this domain.
Below mentioned are the Top Frequently asked Data Modeling Interview Questions and Answers that will help you to prepare for the Data Modeling interview. Let's have a look at them.
Frequently Asked Data Modelling Interview Questions - [Updated 2021]
Data Modelling Interview Questions for Freshers & Experienced
Q1). What is data modeling?
Ans: A data model is a conceptual representation of business requirements (logical data model) or database objects (physical) required for a database and is very powerful in expressing and communicating the business requirements and database objects. The approach by which data models are created is called data modeling.
[Related Article: Examples of Data Modelling]
Q2). What does the data model contain?
Ans: 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.
Q3). What are a logical data model and logical data modelling?
Ans: 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 logical data modeling.
Q4). What are a physical data model and physical data modeling?
Ans: Physical data model includes all required tables, columns, relationships, 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 of rows and columns. The approach by which physical data models are created is called physical data modeling.
Q5). What is the difference between a logical and physical data model?
Ans: When a data modeler works with the client, his title may be a logical data modeler or a physical data modeler, or a combination of both.
A logical data modeler designs the data model to suit business requirements, creates and maintains the lookup data, compare the versions of the data model, maintains a changelog, generate reports from the 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.
Q6). What is a table (entity)?
Ans: Data stored in form of rows and columns is called a table. Each column has a datatype and based on the situation, integrity constraints are enforced on columns.
Q7). What is a column (attribute)?
Ans: Column also known as a field is a vertical alignment of the data and contains related information to that column.
Q8). What is a row?
Ans: Row also known as tuple or record is the horizontal alignment of the data.
Q9). What is the ER (entity relationship) diagram or ERD?
Ans: 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).
Q10). What is a primary key constraint?
Ans: The 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
Q11). What is a composite primary key constraint?
Ans: When more than one column is a part of the primary key, it is called a composite primary key constraint.
Q12). What is a surrogate key?
Ans: In normal practice, a numerical attribute is enforced as a primary key which is called a surrogate key. A surrogate key is a substitute for natural keys.
Instead of having a 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.
Q13). What is a foreign key constraint?
Ans: The parent table has a 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.
Q14). What is a composite foreign key constraint?
Subscribe to our youtube channel to get new updates..!
Ans: When a group of columns is in a foreign key, it is called a composite foreign key constraint.
[Related Article: Data Modelling Tools]
Q15). What are the important types of Relationships in a data model?
Ans: Identifying, Non-Identifying Relationship, Self-Recursive relationship are the types of relationship.
Q16). What is an identifying relationship?
Ans: 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, the relationship is drawn by thick lines by connecting these two tables, which is called an identifying relationship.
Q17). What is the non-identifying relationship?
Ans: 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 not a part of the primary key and standalone column in the child table, the relationship is drawn by dotted lines by connecting these two tables, which is called a non-identifying relationship.
Q18). What is a self-recursive relationship?
Ans: A standalone column in a table will be connected to the primary key of the same table, which is called a recursive relationship.
Q19). What is cardinality?
Ans: 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.
Q20). What are a conceptual data model and conceptual data modeling?
Ans: The 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 a conceptual data model and forward that model to the functional team for their review.
The approach by which conceptual data models are created is called conceptual data modeling.
Q21). What is an enterprise data model?
Ans: 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 purposes, these data models are split up into subject areas.
Q22). What is relational data modeling?
Ans: The visual representation of objects in a relational database (usually a normalized) is called relational data modeling. The table contains rows and columns.
Q23). What is OLTP data modeling?
Ans: OLTP acronym stands for ONLINE TRANSACTIONAL PROCESSING. The approach by which data models are constructed for transactions is called OLTP data modeling. Example: all online transactions, bank transactions, trading transactions.
Q24). What is a constraint? What are the different types of constraints?
Ans: 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.
Q25). What is a unique constraint?
Ans: Unique constraint is imposed on the column data to avoid duplicate values, but it will contain NULL values.
Q26). How many null values can be inserted in a column that has a unique constraint?
Ans: Many null values can be inserted in a unique constraint column because one null value is not equal to another null value.
Q27). What is a check constraint?
Ans: Check constraint is used to check the range of values in a column.
[Related Article: What is Data Modelling]
Q28). What is an index?
Ans: Index is imposed on a column or set of columns for the fastest retrieval of data.
Q29). What is the sequence?
Ans: Sequence is a database object to generate a unique number.
Q30). What is normalization?
Ans: 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.
Q31). What are the types of normalization?
Ans: 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.
Q32). What is De-Normalization?
Ans: De-Normalization is a process of adding redundancy to the data. This helps to quickly retrieve the information from the database.
Q33). What is the data model Metadata?
Ans: 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 data model Metadata. Data Modeling Tools have options to create reports by checking various options. Either you can create a logical data model Metadata of physical model Metadata.
Q34). What is a data model repository?
Ans: 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.
Q35). What is forward engineering in a data model?
Ans: 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.
Q36). What is reverse engineering in a data model?
Ans: Reverse Engineering is a process useful for creating data models from databases or scripts. Data modeling tools have options to connect to the database by which we can reverse engineer a database into a data model.
Q37). What is a subtype and supertype entity?
Ans: 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 a supertype entity.
Q38). Give us a non-computer example of preemptive and non-preemptive scheduling?
Ans: 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 an emergency or there is an ambulance on the road the other vehicles give a path to the vehicles that are in need.
An example of preemptive scheduling is people standing in queue for tickets.
Q39). What is the difference between star flake and snowflake schema?
Ans: Star Schema: Well in star schema you just enter your desired facts and all the primary keys of your dimensional tables in the Fact table. And fact tables primary is the union of its all dimension table key. In a star schema, dimensional tables are usually not in BCNF form.
Snow Flake: It's almost like star-schema 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.
Q40). What is data sparsity and how it affects aggregation?
Ans: Data sparsity is a 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 combinations 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.
Q41). What is the difference between the hashed file stage and sequential file stage in relates to DataStage Server?
Ans: In Datastage server jobs, can we use a sequential file stage for a lookup instead of a hashed file stage. If yes, then what’s the advantage of a Hashed File stage over a sequential file stage.
Search is faster in hash files as you can directly get the address of record directly by the hash algorithm as records are stored like that but in the case of a sequential file, u must compare all the records.
Q42). When should you consider denormalization?
Ans: Denormalization is used when there are a lot of tables involved in retrieving data. Denormalization is done in dimensional data modelling used to construct a data warehouse. This is not usually done for databases of transactional systems.
Q43). What is ERD?
Ans: Data models are tools used in the 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:
1. Entities are the “things” about which we seek information.
2. Attributes are the data we collect about the entities.
3. Relationships provide the structure needed to draw information from multiple entities
Q44). What is the third normal form?
Ans: 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 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.
Q45). Why are recursive relationships are bad? How do you resolve them?
Ans: Recursive relationships are an interesting and more complex concept than the relationships you have seen in the previous chapters, such as 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 another employee. 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.
Q46). Is this statement TRUE or FALSE? all databases must be in third normal form?
Ans: In general all organization databases are normalized to 3nf in order to remove redundancy and efficient access. A database can also be created without normalization. Hence it is not mandatory that a database should be in 3nf.
Q47). What is an artificial (derived) primary key? When should it be used?
Ans: 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.
Q48). What is the second normal form?
Ans: 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.