Found 338 Articles for DBMS

Explain BCNF with an example in DBMS

Bhanu Priya
Updated on 31-Oct-2023 21:09:34

50K+ Views

BCNF (Boyce Codd Normal Form) is the advanced version of 3NF. A table is in BCNF if every functional dependency X->Y, X is the super key of the table. For BCNF, the table should be in 3NF, and for every FD. LHS is super key.ExampleConsider a relation R with attributes (student, subject, teacher).StudentTeacherSubjectJhansiP.NareshDatabasejhansiK.DasCsubbuP.NareshDatabasesubbuR.PrasadCF: { (student, Teacher) -> subject (student, subject) -> Teacher Teacher -> subject}Candidate keys are (student, teacher) and (student, subject).The above relation is in 3NF [since there is no transitive dependency]. A relation R is in BCNF if for every non-trivial FD X->Y, X must be a key.The ... Read More

Check which FD violates 3NF in a given relation and decompose R into 3NF(DBMS)

Bhanu Priya
Updated on 06-Jul-2021 12:23:40

4K+ Views

A relation is in 3NF when it is in 2NF and there is no transitive dependency or a relation is in 3NF when it is in 2NF and all non-key attributes directly depend on candidate key.Third normal form (3NF) is the third step in normalizing a database and it builds on the first and second normal forms, 1NF and 2NF.3NF states that all column references in referenced data that are not dependent on the primary key should be removed. Another way of putting this is that only foreign key columns should be used to reference another table, and no other ... Read More

What is functional dependency and transitive dependency (DBMS)?

Bhanu Priya
Updated on 06-Jul-2021 12:21:09

12K+ Views

Let us begin by understanding what a functional dependency is in the database management system (DBMS).Functional DependencyFunctional dependency refers to the relation of one attribute of the database to another. With the help of functional dependency, the quality of the data in the database can be maintained.The symbol for representing functional dependency is -> (arrow).Example of Functional DependencyConsider the following table.Employee NumberNameCitySalary1bobBangalore250002LuckyDelhi40000The details of the name of the employee, salary and city are obtained by the value of the number of Employee (or id of an employee). So, it can be said that the city, salary and the name attributes ... Read More

What is instance and schema (DBMS)?

Bhanu Priya
Updated on 06-Jul-2021 14:38:55

20K+ Views

The overall design of the database is called database schema. Schema will not be changed frequently. It is the logical structure of a database. It does not show the data in the database.The schema is pictorially represented as follows −Types of SchemaThe different types of schemas are as follows −Physical schema − It is a database design at the physical level.It is hidden below the logical schema and can be changed easily without affecting the application programs.Logical schema − It is a database design at the logical level. Programmers construct applications using logical schema.External − It is schema at view ... Read More

Construct an ER diagram for a company in DBMS?

Bhanu Priya
Updated on 04-Jul-2021 06:33:02

10K+ Views

ProblemDraw of ER model for company considering the following constraints −In a company, an employee works on many projects which are controlled by one department.One employee supervises many employees.An employee has one or more dependents.One employee manages one department.SolutionFollow the steps given below to draw an ER model for the company −Step 1 − Identify the entity setsThe entity set has multiple instances in a given business scenario.As per the given constraints the entity sets are as follows:EmployeeDepartmentProjectDependentStep 2 − Identify the attributes for the given entitiesEmployee − The relevant attributes are name, ssn, sex, address, salary.Department − The relevant ... Read More

Construct an ER diagram for the Library management system(DBMS)?

Bhanu Priya
Updated on 04-Jul-2021 06:32:17

9K+ Views

ProblemDraw an ER model for library management application considering the following constraints −In a library multiple students can enroll.Students can become a member by paying an appropriate fee.The books in the library are identified by a unique ID.Students can borrow multiple books from subscribed libraries.SolutionFollow the steps given below to draw an ER model for the library management application −Step 1 − Identify the entity setsThe entity set has multiple instances in a given business scenario.As per the given constraints the entity sets are as follows −BookPublisherMemberSectionGranterStep 2 − Identify the attributes for the given entitiesBook − The relevant attributes ... Read More

Construct an ER diagram for the Banking system in DBMS?

Bhanu Priya
Updated on 04-Jul-2021 06:31:15

18K+ Views

ProblemDraw an ER model of the Banking database application considering the following constraints −A bank has many entities.Each customer has multiple accounts.Multiple customers belong to a single branch.Single customer can borrow multiple loans.A branch has multiple employees.SolutionFollow the steps given below to draw an ER model of the Banking database application −Step 1 − Identify the entity setsThe entity set has multiple instances in a given business scenario.As per the given constraints the entity sets are as follows −CustomerAccountAccountLoanLoanStep 2 − Identify the attributes for the given entitiesCustomer − the relevant attributes are customerName, CustomerID, address.Account − The relevant attributes ... Read More

Draw an ER diagram for a University database application(DBMS)?

Bhanu Priya
Updated on 01-Nov-2023 00:50:11

53K+ Views

ProblemDrawing of ER model of university database application considering the constraints −A university has many departments.Each department has multiple instructors (one person is HOD). Here the HOD refers to the head of department.An instructor belongs to only one department.Each department offers multiple courses, each subject is taught by a single instructor.A student may enroll for many courses offered by different departments.SolutionFollow the steps given below to draw an Entity Relationship (ER) diagram for a University database application −Step 1 − Identifying the entity sets.The entity set has multiple instances in a given business scenario.As per the given constraints the entity ... Read More

Explain Mapping the ER diagrams with binary and ternary relationships(DBMS)?

Bhanu Priya
Updated on 04-Jul-2021 06:29:29

3K+ Views

It is the relationship between the instances of two different entity types. Two entities will participate in the relationship.ExamplePerson and events are two different entity types which are related by using the relationship called “attends”.Mapping ER diagram with binary relationshipMapping one to many relationshipExampleHere, Create two tables for two entities.Primary key of one side relation is a foreign key for many side relations.One side relation is customer and many side relations is Order.The primary key cutomerID of the customer is a foreign key of order.The equivalent relations for the above ER diagram are as follows −One-one, many-one, many-many can be ... Read More

What is a composite attribute in DBMS?

Bhanu Priya
Updated on 04-Jul-2021 06:27:43

7K+ Views

The attributes that cannot be divided into sub-parts are called simple attributes. The attributes which can be divided into sub-parts are called composite attributes.ExampleBalance, account number are simple attributesName, address is called composite attributesLet’s consider an example of how to convert Entity Relationship (ER) model of composite attribute to Relational model.Methods for mappingName of relation = Entity set of ER diagramName of column = Attribute of ER diagramExampleIn this example, Name of the relation =studentName of columns=StdID, name, BranchThe equivalent relation for the above ER diagram is −StudentStdIDNameBranchNow apply this technique for Mapping ER diagram with a composite attribute as ... Read More

Advertisements