You are on page 1of 19

THE SUPERIOR COLLEGE LAHORE

Department: Computer Science & Information Technology


Subject: Database Systems
Assigdnmd ent 1
Instructor: Abdul Rehman

Note:
Your assignment should be hand written. In case of any difficulty, please visit me on Monday.
Zero marks for copied Assignments (both copied from and copied).
A viva will be conducted after the submission and marks will be given based on the viva .

NAME:- MUHAMMAD TALHA


ROLL#:- MCSE-F20-020

1. What do you understand by ‘Database’?


ANS: Database is an organized collection of structured information, or data, typically stored
electronically in a computer system. It is a system for storing and taking care of data (any
kind of information). We uses database management system to store, update, delete, etc. data.

2. Define DBMS?
ANS: - A database management system (DBMS) is a software package designed to define,
manipulate, retrieve and manage data in a database. A DBMS generally manipulates the data
itself, the data format, field names, record structure and file structure. It also defines rules to
validate and manipulate this data.
Database management systems are set up on specific data handling concepts, as the practice
of administrating a database evolves.
A database management system (DBMS) is system software for creating and managing
databases. A DBMS makes it possible for end users to create, protect, read, update and delete
data in a database. The most prevalent type of data management platform, the DBMS
essentially serves as an interface between databases and end users or application programs,
ensuring that data is consistently organized and remains easily accessible.
3. Enlist the advantages of DBMS?
o Sharing of Data
In a database, the users of the database can share the data among themselves. There are
various levels of authorization to access the data, and consequently the data can only be
shared based on the correct authorization protocols being followed.
Many remote users can also access the database simultaneously and share the data between
themselves.
o Data Integrity
Data integrity means that the data is accurate and consistent in the database. Data Integrity is
very important as there are multiple databases in a DBMS. All of these databases contain
data that is visible to multiple users. So it is necessary to ensure that the data is correct and
consistent in all the databases and for all the users.
o Data Security
Data Security is vital concept in a database. Only authorized users should be allowed to
access the database and their identity should be authenticated using a username and
password. Unauthorized users should not be allowed to access the database under any
circumstances as it violates the integrity constraints.
o Privacy
The privacy rule in a database means only the authorized users can access a database
according to its privacy constraints. There are levels of database access and a user can only
view the data he is allowed to. For example - In social networking sites, access constraints
are different for different accounts a user may want to access.
o Backup and Recovery
Database Management System automatically takes care of backup and recovery. The users
don't need to backup data periodically because this is taken care of by the DBMS. Moreover,
it also restores the database after a crash or system failure to its previous condition.
o Data Consistency
Data consistency is ensured in a database because there is no data redundancy. All data
appears consistently across the database and the data is same for all the users viewing the
database. Moreover, any changes made to the database are immediately reflected to all the
users and there is no data inconsistency

4. Reducing Data Redundancy


ANS: The best way to reduce redundancy is to pass the table through Normalization (1NF,
2NF, 3NF), which helps a lot. When there is many-to-many relationship between two tables,
it is highly recommended to define a third table for the many-to-many relation, combination
of both table’s primary keys will act as the primary key, it can also reduce redundancy.
For example
• Eliminate repeating groups in individual tables.
• Create a separate table for each set of related data.
• Identify each set of related data with a primary key.
5. Define RDBMS
ANS: -RDBMS Stands for "Relational Database Management System." An RDBMS is a
DBMS designed specifically for relational databases. Therefore, RDBMS are a subset of
DBMS. A relational database refers to a database that stores data in a structured format,
using rows and columns. This makes it easy to locate and access specific values within the
database. It is "relational" because the values within each table are related to each other.
Tables may also be related to other tables. The relational structure makes it possible to run
queries across multiple tables at once.

6. What do you understand by Data Redundancy?


ANS: -Data redundancy occurs when the same piece of data is stored in two or more separate
places. Suppose you create a database to store sales records, and in the records for each sale,
you enter the customer address. Yet, you have multiple sales to the same customer so the
same address is entered multiple times

7. What are the various types of relationships in Database? Define them?


ANS: relationship database is a database in which record of one table is related to only one
record of the other table. When creating table relationships you always work with two tables
at a time. One table is called the primary or parent table and the other is the related or child
table.
There are three types of relationships that can exist between two entities.
 One-to-One Relationship
 One-to-Many or Many-to-One Relationship
 Many-to-Many Relationship

 One to one relationship


