CS403 – Database Management Systems: Midterm Important Subjective (82 Solved Q&As)
Computer Science • Read every solved subjective question with its model answer directly on this page. Free, no login required.
All 664 Midterm Packs · CS403 Course Page · CS403 MCQ Pack (235 MCQs)
-
What is the difference between a Database and a DBMS?
Topic: Database & DBMS Fundamentals
A collection of related pieces of data, whose purpose is to solve the data management needs of an institution, is called a Database. Database Management Systems (DBMS), on the other hand, are very complex software which save the data on the secondary storage devices and which are used to manipulate databases.
-
What is the difference between a Database System and traditional File Processing?
Topic: Database & DBMS Fundamentals
A DBMS is data sharable, but the traditional file system is isolated and not sharable. A DBMS is flexible, but the traditional file system has a lack of flexibility and has many limitations. A DBMS maintains integrity, whereas the traditional file system has an integrity problem.
-
How is data sharing done in a database? Explain, and also give a solid example.
Topic: Database & DBMS Fundamentals
The data for different applications or subsystems is placed at the same place. This introduces the major benefit of data sharing. That is, data that is common among different applications need not be stored repeatedly, as was the case in the file processing environment. For example, the systems of an educational institution.
-
Why do we use SQL?
Topic: Database & DBMS Fundamentals
Structured Query Language (SQL) is the most widely used language for the manipulation of data. But we will first study Relational Algebra and Relational Calculus, which are procedural and non-procedural respectively.
-
What is the benefit of standardization of a database system in terms of future growth? Give your own point of view.
Topic: Database & DBMS Fundamentals
Standardization of database systems is very beneficial in terms of future growth, because once a system is defined to follow a specific standard, or is built on a specific standard, it provides us the ease of use in a number of aspects.
-
What is the difference between Intension and Extension?
Topic: Database & DBMS Fundamentals
Intension and extension, in logic, are correlative words that indicate the reference of a term or concept: "intension" indicates the internal content of a term or concept that constitutes its formal definition; and "extension" indicates its range of applicability by naming the particular objects that it denotes.
-
What are the consequences of a database failure / breach?
Topic: Database & DBMS Fundamentals
Depending on the type of data involved, the consequences can include destruction or corruption of databases, the leaking of confidential information, the theft of intellectual property, and regulatory requirements to notify and possibly compensate those affected.
-
What are the steps of database development?
Topic: Database Design Process, Levels & Analysis Tools
Database Design; Application Programs; Implementation.
-
Explain the Conceptual (Logical) level of data.
Topic: Database Design Process, Levels & Analysis Tools
When we see the data in the logical view, we can see that the data stored in the database is stored only once, and two users get different data from the same copy of data at the underlying conceptual level.
-
How is data stored at the Physical level? Explain Physical Database Design.
Topic: Database Design Process, Levels & Analysis Tools
The logical design, created using a specific data model after the analysis of the organization, needs to be implemented in a physical DBMS software. So the Physical Database Design is performed, and the design created so far in the logical form is implemented on that very DBMS.
-
Which tool can be used after analyzing a problem to develop a diagram (of the system)?
Topic: Database Design Process, Levels & Analysis Tools
The Data Flow Diagram (DFD). After the analysis phase, the working of the system is represented graphically through DFDs, which show how data flows between the external entities, the processes and the data stores of the system.
-
Define Separator and Ring Sum Operator.
Topic: Database Design Process, Levels & Analysis Tools
Separator: The dataflow symbol which is used for separating data from a single source to multiple sinks is known as a separator. | Ring Sum Operator: This operator is used when data from a source process can flow to one of the mentioned sinks.
-
Draw the Cross Reference Matrix for the given diagram, where I, II, III and IV are Reports of an organization and A, B, C, D, E and F are Attributes of these Reports. (Marks: 5)
Topic: Database Design Process, Levels & Analysis Tools
A cross reference matrix is drawn with the reports as rows and the attributes as columns; a tick is placed where an attribute appears in a report. Reading the diagram in the paper (Report I carries attributes A and B; Report II carries D and E; Report III carries A and C; Report IV carries B and F), the matrix is:
-
From given data, separate and define Entity Type, Entity Instance and Entity Set.
Topic: Data Model: Entities, Attributes & Relationships
Entity Type: The entity type can be defined as a name/label assigned to items/objects that exist in an environment and that have similar properties. It could be a person, place, event or even a concept; that is, an entity type can be defined for physical as well as non-physical things. | Entity Instance: A particular object belonging to a particular entity type. An item becomes an instance of, or belongs to, an entity type by possessing the defining properties associated with that entity type. For example, EMPLOYEE, FURNITURE, ELECTRIC APPLIANCES, OFFICE EQUIPMENT. | Entity Set: A group of entity instances of a particular entity type is called an entity set. For example, all employees of an organization form an entity set; likewise all students and all courses form entity sets of different entity types.
-
Explain Weak Entity.
Topic: Data Model: Entities, Attributes & Relationships
In a relational database, a weak entity is an entity that cannot be uniquely identified by its attributes alone; therefore, it must use a foreign key in conjunction with its attributes to create a primary key.
-
What are the types of Relationship?
Topic: Data Model: Entities, Attributes & Relationships
One-to-One, One-to-Many, and Many-to-Many.
-
Attributes of Student and Course were given in the paper. Explain the Many-to-Many mapping between them.
Topic: Data Model: Entities, Attributes & Relationships
A mapping R from X to Y is many-to-many if each entity from X is associated with many entities in Y and one entity in Y is associated with many entities in X. So, in the Student–Course case, one student can be associated with many courses and one course can be associated with many students.
-
If we map a unary relationship into a relation and the ERD has one-to-one cardinality, then what would be the mapping procedure? (Marks: 2)
Topic: Data Model: Entities, Attributes & Relationships
A unary (recursive) relationship with one-to-one cardinality is mapped within a single relation: create one relation for the entity type, and place the primary key of the same entity type into that very relation as a foreign key (given a separate role name), so that each record points to the one related record of the same entity type. No separate relation is created for the relationship.
-
A scenario of a Student was given, with attributes Student ID, Name, Date of Birth, Address, Age and Hobby. Draw the ERD, showing Name as a composite attribute, Hobby as a multivalued attribute, and Age as a derived attribute.
Topic: Data Model: Entities, Attributes & Relationships
The ERD (described in text, as a diagram cannot be typed) contains one entity type STUDENT drawn as a rectangle, with these attributes drawn as ovals attached to it: Student ID as the key attribute (underlined); Name as a composite attribute, i.e. an oval joined to its component ovals such as First Name and Last Name; Address as a simple attribute; Hobby as a multivalued attribute, drawn as a double oval; Date of Birth as a simple stored attribute; and Age as a derived attribute, drawn as a dashed oval, because its value is derived (calculated) from the Date of Birth and is not stored.
-
Map the following: Real World Data, Metadata, Data Occurrences.
Topic: Data Model: Entities, Attributes & Relationships
Real world data consists of the facts about the objects of the real world (e.g. a real student). Metadata is the data about data — the description/definition of that data (names, types, structure), stored in the data dictionary or catalogue. Data occurrences are the actual values of the data stored in the database at a particular time (the instances). So the mapping is: a real world object is represented in the database by data occurrences (its stored values), and those occurrences are described and controlled through the metadata.
-
Give the difference between Primary Key, Alternate Key and Secondary Key (2 points).
Topic: Keys & Integrity Constraints
Primary Key: A candidate key chosen by the database designer to act as the key is the primary key. | Alternate Key: Candidate keys which are not chosen as the primary key are known as alternate keys. | Secondary Key: Many times we need to access certain instances of an entity type using the value(s) of one or more attributes other than the PK; such a key used for accessing data is the secondary key.
-
Relation 1 (Student ID, Name, Address, Degree ID) contains the rows: (1, ABC, ABC123, Null), (Default, XYZ, XYZ123, 01), (2, WXY, WXY123, 05). Relation 2 (Degree ID, Degree Title, Duration) contains: (01, BCS, 4 Years), (02, MCS, 2 Years), (03, MSCS, 2 Years). Degree ID is a reference / foreign key in Relation 1. Specify the constraint(s) applied on the FK in the case given above from the list provided, and also justify your answer. [Referential, Default, Domain] (Marks: 3)
Topic: Keys & Integrity Constraints
The Referential (integrity) constraint is applied on the foreign key. It states that a foreign key value in Relation 1 must either match an existing primary key value in Relation 2 or be Null. Justification: the value 01 exists in Relation 2, and the Null value is also allowed under this constraint; however, the Degree ID 05 appearing in Relation 1 has no corresponding entry in Relation 2 (which contains only 01, 02 and 03), so this value violates the referential constraint — which shows that the referential constraint is the one applied on this foreign key.
-
What is the Cartesian Product? (It was a long question.)
Topic: Relational Algebra
The Cartesian product needs not to be union compatible; it means the relations can be of different degree. It is denoted by X. Suppose there is a relation R with attributes (A1, A2, ... An) and S with attributes (B1, B2, ... Bn). The Cartesian product will be: R X S. Every tuple of R is combined with every tuple of S in the resulting relation.
-
Name and explain the three operations of a DBMS (Relational Algebra).
Topic: Relational Algebra
In a relational database, three operations are used to develop sets of data: Select — creates a subset of data of records that meet stated criteria. Join — combines relational data from different tables. Project — creates a subset of a table using only specified columns.
-
Relate Column A with Column B of the given table (mention the index of both columns, e.g. 5 -> e). Column A: 1 – θ, 2 – ■ (semi-join symbol), 3 – ■ (join symbol), 4 – π. Column B: a – Equi Join, b – Semi Join, c – Theta Join, d – Projection. (Marks: 2)
Topic: Relational Algebra
1 -> c (θ is the theta used in the Theta Join) · 2 -> b (Semi Join) · 3 -> a (the join symbol, used here for the Equi Join) · 4 -> d (π stands for Projection).
-
Is it necessary to normalize a relation? Explain.
Topic: Normalization
Normalization is a step-by-step process to make the DB design more efficient and accurate. A normalized database helps the DBA to maintain the consistency of the database. However, the normalization process is not a must; rather, it is a strongly recommended activity performed after the logical DB design phase.
-
How is a 1NF table converted into 2NF? Explain the process.
Topic: Normalization
The process for transforming a 1NF table to 2NF is: (i) Identify any determinants other than the composite key, and the columns they determine. (ii) Create and name a new table for each determinant and the unique columns it determines. (iii) Move the determined columns from the original table to the new table; the determinant becomes the primary key of the new table. (iv) Delete the columns you just moved from the original table, except for the determinant, which will serve as a foreign key. (v) The original table may be renamed to maintain semantic meaning. | Example from the source: CLASS (crId, stId, stName, fId, room, grade), with crId, stId -> stName, fId, room, grade; stId -> stName; crId -> fId, room. To remove the anomalies, the table is decomposed into three tables: STD (stId, stName), COURSE (crId, fId, room) and CLASS (crId, stId, grade). Now these three tables are in second normal form; there are no anomalies in this form, and we say this is 2NF.
-
Convert the following relation into one normal form ahead (for example: if the relation is in 2nd normal form, convert it into 3rd normal form). Student (Student-ID, Student-Name, Father-Name, City, Hobby) with rows: (1, ABC, BC, Lahore, 'Cricket, Movies'), (2, DEF, EF, Islamabad, 'Football, Basketball'), (3, GHI, HI, Lahore, 'Movies, Body building'), (4, JKL, KL, Karachi, 'Cricket'). (Marks: 3)
Topic: Normalization
The given relation is not even in 1NF, because Hobby is a multivalued attribute — it contains more than one value in a single cell. One normal form ahead is 1NF, in which every attribute value must be atomic. The multivalued attribute is removed into a separate relation: Student (Student-ID, Student-Name, Father-Name, City) keeps one row per student, and a new relation StudentHobby (Student-ID, Hobby) holds one row per hobby: (1, Cricket), (1, Movies), (2, Football), (2, Basketball), (3, Movies), (3, Body building), (4, Cricket). Student-ID in StudentHobby is a foreign key referencing Student, and (Student-ID, Hobby) together form its key. Now all values are atomic, so the relations are in 1NF.
-
Consider the relation Course (Course-ID, Course-Title, Instructor-ID, Instructor-Specialization) with rows: (101, ABC, 1, PQR), (201, DEF, 2, STU), (301, GHI, 1, PQR), (401, JKL, 3, YZX), (402, MNO, 4, ASD), where Course-ID is the Primary Key of the relation Course. Find in which normal form the relation is, and also discuss how Update Anomalies would occur in the relation. (Marks: 5)
Topic: Normalization
The relation is in 2NF. All attribute values are atomic, so it is in 1NF; and since the primary key Course-ID is a single attribute, no non-key attribute can be partially dependent on part of the key, so it is also in 2NF. It is not in 3NF, because a transitive dependency exists: Course-ID -> Instructor-ID -> Instructor-Specialization, i.e. Instructor-Specialization depends on the key only through Instructor-ID. | Update anomaly: the specialization of an instructor is repeated in every course taught by that instructor — e.g. Instructor-ID 1 with specialization PQR appears in both course 101 and course 301. If the specialization of instructor 1 changes, the new value must be updated in every such row; if even one row is missed, the same instructor will appear with two different specializations and the database becomes inconsistent. This anomaly is removed by decomposing the relation into Course (Course-ID, Course-Title, Instructor-ID) and Instructor (Instructor-ID, Instructor-Specialization).
-
What is the role of a DBA in a DBMS?
Topic: Database Administration
A Database Administrator (DBA) is an individual or person responsible for controlling, maintenance, coordinating and operation of the database management system. Their role also varies from configuration, database design, migration, security, troubleshooting, backup, and data recovery.
-
Write at least 5 duties of a DBA.
Topic: Database Administration
The key responsibilities of a Database Administrator include: (1) Software installation and maintenance. (2) Data extraction, transformation, and loading. (3) Specialised data handling. (4) Database backup and recovery. (5) Security. (6) Authentication. (7) Capacity planning. (8) Performance monitoring.
-
If an organization is using a file server (file processing system), how can you convince the higher management to use a DBMS? Brief with 5 points.
Topic: Database Administration
1. Data sharing: in a DBMS the same data can be used simultaneously by many departments and users, instead of each application keeping its own isolated files. 2. Reduced redundancy and inconsistency: data is stored once at a central place, so duplicate copies cannot disagree with each other. 3. Data integrity: the DBMS enforces integrity constraints centrally, which file systems cannot do. 4. Security and controlled access: the DBMS provides authorization, so only permitted users can access or change sensitive data. 5. Backup, recovery and concurrent access: the DBMS provides built-in facilities for backup, recovery from failure and safe multi-user access, which a file server does not provide reliably.
-
Use the code and compression technique on the given table and make the table again. Given table — STID / STNAME / HOBBY: (S1020, Sohail Dar, Reading), (S1038, Shoaib Ali, Gardening), (S1015, Tahira Ejaz, Reading), (S1015, Tahira Ejaz, Movie), (S1018, Arif Zia, Reading).
Topic: Data Storage: Codes & Compression
Applying the code and compression technique, the repeated HOBBY values are replaced by single-character codes (Reading = R, Gardening = G, Movie = M). The resulting table, as given in the source, is:
-
For which purpose do we use relational data model?
Topic: Database & DBMS Fundamentals • 2 marks marks
The RDM is mainly used for designing/defining external and conceptual schemas; however to some extent physical schema is also specified in it.
-
What is DML (Data Manipulation Language)?
Topic: Database & DBMS Fundamentals • 3 marks marks
For using a certain model certain data manipulations are performed using a specific language. This specific language is called data manipulation language.
-
Why is the relational data model considered as simple?
Topic: Database & DBMS Fundamentals • 3 marks marks
There is just one structure and that is a relation or a table. Even this single structure is very easy to understand, so a user of even of a moderate genius can understand it easily.
-
What is a database?
Topic: Database & DBMS Fundamentals
A database is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and which is designed, built and populated with data for a specific purpose.
-
What is a Database system?
Topic: Database & DBMS Fundamentals
The database and DBMS software together is called as Database system.
-
What are the disadvantages of the File Processing System?
Topic: Database & DBMS Fundamentals
Data redundancy & inconsistency. Difficult in accessing data. Data isolation. Data integrity. Concurrent access is not possible. Security Problems. .
-
What is Data Independence?
Topic: Database & DBMS Fundamentals
Data independence means that ‘the application is independent of the storage structure and access strategy of data’. In other words, The ability to modify the schema definition in one level should not affect the schema definition in the next higher level. Two types of Data Independence: 1) Physical Data Independence: Modification in physical level should not affect the logical level. 2) Logical Data Independence: Modification in logical level should affect the view level. NOTE: Logical Data Independence is more difficult to achieve
-
What is a Data Model?
Topic: Database & DBMS Fundamentals
A collection of conceptual tools for describing data, data relationships data semantics and constraints.
-
What is the difference between data and information?
Topic: Database & DBMS Fundamentals
Data is a raw collection of facts and figures collected from a specific environment. Once we process the data using different methods, the data is converted into useful information.
-
What is data consistency?
Topic: Database & DBMS Fundamentals
Data consistency means that the changes made to different occurrences of data should be controlled and managed in such a way that all the occurrences have the same value for any specific data item.
-
What are the three important objectives for using data types while specifying attributes?
Topic: Database Design Process, Levels & Analysis Tools • 3 marks marks
• Minimized usage of storage space • Represent all possible values • Improve data integrity
-
Describe the three levels of data abstraction.
Topic: Database Design Process, Levels & Analysis Tools
The are three levels of abstraction: 1. 1Physical level: The lowest level of abstraction describes how data are stored. 2. Logical level: The next higher level of abstraction, describes what data are stored in database and what relationship among those data. 3. View level: The highest level of abstraction describes only part of entire database.
-
Write the two types of Completeness Constraints?
Topic: Data Model: Entities, Attributes & Relationships • 2 marks marks
There are two types of completeness constraints, partial completeness constraints and total completeness constraints.
-
Define main functionality of subtype discriminator?
Topic: Data Model: Entities, Attributes & Relationships • 2 marks marks
This is a tool or a technique which provides us a methodology to determine that to which subtype one instance of a supertype belongs.
-
If we have two entities, how can we make a one-to-one relationship between them?
Topic: Data Model: Entities, Attributes & Relationships • 2 marks marks
A one-to-one relationship between two entities is implemented by placing the primary key of one entity as a foreign key in the relation of the other entity. In this way, each instance of one entity is associated with exactly one instance of the other entity.
-
What is the difference between relation and relationship?
Topic: Data Model: Entities, Attributes & Relationships • 2 marks marks
Relationship is purely a construct of the er data model. Relation is a structure of the relational data model.
-
In which situation do a recursive relationship exist?
Topic: Data Model: Entities, Attributes & Relationships • 2 marks marks
This is the situation when any attribute of one entity is associated with another attribute of the same entity. 6
-
If there is one super type and there are three subtypes, then how many relations should be created?
Topic: Data Model: Entities, Attributes & Relationships • 2 marks marks
If there is one super type and there are three subtypes, so then four relations are to be created.
-
Differentiate Total and Partial Completeness Constraints.
Topic: Data Model: Entities, Attributes & Relationships • 5 marks marks
Total Completeness constraint: Total Completeness constraint exist only if we have a super type and some subtypes associated with that supertype, and the following situation exists between the super type and subtype. All the instances of the supertype entity must be present in at one of the subtype entities, i.e.—there should be not instance of the supertype entity which does not belong to any of the subtype entity. Partial Completeness Constraint: This type of completeness constraint exists when it is not necessary for any supertype entity to have its entire instance set to be associated with any of the subtype entity. This type of situation exists when we do not identify all subtype entities associated with a supertype entity, or ignore any subtype entity due to less importance of least usage in a specific scenario.
-
What is the importance of determining minimum cardinality in a relationship while designing database?
Topic: Data Model: Entities, Attributes & Relationships • 2 marks marks
It is very important to determine the minimum cardinality when designing a database because it defines the way a database system will be implemented.
-
How to implement one-to-many relationship while designing tables?
Topic: Data Model: Entities, Attributes & Relationships • 5 marks marks
A one-to-many relationship is implemented by placing the primary key of the relation on the ‘one’ side as a foreign key in the relation on the ‘many’ side. For example, depId, the primary key of DEPT, is placed as a foreign key in EMP, so that one department can have many employees.
-
What is the E-R model?
Topic: Data Model: Entities, Attributes & Relationships
This data model is based on real world that consists of basic objects called entities and of relationship among these objects. Entities are described in a database by a set of attributes.
-
What is an attribute?
Topic: Data Model: Entities, Attributes & Relationships
It is a particular property, which describes the entity.
-
What is the degree of a Relationship type?
Topic: Data Model: Entities, Attributes & Relationships
It is the number of entity type participating.
-
Make a relation between two tables with a foreign key, with an example.
Topic: Keys & Integrity Constraints • 3 marks marks
EMP (empId, empName, qual, depId) DEPT (depId, depName, numEmp) In this example there are two relations; EMP is having record of employees, whereas DEPT is having record of different departments of an organization. Now in EMP the primary key is empId, whereas in DEPT the primary key is depId. The depId which is primary key of DEPT is also present in EMP so this is a foreign key.
-
Briefly explain super key in relation with primary key.
Topic: Keys & Integrity Constraints • 5 marks marks
we can identify two different attributes that can individually identify the entity instances of STUDENT and they are regNo and nIdNumber, both are minimal super keys so both are candidate keys. Now in this situation we have got two candidate keys. The one that we choose will be declared as primary key, other will be the alternate key. Any of the candidate keys can be selected as primary key, it mainly depends on the database designer which choice he/she makes. There are certain things that are generally considered while making this decision, like the candidate key that is shorter, easier to remember, to type and is more meaningful is selected as primary key.
-
State the two conditions which are imposed on candidate key?
Topic: Keys & Integrity Constraints • 2 marks marks
There are two conditions for the candidate key It identifies the entity instances uniquely, as is required in case of super key. It should be minimum, that is, no proper subset of candidate key is a key.
-
Define the integrity rules.
Topic: Keys & Integrity Constraints
There are two Integrity rules. 1. Entity Integrity: States that ‘Primary key cannot have NULL value’ 2. Referential Integrity: States that ‘Foreign Key can be either a NULL value or should be Primary Key value of other relation.’
-
Define domain of an attribute.
Topic: Relational Model • 2 marks marks
The domain of an attribute is the set of all possible values that the attribute can take. For example, the domain of an attribute like age is the set of non-negative integer values within a reasonable range.
-
What is a Relation Schema and a Relation?
Topic: Relational Model
A relation Schema denoted by R(A1, A2, , An) is made up of the relation name R and the list of attributes Ai that it contains. A relation is defined as a set of tuples. Let r be the relation which contains set tuples (t1, t2, t3, ..., tn). Each tuple is an ordered list of n-values t=(v1,v2, ..., vn).
-
What is the degree of a Relation?
Topic: Relational Model
It is the number of attribute of its relation schema.
-
What is the intersection operation in relational algebra?
Topic: Relational Algebra • 3 marks marks
The intersection operation also has the requirement that both the relations should be union compatible, which means they are of same degree and same domains. It is represented by _. If R and S are two relations and we take intersection of these two relations then the resulting relation would be the set of tuples, which are in both R and S. Just like union intersection is also commutative. R∩ S=S ∩ R
-
Name the two types of unary operations on relational algebra.
Topic: Relational Algebra • 2 marks marks
Select and Project
-
Name the four basic operations (base operations) in relational algebra.
Topic: Relational Algebra • 5 marks marks
• SELECT • PROJECT • UNION • SET DIFFERENCE • CARTESIAN PRODUCT
-
What is Relational Algebra?
Topic: Relational Algebra
It is procedural query language. It consists of a set of operations that take one or two relations as input and produce a new relation.
-
When is a functional dependency F said to be minimal?
Topic: Normalization • 5 marks marks
Every dependency in F has a single attribute for its right hand side. We cannot replace any dependency X A in F with a dependency Y A where Y is a proper subset of X and still have a set of dependency that is equivalent to F. We cannot remove any dependency from F and still have set of dependency that is equivalent to F.
-
What do you know about Insertion anomaly?
Topic: Normalization • 2 marks marks
Insertion anomaly indicates that we cannot insert a fact about one entity until we have an additional fact about another entity.
-
“Student CGPA (StdCGPA) is identified through student name (StdName)”. Represent the above statement in the form of a functional dependency.
Topic: Normalization • 3 marks marks
STUDENT (stdName, stdCGPA). The functional dependency is: stdName → stdCGPA.
-
Name the three different kinds of anomalies which can be eliminated through normalization.
Topic: Normalization • 3 marks marks
The three kinds of anomalies are: (1) Insertion anomaly — a fact about one entity cannot be inserted until a fact about another entity is available; (2) Deletion anomaly — deleting a fact about one entity unintentionally deletes a fact about another entity; (3) Modification (update) anomaly — the same data stored at multiple places causes inconsistency when it is updated at one place only.
-
What is normalization?
Topic: Normalization
It is a process of analyzing the given relation schemas based on their Functional Dependencies (FDs) and primary key to achieve the properties 1. Minimizing redundancy 2. Minimizing insertion, deletion and update anomalies.
-
What is Functional Dependency?
Topic: Normalization
A Functional dependency is denoted by X → Y between two sets of attributes X and Y that are subsets of R specifies a constraint on the possible tuple that can form a relation state r of R. The constraint is for any two tuples t1 and t2 in r if t1[X] = t2[X] then they have t1[Y] = t2[Y]. This means the value of X component of a tuple uniquely determines the value of component Y.
-
What is Multivalued dependency?
Topic: Normalization
Multivalued dependency denoted by X ■ Y specified on relation schema R, where X and Y are both subsets of R, specifies the following constraint on any relation r of R: if two tuples t1 and t2 exist in r such that t1[X] = t2[X] then t3 and t4 should also exist in r with the following properties t3[x] = t4[X] = t1[X] = t2[X] t3[Y] = t1[Y] and t4[Y] = t2[Y] t3[Z] = t2[Z] and t4[Z] = t1[Z] Where [Z = (R-(X U Y)) ]
-
What is the Lossless join property?
Topic: Normalization
It guarantees that the spurious tuple generation does not occur with respect to relation schemas after decomposition.
-
What is 1NF (First Normal Form)?
Topic: Normalization
The domain of attribute must include only atomic (simple, indivisible) values.
-
What is Fully Functional Dependency?
Topic: Normalization
It is based on concept of full functional dependency. A functional dependency X→ Y is full functional dependency if removal of any attribute A from X means that the dependency does not hold any more.
-
What is 2NF?
Topic: Normalization
A relation schema R is in 2NF if it is in 1NF and every non-prime attribute A in R is fully functionally dependent on primary key.
-
What is 3NF?
Topic: Normalization
A relation schema R is in 3NF if it is in 2NF and for every FD X→ A either of the following is true 1. X is a Super-key of R. 2. A is a prime attribute of R. In other words, if every non prime attribute is non-transitively dependent on primary key.
-
What is BCNF (Boyce-Codd Normal Form)?
Topic: Normalization
A relation schema R is in BCNF if it is in 3NF and satisfies an additional constraint that for every FD X → A, X must be a candidate key.
-
What is 4NF?
Topic: Normalization
A relation schema R is said to be in 4NF if for every Multivalued dependency X ■ Y that holds over R, one of following is true 1. X is subset or equal to (or) XY = R. 2. X is a super key.