0% found this document useful (0 votes)
40 views7 pages

Lesson 2

This document provides an overview of database design and modeling. It discusses: - The importance of data modeling and how logical and physical models are developed independently of hardware considerations but then mapped to physical storage. - Key aspects of the database design process including requirements analysis, logical and physical modeling, implementation, testing, and techniques like normalization and entity-relationship modeling. - Common database elements like tables, columns, keys, schemas, and relationships that are used to structure and link data across multiple tables. - The database development life cycle which typically involves planning, requirements analysis, design, implementation, testing and maintenance though small databases may use a simpler process.

Uploaded by

kurtluisllanes2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views7 pages

Lesson 2

This document provides an overview of database design and modeling. It discusses: - The importance of data modeling and how logical and physical models are developed independently of hardware considerations but then mapped to physical storage. - Key aspects of the database design process including requirements analysis, logical and physical modeling, implementation, testing, and techniques like normalization and entity-relationship modeling. - Common database elements like tables, columns, keys, schemas, and relationships that are used to structure and link data across multiple tables. - The database development life cycle which typically involves planning, requirements analysis, design, implementation, testing and maintenance though small databases may use a simpler process.

Uploaded by

kurtluisllanes2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

LESSON 2: Database Design and Modeling

In this lesson you will learn about:


• About data modeling and why data models are important
• About the basic data-modeling building blocks
• What business rules are and how they influence database design
• How the major data models evolved
• About emerging alternative data models and the needs they fulfill
• How data models can be classified by their level of abstraction

Database Design

Database Design is a collection of processes that facilitate the designing, development, implementation
and maintenance of enterprise data management systems. Properly designed database are easy to
maintain, improves data consistency and are cost effective in terms of disk storage space. The database
designer decides how the data elements correlate and what data must be stored.

The main objectives of database design in DBMS are to produce logical and physical designs models of the
proposed database system.

The logical model concentrates on the data requirements and the data to be stored independent of physical
considerations. It does not concern itself with how the data will be stored or where it will be stored
physically.

The physical data design model involves translating the logical DB design of the database onto physical
media using hardware resources and software systems such as database management systems (DBMS).

Why Database Design is Important?

It helps produce database systems:

▪ That meet the requirements of the users


▪ Have high performance.

Database design process in DBMS is crucial for high performance database system. Note that the genius
of a database is in its design. Data operations uses SQL.
Database development life cycle

The database development life cycle has a number of stages that are followed when developing database
systems.

The steps in the development life cycle do not necessarily have to be followed religiously in a sequential
manner.

On small database systems, the process of database design is usually very simple and does not involve a
lot of steps.

In order to fully appreciate the above diagram, let’s look at the individual components listed in each step for
overview of design process in DBMS.

Requirements analysis

▪ Planning – This stages of database design concepts are concerned with planning of entire
Database Development Life Cycle. It takes into consideration the Information Systems strategy of
the organization.
▪ System definition – This stage defines the scope and boundaries of the proposed database
system.

Database designing
▪ Logical model – This stage is concerned with developing a database model based on
requirements. The entire design is on paper without any physical implementations or specific
DBMS considerations.
▪ Physical model – This stage implements the logical model of the database taking into account the
DBMS and physical implementation factors.

Implementation
▪ Data conversion and loading – this stage of relational databases design is concerned with
importing and converting data from the old system into the new database.
▪ Testing – this stage is concerned with the identification of errors in the newly implemented system.
It checks the database against requirement specifications.

Two Types of Database Techniques

▪ Normalization - is a database design technique that reduces data redundancy and eliminates
undesirable characteristics like Insertion, Update and Deletion Anomalies. Normalization rules
divides larger tables into smaller tables and links them using relationships. The purpose of
Normalization in SQL is to eliminate redundant (repetitive) data and ensure data is stored logically.
▪ ER Modeling - Entity Relationship Model (ER Modeling) is a graphical approach to database
design. It is a high-level data model that defines data elements and their relationship for a specified
software system. An ER model is used to represent real-world objects.

Data Models

Elements of Database

Database elements are the group of objects or entities that makes up a database. They include tables,
indexes, data elements, database schemas, fields, columns, records, rows, keys, relationships, and data
types.

1. Table

The table is the simplest and primary unit of organization and storage of data in a database. You
need this database element to modify and check for stored data.

When there is more than one table containing a database, they are always connected by what we
call a relationship.

The relationship between the related tables makes it easy to link them together and figure out what
they have in common. A table is a composition of related data items, usually with a unique identity.
A table is usually in rows (horizontal) and columns (vertical), all arranged physically in a grid model.
Every row and column intersect at a point called a cell. Each cell contains data of unique identity as
every data can only be accessed by their names.

The database table consists of four major types.

▪ Subset Tables comprise subsets of data obtained from a database table.


▪ Data Tables are the primary storage of data in a database.
▪ Join Tables help summon a link or relationship between tables, majorly two that might
seem related.
▪ Validation Tables, also known as code tables, help to validate data entries from other
tables. Tables make data easily accessible to users. However, some sets of delimits and
constraints control the type of data allowed on the table.

2. Column/Fields

A column, commonly called a field, is a particular type of data on a table. It is believed that a
column only exists in a table, while an attribute exists in an entity.

On the contrary, attributes can be columns, and entities can form a table against the previous
immediate claim when a business model transforms into a database model.