One to one relationship exists when each record of one table is related to only one record of
the other table.
For example, If there are two entities ‘Person’ (Id, Name, Age, Address)and
‘Passport’(Passport_id, Passport_no). So, each person can have only one passport and each
passport belongs to only one person.
Such a relationship is not very common. However, such a relationship is used for security
purposes. In the above example, we can easily store the passport id in the ‘Person’ table only.
But, we make another table for the ‘Passport’ because Passport number may be sensitive data
and it should be hidden from certain users. So, by making a separate table we provide extra
security.
 One-to-Many or Many-to-One Relationship
Such a relationship exists when each record of one table can be related to one or more than
one record of the other table. This relationship is the most common relationship found. A
one-to-many relationship can also be said as a many-to-one relationship depending upon
the way we view it.
For example, If there are two entity type ‘Customer’ and ‘Account’ then each ‘Customer’
can have more than one ‘Account’ but each ‘Account’ is held by only one ‘Customer’. In
this example, we can say that each Customer is associated with much Account. So, it is a
one-to-many relationship. But, if we see it the other way i.e. many Account is associated
with one Customer then we can say that it is a many-to-one relationship.
 Many-to-Many Relationship
A many-to-many relationship occurs when multiple records in a table are associated with
multiple records in another table. For example, a many-to-many relationship exists between
customers and products: customers can purchase various products, and products can be
purchased by many customers.
The following example includes a Students table, which contains a record for each student,
and a Classes table, which contains a record for each class. A join table, Enrollments,
creates two one-to-many relationships—one between each of the two tables.
To set up a join table for a many-to-many relationship:
USING THE EXAMPLE ABOVE, create a table named Enrollments. This will be the
join table.
 In the Enrollments table, create A Student ID field and A Class ID field. Join tables
typically hold fields that might not make sense to have in any other table. You can
add fields to the Enrollments table, such as a Date field to keep track of when
someone started a class, and Cost field to track how much a student paid to take a
class.
 Create a relationship between the two Student ID fields in the tables. Then create a
relationship between the two Class ID fields in the tables.
 Using this design, if a student registers for three classes, that student will have one
record in the Students table and three records in the Enrollments table—one record
for each class the student enrolled in.

8. Explain Normalization and De- Normalization?


• Normalization
Normalization is the process of data organization in the form of tables. The normalization
process includes dividing data into tables and making relationships among them.
• De- Normalization
De-normalization is a database optimization technique where we add redundant data in the
database to get rid of the complex join operations. This is done to speed up database access
speed. De-normalization is done after normalization for improving the performance of the
database. The data from one table is included in another table to reduce the number of
joins in the query and hence helps in speeding up the performance.

9. What are the different types of Normalization?


ANS there are different types of normalization but some of most commonly used
normalization is given below:-
• First Normal Form (1NF)
• Second Normal Form (1NF)
• Third Normal Form (1NF)
First Normal Form (1NF)
In this Normal Form, we tackle the problem of atomicity. Here atomicity means values in the
table should not be further divided. In simple terms, a single cell cannot hold multiple values.
If a table contains a composite or multi-valued attribute, it violates the First Normal Form.

In the above
table, we can clearly see that the Phone Number column has two values. Thus it violated the
1st NF. Now if we apply the 1st NF to the above table we get the below table as the result.

By this, we
have achieved atomicity and also each and every column has unique values.

Second Normal Form (2NF)


The first condition in the 2nd NF is that the table has to be in 1st NF. The table also should
not contain partial dependency. Here partial dependency means the proper subset of
candidate key determines a non-prime attribute. To understand in a better way let’s look at
the below example.
Consider the table

This table has


a composite
primary key Emplyoee ID, Department ID. The non-key attribute is Office Location. In this
case, Office Location only depends on Department ID, which is only part of the primary key.
Therefore, this table does not satisfy the second Normal Form.
To bring this table to Second Normal Form, we need to break the table into two parts. Which
will give us the below tables:

As you can see we have removed the partial functional dependency that we initially had.
Now, in the table, the column Office Location is fully dependent on the primary key of that
table, which is Department ID.
Third Normal Form (3NF)
The same rule applies as before i.e., the table has to be in 2NF before proceeding to 3NF. The
other condition is there should be no transitive dependency for non-prime attributes. That
means non-prime attributes (which doesn’t form a candidate key) should not be dependent on
other non-prime attributes in a given table. So a transitive dependency is a functional
dependency in which X → Z (X determines Z) indirectly, by virtue of X → Y and Y → Z
(where it is not the case that Y → X)
Let’s understand this more clearly with the help of an example:

The same rule applies as before i.e., the table has to be in 2NF before proceeding to 3NF. The
other condition is there should be no transitive dependency for non-prime attributes. That
means non-prime attributes (which doesn’t form a candidate key) should not be dependent on
other non-prime attributes in a given table.
Let’s understand this more clearly with the help of an example:
As you can see from the above tables all the non-key attributes are now fully functional
dependent only on the primary key. In the first table, columns Student Name, Subject ID
and Address are only dependent on Student ID. In the second table, Subject is only
dependent on Subject ID.

10. What is BCNF?


ANS: - BOYCE AND CODD NORMAL FORM is a higher version of the Third Normal
form. This form deals with certain type of anomaly that is not handled by 3NF. A 3NF table
which does not have multiple overlapping candidate keys is said to be in BCNF. For a table
to be in BCNF, following conditions must be satisfied:

 R must be in 3rd Normal Form


 And, for each functional dependency (X → Y), X should be a super Key.

Consider the below table:

• One student can ENROL for multiple subjects.


• There can be multiple professors teaching one subject
• And, For each subject, a professor is assigned to the student
In this table, all the normal forms are satisfied except BCNF.
As you can see Student ID, and Subject form the primary key, which means the Subject
column is a prime attribute. But, there is one more dependency, Professor → Subject.
And while Subject is a prime attribute, Professor is a non-prime attribute, which is not
allowed by
BCNF.
Now in
order to
satisfy the
BCNF, we
will be
dividing
the table into two parts. One table will hold Student ID which already exists and newly
created column Professor ID.
And in the second table, we will have the columns Professor ID, Professor and Subject.

By doing this we are satisfied


the BOYCE CODD Normal Form.

11. What is SQL?


ANS: - SQL is commonly known as Structured Query Language. SQL lets you access and
manipulate databases. It is used to create or enter, execute, delete, insert, update and retrieve
queries, data and record from database.

12. How many SQL statements are used? Define them?


ANS: - SQL statements are categorized into four different types of statements, which are

1. DML (DATA MANIPULATION LANGUAGE)


2. DDL (DATA DEFINITION LANGUAGE)
3. DCL (DATA CONTROL LANGUAGE)
4. TCL (TRANSACTION CONTROL LANGUAGE)

DML
The SQL commands that deals with the manipulation of data present in the database belong
to DML or Data Manipulation Language and this includes most of the SQL statements.
INSERT
INSERT statement is used to insert a set of values into a database table. Insert statement it
used with Values.
Example- Insert into Student (Rank, “Student Name”, Mark) Values (1,’Kumar’, 450)

UPDATE
The UPDATE statement is used to update existing values in a table, which is based on some
condition.
Example
update student set “Student Name”=’MANOJ’ where “Student Name”=’KUMAR’
The query given above will update the “student Name” from MANOJ to Kumar
where student Name Kumar.
DELETE
Delete statement is used to delete the existing record in the table, which is based on some
condition.
Example
Delete from Student where “Student Name”=’MANOJ’
The query given above will delete records which have “Student Name” as MANOJ.
DDL
DDL or Data Definition Language actually consists of the SQL commands that can be used
to define the database schema. It simply deals with descriptions of the database schema and
is used to create and modify the structure of database objects in the database.
CREATE
CREATE statement is used to create a new table in an existing database. CREATE
statement is also used to create other database object such as a stored procedure,
function, etc.
Example
Create Table Student (Rank Int, “Student Name” varchar (50), Mark Float)

ALTER
Alter statement can add a column, modify a column, drop a column, rename a
column or rename a table.
Example
Alter Table Student Add (“Student Address” varchar (100))

DROP
SQL DROP TABLE statement is used to remove a table definition and all the data,
indexes, triggers, constraints and permission specifications for the table.
Example
Drop Student

TRUNCATE
TRUNCATE SQL query removes all rows from a table, without logging the
individual row deletions.
Example
Truncate Table Table_Name

