Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

general

What is access in a relational database?

Sarvech Qadir

Access is a relational database management system. In a relational database, you divide your information into separate subject-based tables. You then use table relationships to bring the information together as needed.

Let’s create one!

Step 1

Open Microsoft Access and create a new Database. Let’s name this database School.

Step 2

Click on View and then click on Design View to add a table to your database. Let’s give the table the name Student. Now, let’s add the following fields to our table and then save it.

Student Table
Student Table

Step 3

Repeat step 2 to introduce two more tables, Teacher and Class.

Step 4

Click on Database Tools in the toolbar and then select the Relationships option.

widget

Step 5

Click on Add to select all the tables in order to define their relationships.

Step 6

Once you have added all the tables in the database, we need to define the relationships. We may have to add some fields to our tables to maintain the relationship.

Relational database
Relational database

Click on the ClassID field in the Class table, and while you’re clicking it, link it with the ClassID field in the student table. This creates one too many relationships between the Class table and the Student table. This is true because a class may have many students, but a student might only have one class.

Similarly, you can click on the TeacherID field in the Teacher table and link it with the TeacherID field in the student table while still clicking it. This creates one too many relationships between the Teacher table and the Class table. This is also true as a class may only have one teacher at a time, but a teacher may have multiple teaching classes.

RELATED TAGS

general

CONTRIBUTOR

Sarvech Qadir
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring