Operate Database Application LO1
Operate Database Application LO1
Mostly data represents recordable facts. Data aids in producing information, which is based on
facts. For example, if we have data about marks obtained by all students, we can then conclude
about toppers and average marks.
Usability:
Any information which we are storing in any organization should be meaningful for that
organization. If we are storing those factors which are actually not fit with organization’s
requirement then this is just waste of resources.
Extensibility:
As we know that everyday new business requirements come up and every day there is a need to
change or enhance information system to capture new requirements.
1|Page
Prep By: Sewunet G.
So information design should be extensible so that it can adopt new requirements without much
efforts or without major breaking changes.
Data Integrity:
Now at this point we understand that information is very much important for any organization.
Based on the historic information, every organization makes different strategies, decisions for
growth. One small mistake in data can lead to major issues with any organization’s key decision
and hence a big risk for growth.
Entity Integrity:
Involves the structure (primary key and its attributes) of the entity. If the primary key is unique
and all attributes are scalar and fully dependent on the primary key, then the integrity of the
entity is good. In the physical schema, the table’s primary key enforces entity integrity.
Domain Integrity:
It defines that data should be of correct type and we should handle optional data in correct way.
We should apply Null ability to those attributes which are optional for organization. We can
define proper data types for different attributes based on organization’s requirement so that
correct format data should present in system.
Referential Integrity:
This defines if any entity is dependent on another one then parent entity should be there in the
system and should be uniquely identifiable. We can do this by implementing foreign keys.
There are few business rules which we cannot validate just by primary keys, foreign keys etc.
There has to be some mechanism so that we can validate complex rules for integrity. We can
implement these rules in following ways:
Performance:
Availability:
The availability of information refers to the information’s accessibility when required regarding
uptime, locations, and the availability of the data for future analysis. Disaster recovery,
redundancy, archiving, and network delivery all affect availability.
Security:
For any organizational asset, the level of security must be secured depending on its value and
sensitivity. Sometime organizations has suffered a lot because of data leaks which results in loss
of faith and tends to business risk. So security is one of the most important aspect of good
database design
Introduction to Database
3|Page
Prep By: Sewunet G.
The design process
Determine the purpose of your database. This helps prepare you for the remaining steps.
Find and organize the information required. Gather all of the types of information you
might want to record in the database, such as product name and order number.
Divide the information into tables. Divide your information items into major entities or
subjects, such as Products or Orders. Each subject then becomes a table.
Turn information items into columns. Decide what information you want to store in each
table. Each item becomes a field, and is displayed as a column in the table. For example,
an Employees table might include fields such as Last Name and Hire Date.
Specify primary keys. Choose each table’s primary key. The primary key is a column
that is used to uniquely identify each row. An example might be Product ID or Order ID.
Set up the table relationships. Look at each table and decide how the data in one table is
related to the data in other tables. Add fields to tables or create new tables to clarify the
relationships, as necessary.
Refine your design. Analyze your design for errors. Create the tables and add a few
records of sample data. See if you can get the results you want from your tables. Make
adjustments to the design, as needed
Apply the normalization rules. Apply the data normalization rules to see if your tables
are structured correctly. Make adjustments to the tables, as needed.
3. DATABASE OBJECTS
A database object in a relational database is a data structure used to either store or reference
data. The most common object that people interact with is the table. Other objects are indexes,
stored procedures, sequences, views and many more.
When a database object is created, a new object type cannot be created because all the various
object types created are restricted by the very nature, or source code, of the relational database
model being used, such as Oracle, SQL Server or Access. What is being created is instances of
the objects, such as a new table, an index on that table or a view on the same table
4|Page
Prep By: Sewunet G.
The different type of Database objects
Tables - A table is a collection of data about a specific topic, such as products or suppliers
Metadata – is a “data about data” or synonymously called table structure that defines what type
of data your data is?
Queries –Queries used to view, change, and analyze data in different ways. You can also use
them as a source of records for forms, reports.
Forms - A form is a type of a database object that is primarily used to enter or display data in a
database. You can also use a form as a switchboard that opens other forms and reports in the
database, or as a custom dialog box that accepts user input and carries out an action based on
the input.
Reports - A report is an effective way to present your data in a printed format. Because you have
control over the size and appearance of everything on a report.
Before we proceed to creating your first table, we need to know first the basic components of a
table:
5|Page
Prep By: Sewunet G.
Fieldname
Record - Row - Information
Text: allows for the storage of any kind of data, characters, digits and special
characters.
Memo: is used for texts of more than 255 characters such as comments or explanations.
Number: for numerical data used in mathematical calculations.
Date/Time: for the introduction of date and time from the year 100 to 9999.
Currency: For monetary/economic values and numerical data used in mathematical
calculations in which the data involved contains between one and four decimals.
Auto number: a unique sequential number (increasing one by one), or a number that
Access assigns every time it adds a new record to a table.
Yes/No: Yes and No values, and fields that contain one of two values (Yes/No, True/False
or Activated/Deactivated).
OLE Object: an object such as a Microsoft Excel spreadsheet, a Microsoft Word
document, graphics, images, sounds, or other binaries.
Used to embed or link to documents from other programs like Excel and
Word.
Hyperlink: text or a combination of text and numbers stored as text and used as a
hyperlink address.
Attachment: Used to store files in an Access database.
The attachment data type lets you store one or more files per record.
Lookup wizard…: A lookup wizard field lets the user choose from a predefined set of
options, like a "male" or "female" selection or a "country" selection.
Entering unique names of the columns of the table in the “field name” column of the
design view. N
Names of fields and objects in Microsoft Access can be up to 64characters long.
6|Page
Prep By: Sewunet G.
They can include any combination of letters, numbers, spaces, and special characters
except a period (.), an exclamation point (!), an accent grave (`), and brackets ([ ]). They
also can't begin with leading spaces.
Normalization
1. Eliminating redundant data (for example, storing the same data in more than one
table) and
2. Ensuring data dependencies make sense (only storing related data in a table).
Both of these are valuable goals as they reduce the amount of space a database consumes and
ensure that data is logically stored.
Table Relationship
Newcomers to the world of databases often have a hard time seeing the differences
between a database and a spreadsheet.
They see tables of data and recognize that databases allow you to organize and query
data in new ways, but fail to grasp the significance of the relationship that gives
relational database technology & its name.
Relationships allow you to describe the connections between different database tables in
powerful ways.
Once you’ve described the relationships between your tables, you can later leverage that
information to perform powerful cross-table queries, known as joins.
A relationship is a logical connection between two tables.
Keys are fields that are part of a table relationship.
7|Page
Prep By: Sewunet G.
Primary key
Foreign key
8|Page
Prep By: Sewunet G.
Types of Database Relationships
One-to-one relationships: occur when each entry in the first table has one, and only one,
counterpart in the second table.
One-to-many relationships: Is the most common type of database relationship. .
Many-to-many relationships: occur when each record in the first table corresponds to
one or more records in the second table and each record in the second table corresponds
to one or more records in the first table.
For example, the elements writer, novel, and consumer may be described using ER diagrams
this way:
9|Page
Prep By: Sewunet G.