DQL
DQL stand for Data Query Language statements are used for performing queries on the
data within schema objects. The purpose of the DQL Command is to get some schema
relation based on the query passed to it.
SELECT Statement
The SELECT statement is used to select records from the table, with or without a condition.
Example
 Select * from student- Gets all records of student table.
 Select * from student where rank>5- Gets records with the condition where students' rank
is greater than 5
DCL
DCL includes commands such as GRANT and REVOKE which mainly deal with the
rights, permissions and other controls of the database system.
GRANT
Grant is allowed to do the specified user to the specified tasks.
Syntax
GRANT privilege_name
ON object_name
TO {user_name |PUBLIC |role_name}
[WITH GRANT OPTION];

REVOKE
It is used to cancel previously granted or denied permissions.
Syntax
REVOKE privilege_name
ON object_name
FROM {user_name |PUBLIC |role_name}

TCL
In Transaction Control Language (TCL), the commands are used to manage the
transactions in the database. These are used to manage the changes made by DML
statements. It also allows the statements to be grouped together into logical
transactions.
COMMIT
Commit command is used to permanently save any transaction into the database.
Syntax
Commit;

ROLLBACK
Rollback command is used to restore the database for the last committed state. It’s
also used with a save point to jump to the save point.
Syntax
Rollback to savepoint name
SAVEPOINT
SAVEPOINT command is used to temporarily save a transaction so that you can roll
back to that point whenever necessary.
Syntax
Save point (save point-name ;)
These are the different types of statements in the SQL language. I hope, this will be
helpful for the readers. Thanks for reading.

13. Enlist some commands of DDL, DML, and DCL?


DML
In Data Manipulation Language (DML), we have four different SQL statements, Insert,
Update, and Delete.
INSERT
INSERT statement is used to insert a set of values into a database table. Insert statement it
used with Values.
Example- Insert into Student (Rank, “Student Name”, Mark) Values (1,’Kumar’, 450)
UPDATE
The UPDATE statement is used to update existing values in a table, which is based on some
condition.
Example
update student set “Student Name”=’MANOJ’ where “Student Name”=’KUMAR’
The query given above will update the “student Name” from MANOJ to Kumar
where student Name Kumar.
DELETE
Delete statement is used to delete the existing record in the table, which is based on some
condition.
Example
Delete from Student where “Student Name”=’MANOJ’
The query given above will delete records which have “Student Name” as MANOJ.

DDL
In Data Definition Language (DDL), we have three different SQL statements.
CREATE
CREATE statement is used to create a new table in an existing database. CREATE
statement is also used to create other database object such as a stored procedure,
function, etc.
Example
Create Table Student (Rank Int, “Student Name” varchar (50), Mark Float)
ALTER
Alter statement can add a column, modify a column, drop a column, rename a
column or rename a table.
Example
Alter Table Student Add (“Student Address” varchar (100))

DROP
SQL DROP TABLE statement is used to remove a table definition and all the data,
indexes, triggers, constraints and permission specifications for the table.
Example
Drop Student

TRUNCATE
TRUNCATE SQL query removes all rows from a table, without logging the
individual row deletions.
Example
Truncate Table Table_Name

DCL
In Data Control Language (DCL), it defines the control over the data in the
database. We have two different commands, which are
GRANT
Grant is allowed to do the specified user to the specified tasks.
Syntax
GRANT privilege_name
ON object_name
TO {user_name |PUBLIC |role_name}
[WITH GRANT OPTION];

REVOKE
It is used to cancel previously granted or denied permissions.
Syntax
REVOKE privilege_name
ON object_name
FROM {user_name |PUBLIC |role_name}

14. Define DML Compiler?


ANS: - It translates DML statements in a query language into low-level instruction that the
query evaluation engine can understand.
15. What is DDL interpreter?
ANS: - It interprets DDL statements and records them in tables containing metadata

16. Enlist the advantages of SQL?


1) Faster Query Processing
Using the SQL queries, the user can quickly and efficiently retrieve a large amount of
records from a database.
2) No Coding Skills
In the standard SQL, it is very easy to manage the database system. It doesn't require
a substantial amount of code to manage the database system
3) Standardized Language
Long established are used by the SQL databases that are being used by ISO and
ANSI.
4) Portable
SQL can be used in laptop, PCs, server and even some mobile phones
5) Interactive Language
Easy to learn and understand, answers to complex queries can be received in
seconds.