A column is the smallest storage element in any database and depicts related records of a table. A
unique data type is given to every column. The data entered into the table will be dependent on the
table's data types.

3. Schema

A database schema represents groups of related objects in a database. Some objects might be
related to one another in a schema.

This database element gives access to just a single owner who has exclusive access to modify,
reclassify and manipulate the makeup of objects found within a schema. It is always linked to a
particular or unique user account in a database for specific purposes.

There are three models related to a schema.

▪ The Conceptual Model. The conceptual model is otherwise known as the logical model. It
is referred to as the fundamental model in a database. A conceptual model is
characterized by organizational and physical structures usually used to understand
database structures like views, indexes, and constraints.

▪ The Internal Model. The internal model is also known as the physical model. Just as its
name implies, it majors on the physical storage in a database. Additionally, the internal
model regulates access to data in a database. Finally, it helps distinguish between the
hardware's physical specifications and the OS (Operating System) initiated by the
database model.
▪ The External Model. The external model is commonly known as the application interface.
With the application interface, users might be able to access schema in many ways, like
the data input. It makes establishing a relationship between the database model and user
application feasible.

4. Row

A row is the collection of vertical records in a database. The population of rows in a table is not
constant. A collection of data in a row is also known as a tuple.

5. Data types

Data types control the type of data you can enter in a column. The following are the available data
types:

▪ Numeric data types can only be used to store numeric values, that is, numbers.
▪ Alphanumeric data types consist of alphabetical characters, numerical values, and a
combination of both. However, the alphanumeric data type only considers stored numeric
data values as alphabetical characters, not numbers.
▪ Date and Time data types enable the storage of data and time. This data type varies with
the Relational Database Management System (RDBMS) employed.
▪ Other types

6. Keys

A key is an entity of a database that is used to identify or point out desired data in a table. This
database element is usually most associated with just a single column and could be more than one
column at times.

Hence, there are two main types of keys:

▪ Primary Keys. Primary Keys combine single or multiple-column values obtained from a
table. Moreover, a primary key will not allow duplicate entries even if the table does not
have the fundamental identity of table values like SSN, school, and examination
registration numbers that are unique. These table values are never the same and can be
set as a primary key in a database.

▪ Foreign Keys. Foreign keys always have primary keys or keys as references in a different
table. Primary keys are considered the mother table, while the foreign key is the child
table. It helps to create a relationship between two tables.

7. Relationship

There are various tables in a database that are related. A relational database is a modern
database that creates links between tables using primary and foreign keys.
Entering data in a table and creating links between tables helps to reduce data redundancy in the
relational database. There are three types of relationships in a table under the database elements.

▪ One-to-One Relationship relates one record with another in a different table.


▪ One-to-Many Relationship links one table record to more than one record from another
table.
▪ Many-to-Many Relationships are more comprehensive than the first two. Here, many
records are linked to records from a different table; consequently, you can connect more
records in the second table to many more in the top table.

Data Gathering Techniques

Before you can actually begin designing a database, you must understand what data the database needs
to store and how that data will be used. It is tempting to think you understand the gist of what is going on
and start sketching out tables and columns, but it is always better to wait. Gather information.

Make sure that you understand exactly what the customer needs to store in the database and why.
Gathering information is a complex task. Most projects have many facets that need to be accounted for. It
can be quite daunting, but there are some basic steps to help you proceed.

▪ Initial interviews with the chief stakeholders (the managers or executives initiating the database
project)
▪ Review of business documents to identify data elements
▪ Interviews with stakeholders
▪ Questionnaires
▪ Work shadowing (observing the flow of information)

Database Requirement

A database requirement is something the database needs to have or do in order to meet the business
needs of the organization for which it is being built.

There are different kinds of database requirements:


• Data requirements. This refers to the attributes the database must contain in order to store all the
information an organization needs for its activities. To record a point-of-sale transaction, for
example, the database would need to have attributes for the sale number, the date, the customer,
the items and quantities purchased, and the prices of those items among others.
• Report requirements. Most databases need to generate several different kinds of reports,
summary information often gathered from several different entities. The entities must contain the
data needed to make these reports, as mentioned earlier, but also be related in a way that makes it
possible to bring the various pieces of data together.
• Access and Security Requirements. Often some, or all, of the data in a database are
confidential. Databases typically contain core business information that could be of great value of
to a competitor, or it may contain things such as credit card numbers or social security numbers
that could pose financial and legal risks if revealed to the wrong people. An essential requirement
of most databases is to develop a security schema that determines who has access to what data.
Anyone without the proper authentication credentials should be excluded.
Business Rules

Business rules describe the rules that govern the way data are acquired, stored, and used by the business.
They are important for a database developer, who must make sure the database he or she develops can
support all the business rules and operations. Some of the business rules can be enforced directly in the
database.

Example:
▪ A SHIP DATE cannot be prior to an ORDER DATE for any given order.
▪ A customer with a "Preferred" status receives a 15% discount on all purchases.

Data Model Building Blocks

The basic building blocks of all data models are entities, attributes, relationships, and constraints.

An entity is a person, place, thing, or event about which data will be collected and stored. An entity
represents a particular type of object in the real world, which means an entity is “distinguishable”—that is,
each entity occurrence is unique and distinct.

An attribute is a characteristic of an entity.

A relationship describes an association among entities.

A constraints rules or conditions applied to database data ensuring data integrity, consistency and
adherence to business rules.

- END OF LESSON 2 -

You might also like