What Is Database Architecture
What Is Database Architecture
1. 1-tier architecture
2. 2-tier architecture
3. 3-tier architecture
4. n-tier architecture
1-tier architecture:
One-tier architecture involves putting all of the required components for a software
application or technology on a single server or platform.
1-tier architecture
Basically, a one-tier architecture keeps all of the elements of an application, including the
interface, Middleware and back-end data, in one place. Developers see these types of
systems as the simplest and most direct way.
2-tier architecture:
The two-tier is based on Client Server architecture. The two-tier architecture is like client
server application. The direct communication takes place between client and server.
There is no intermediate between client and server.
2-tier architecture
3-tier architecture:
A 3-tier architecture separates its tiers from each other based on the complexity of the
users and how they use the data present in the database. It is the most widely used
architecture to design a DBMS.
3-tier architecture
1st Normal Form Example
How do we bring an unnormalized table into first normal form? Consider the following
example:
This table is not in first normal form because the [Color] column can contain multiple
values. For example, the first row includes values “red” and “green.”
To bring this table to first normal form, we split the table into two tables and now we
have the resulting tables:
Now first normal form is satisfied, as the columns on each table all hold just one value.
All non-key attributes are fully functional dependent on the primary key
This table has a composite primary key [Customer ID, Store ID]. The non-key attribute is
[Purchase Location]. In this case, [Purchase Location] only depends on [Store ID], which
is only part of the primary key. Therefore, this table does not satisfy second normal form.
To bring this table to second normal form, we break the table into two tables, and now
we have the following:
What we have done is to remove the partial functional dependency that we initially had.
Now, in the table [TABLE_STORE], the column [Purchase Location] is fully dependent
on the primary key of that table, which is [Store ID].
A relation is in third normal form if it is in 2NF and no non key attribute is transitively
dependent on the primary key.
The attribute ID is the identification key. All attributes are single valued (1NF). The table
is also in 2NF.