17. Explain the terms ‘Record’, ‘Field’ and ‘Table’ in terms of database?
Record
A record is a database entry that may contain one or more values. Groups of records are
stored in a table, which defines what types of data each record may contain. Databases may
contain multiple tables which may each contain multiple records. In terms of a database,
records are rows of a table.
For example
All of your Clients, Images, Invoices, etc., are considered records (identified by an ID).

Field
A field is a single unit of data that is unique within each entry/row, or Fields are the
individual parts that contain information about the record, but the overall data category is
common to all entries. A database record is, basically, a row that contains unique data in each
of the fields. A database will usually contain a large number of records but only a small
number of fields. In terms of a database, fields are columns.
For example
For example, if you only want to list your Japanese Clients, you would use the Query Wizard
to select only the Client records which contain the word Japan in the "Country" field.
Some examples of fields are:
 {Images.Id}: The Image ID number
 {Clients.City}: The city where the Client is from
 {Invoices.Date}: The date of the Invoice
 {Payables.Amount}: Commission amounts
Table
In database, a table is a data
structure where data can be
organized in fields (columns) &
records (rows).
For example
Information of the employees of an organization needs to be stored. Employee information
can be broken into several smaller entities like employee name, id, date of joining, current
location, designation etc. these are called fields or columns.
Data is stored in records. A record represents set of related data. Complete set of values for
all column/field is called record or row.
18. What do you understand by Data Independence? What are its two types?
ANS: -Data Independence helps administrators separate information from the applications
and programs that use it. As such, programmers don’t need to modify their source codes
every time changes to the data characteristics are made. This property helps save time and
other resources, and most importantly, minimizes errors.
Physical Data Independence
Physical Data Independence refers to the characteristic of changing the physical level
without affecting the logical level or conceptual level. Using this property we can easily
change the storage device of the database without affecting the logical schema.
Example:
Suppose you want to replace the storage device form hard disk to SSD or magnetic tape
then it should not affect the data stored at the logical level or using a new data structure for
storage.

Logical Data Independence


It refers to the characteristics of changing the logical level without affecting the external or
view level. This also helps in separating the logical level from the view level. If we do any
changes in the logical level then the user view of the data remains unaffected. The changes
in the logical level are required whenever there is a change in the logical structure of the
database.
The changes in the logical level may include:
1) Changing the data definition
2) Adding, deleting, or updating any new attribute, entity or relationship in the
database.

19. Define the relationship between ‘View’ and ‘Data Independence’?


VIEW
Views in SQL are kind of virtual tables. A view also has rows and columns as they are in a
real table in the database. We can create a view by selecting fields from one or more tables
present in the database. A View can either have all the rows of a table or specific rows based
on certain condition.
Data Independence
Data Independence is defined as a property of DBMS that helps you to change the Database
schema at one level of a database system without requiring to change the schema at the next
higher level. Data independence helps you to keep data separated from all programs that
make use of it.
You can use this stored data for computing and presentation. In many systems, data
independence is an essential function for components of the system.

20. What are the advantages and disadvantages of views in the database?
ADVANTAGES DISADVANTAGES
Security Performance Degradation
Each user can be given permission to access Because views only create the appearance of a
the database only through a small set of views table, not a real table, the query processor must
that contain the specific data the user is translate queries against the view into queries
authorized to see, thus restricting the user's against the underlying source tables
access to stored data
Structural simplicity
Views can give a user a "personalized" view
of the database structure, presenting the
database as a set of virtual tables that make
sense for that use
Data Integrity
If data is accessed and entered through a view,
the DBMS can automatically check the data to
ensure that it meets the specified integrity
constraints
Query Simplicity
A view can draw data from several different
tables and present it as a single table, turning
multi-table queries into single-table queries
against the view.

21. What do you understand by Functional dependency?


ANS: - Functional dependency is a relationship that exists when one attribute uniquely
determines another attribute.
If R is a relation with attributes X and Y, a functional dependency between the attributes is
represented as X->Y, which specifies Y is functionally dependent on X. Here X is a
determinant set and Y is a dependent attribute. Each value of X is associated with precisely
one Y value.

22. When is functional dependency said to be the fully functional dependency?


ANS: - The term full functional dependency (FFD) is used to indicate the minimum set of
attributes in of a functional dependency (FD). In other words, the set of attributes X will be
full functionally dependent on the set of attributes Y if the following conditions are satisfied:
 X is functionally dependent on Y and
 X is not functionally dependent on any subset of Y

