Skip to main content

What are the types of database relationships and what are they? How to create a relational database? What is Mapping Constraint in entity Relationship? Describe the different types of entity sets.

Three types of relationships can be established in a database file, namely—

ii) One to One relation

ii) One to Many relation

(ii) Many to Many relation.

These are discussed below--


(i) One to One Relationship: When relationship is established between two database files and one record in one database will have only one record in the other database. That is, if a record in the STAR database is related to only one record in the PRO database, then it is called a One to One relationship.

(ii) One to Many relation: This is a widely used relation. In this method, a record in a database is related to multiple records in another database. That is, there may be multiple matches in the PRO database for a record in the STAR database. Think, different suppliers provide different products in an office. In this case there is a database for Supplier and another database is created for Product. Unlike one Supplier item number in the Supplier database, the Product database can have multiple items. In this case the report can be created by establishing One to Many relationship.


(iii) Many to Many Relationship: When two databases have multiple matching records on both sides, it is called Many to Many relationship. In this case there may be multiple matches in the PRO database against any record in the STAR database. Again a record in the PRO database may have multiple matching records in the STAR database.

Creating a relational database file with two database files



 To create a relationship between two databases, follow the steps below:


Let's say, a relationship will be created with the Students table and the Course table of the database called College. Then Course ID is the primary key in the Course table. A relation should be created with CourselD in the Students table with this field. because,
Relationships have to be established based on common fields. Unlike one CourselD in the Course table, the Students table can have multiple Course IDs. So in this case the relation will be One To Many.

(i) Create a database file called College and open its database window and select the Table tab.

(ii) Click on Relationship... from the Tools menu to get the Show Table dialog box. The database tables will be displayed in the dialog box.

(iii) Select two tables and click Add button to display them in the Relationships window.

(iv) The mouse pointer should be flagged from the Course ID of the Student table to the CourselD of the Course table and released. A Relationship dialog box will appear.

(v) Clicking the Create button from here will create the relation between the two tables indicated by a line as follows. This is how a one to many relationship is created.



Mapping Constraint On Entity Relationship:


Mapping constraints are mapping cardinalities used to describe relationship sets. There are three types of relationships for this--

(0) One to One

(i) One to Many

(iii) Many to Many.


Strong & Weak Entity Set


Strong Entity Set:

An entity set that contains a primary key is called a strong entity set. I think, Employee is a strong entity set, whose entity set, whose attributes are Employee Name, Position, Salary.

Weak Entity Set:


An entity set that does not have a primary key is called a weak entity set, a lower to 1, a lower to 2 a lower to 3........ a lower to n attributes associated with A is a weak entity set and B is a strong entity set, on which A depends. Suppose, the primary key of B is composed of attributes b lower to one, b lower to two, b lower to three, ........ b lower to n.

 Difference Between Strong and Weak Entities:

Strong Entity Set---

(i) Entities that have primary keys in the set are called strong entities.

(ii) Employee is a strong entity set, whose attributes are Employee Name, | Position, Salary.

weak entity set--

(i) An entity set that does not have a primary key is called a weak entity set.

(ii) a lower to 1 , a lower to 2, a lower to 3............a lower to n Attribute A is a Weak entity set.

Comments

Popular posts from this blog

Unlocking Online Success: Why Justoctane SEO Services are the Best Choice for Businesses in Boca Raton, Florida.

Best Justoctane SEO Services Boca Raton in Florida Are you looking for the best SEO services in Boca Raton, Florida? Look no further than Justoctane SEO services. As a leading provider of SEO services, Justoctane has helped numerous businesses in the Boca Raton area achieve top rankings on search engine results pages. In this blog post, we will explore why Justoctane is the best choice for SEO services in Boca Raton. Experience and Expertise Justoctane has a team of experienced and highly skilled SEO professionals who have a deep understanding of search engine algorithms and the latest SEO techniques. Their expertise allows them to create customized SEO strategies that are tailored to the specific needs of each client. The Justoctane team has worked with businesses in various industries and niches, providing them with a wealth of knowledge and experience to draw from when creating effective SEO strategies. Comprehensive Services Justoctane offers a wide range of SEO services, incl...

What is the purpose of operating system? Basic concepts of operating system?

Basic concepts of operating system The main purpose of the operating system is to-- • Creation of working environment: The operating system that creates a better working environment, the better and improved the operating system. • Coordinator: It coordinates between hardware and software. It acts as a coordinator between user tasks and all devices. • Automatic management: When a problem arises, it automatically understands what to do. If the appropriate solution is not provided, the operating system may automatically shut down the computer by itself. • Control of computer operations: The objective of the operating system is to control the speed of input/output operations by programs. • Memory management: helps the computer to work faster in stages by storing different files so that they can be found easily. this • Working based on priority: All the tasks that are directed to the computer are carried out based on priority. • Input/Output Management (I/O Management): It is the task o...

What is computer outsourcing and freelancing? What are the work areas of outsourcing and freelancing?

Outsourcing Computer Outsourcing: The word outsourcing information freelancing basically means free profession. That is, a profession to earn income by working freely. And a little more simply. In other words, different organizations do different types of work through the Internet system. By someone else outside your organization. Outsourcing is called outsourcing. Those who do outsourcing work are called freelancers. Jobs in multimedia, outsourcing sites or online marketplaces are divided into different categories, such as web development, software. Development, networking and information systems, writing and translation, administrative support, design and customer service, sales and marketing business services, etc. It is possible to earn online only if all these tasks are done through the internet system. There are also many other types of work available in the outsourcing world. . Freelancing Freelancing  means working independently without being under a specific person or orga...