23. What do you understand by the E-R model?


ANS An ER diagram shows the relationship among entity sets. An entity set is a group of
similar entities and these entities can have attributes. In terms of DBMS, an entity is a table
or attribute of a table in database, so by showing relationship among tables and their
attributes, ER diagram shows the complete logical structure of a database. Lets have a look at
a simple ER diagram to understand this concept.
A simple ER-Diagram
In the following diagram we have two entities Student and College and their relationship.
The relationship between Student and College is many to one as a college can have many
students however a student cannot study in multiple colleges at the same time. Student entity
has attributes such as Stu_Id, Stu_Name & Stu_Addr and College entity has attributes such
as Col_ID & Col_Name.
Here are the

geometric shapes and their meaning in an E-R Diagram. We will discuss these terms in detail
in the next section(Components of a ER Diagram) of this guide so don’t worry too much
about these terms now, just go through them once.

24. Define Entity, Entity type, and Entity set?


ANS: - An entity can be a real word object either animated or inanimate that can be easily
identifiable.
Example: If we have a table of a Student (Roll_no, Student_name, Age, Mobile_no) then
each student in that table is an entity and can be uniquely identified by their Roll Number
i.e Roll_no.

Entity set:
An entity set is a group of similar kind of entities. It may contain entities with attributes
sharing similar values. Entities are represents by their properties which also called attributes.
Type of entity: -
Weak entity
A weak entity is a type of entity which doesn’t have its key attribute. It can be identified
uniquely by considering by consisting primary key of another entity. It represented by double
rectangular box. Weak relation represent by double diamond box.
FOR EXAMPLE
Suppose if we have two tables of Customer (Customer_id, Name, Mobile_no, Age, and
Gender) and Address (Locality, Town, State, Customer_id). Here we cannot identify the
address
uniquely as
there can be
many
customers
from the same
locality. So,
for this, we need
an attribute of
Strong Entity
Type i.e. ‘Customer’ here to uniquely identify entities of 'Address' Entity Type.

Strong entity
Strong entity is those entity types which has a key attribute. The primary key helps in
identifying each entity uniquely. It is represented by a rectangle. In the above example,
Roll_no identifies each element of the table uniquely and hence, we can say that
STUDENT is a strong entity type.
25. Define a Weak Entity set?
Weak entity
A weak entity is a type of entity which doesn’t have its key attribute. It can be identified
uniquely by considering by consisting primary key of another entity. It represented by double
rectangular box. Weak relation represent by double diamond box.
FOR EXAMPLE
Suppose if we have two tables of Customer (Customer_id, Name, Mobile_no, Age, and
Gender) and Address (Locality, Town, State, Customer_id). Here we cannot identify the
address uniquely as there can be many customers from the same locality. So, for this, we
need an attribute of Strong Entity Type i.e. ‘Customer’ here to uniquely identify entities of
'Address' Entity Type.

26. Explain the


terms
‘Attribute’
and
‘Relations’?
Attributes
Attributes define the characteristics or the properties of an entity on the basis of which it is
easily distinguishable among other entities of the real-world. Each attribute has a certain
domain and it may be involved in forming a key
For example
Name, roll_no, id_address, these fields of student table present the attribute of student entity.
Relations
A relational database is a type of database that stores and provides access to data points that
are related to one another. In a relational database, each row in the table is a record with a
unique ID called the key. The columns of the table hold attributes of the data, and each
record usually has a value for each attribute, making it easy to establish the relationships
among data points.
For example
Here’s a simple example of two tables a small business might use to process orders for its
products. The first table is a customer info table, so each record includes a customer’s name,
address, shipping and billing information, phone number, and other contact information.
Each bit of information (each attribute) is in its own column, and the database assigns a
unique ID (a key) to each row. In the second table—a customer order table—each record
includes the ID of the customer that placed the order, the product ordered, the quantity, the
selected size and color, and so on—but not the customer’s name or contact information.

These two tables have only one thing in common: the ID column (the key). But because of
that common column, the relational database can create a relationship between the two
tables. Then, when the company’s order processing application submits an order to the
database, the database can go to the customer order table, pull the correct information about
the product order, and use the customer ID from that table to look up the customer’s billing
and shipping information in the customer info table. The warehouse can then pull the correct
product, the customer can receive timely delivery of the order, and the company can get paid

You might also like