0% found this document useful (0 votes)
36 views18 pages

Dbs Final Note

Uploaded by

mewitoc864
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)
36 views18 pages

Dbs Final Note

Uploaded by

mewitoc864
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/ 18

1

What is database?
In computing, a database is an organized collection of data stored and accessed
electronically. Small databases can be stored on a file system, while large databases are
hosted on computer clusters or cloud storage.
2

Components of a Database

The five major components of a database are:

1. Hardware

Hardware refers to the physical, electronic devices such as computers and hard disks that
offer the interface between computers and real-world systems.

3. Software

Software is a set of programs used to manage and control the database and includes the
database software, operating system, network software used to share the data with other
users, and the applications used to access the data.

3. Data

Data are raw facts and information that need to be organized and processed to make it
more meaningful. Database dictionaries are used to centralize, document, control, and
coordinate the use of data within an organization. A database is a repository of
information about a database (also called metadata).
3

4. Procedures

Procedures refer to the instructions used in a database management system and


encompass everything from instructions to setup and install, login and logout, manage
the day-to-day operations, take backups of data, and generate reports.

5. Database Access Language

Database Access Language is a language used to write commands to access, update, and
delete data stored in a database. Users can write commands using Database Access
Language before submitting them to the database for execution. Through utilizing the
language, users can create new databases, tables, insert data, and delete data.

What is a Database Management System (DBMS)?

A Database Management System (DBMS) is a well-known term in data analysis. It refers to


a collection of programs that enable users to access databases and manipulate, maintain,
report, and relate data.

----------------------------Application of DBMS

1. Railway and Airline Reservation System

The database keeps a record of ticket booking, arrival time, departure time, delays, and
even seat numbers of airplanes or trains.

2. Library Management System

There can be tens of thousands of books in a library, so it becomes very important to


keep a record of the details of each book. Handwritten records can prove to be a real
hassle when managing literally thousands of books. DBMS comes into play here, all the
details of each book - name, author, number of pages, availability, quantity, etc., can be
managed using a Database Management System.

3. Banking

An uncountable number of bank transactions and deposits are made, thousands of new
bank accounts are created daily, and many such things. This is all possible because of a
Database Management System that makes keeping track of the record much easier.

4. Education Sector (Schools and Colleges)

The details of each student, teacher, and even janitor are stored in a database to manage
the information easily.

5. Social Media Sites (Instagram, Facebook, etc.)


4

Social media websites like Instagram, Facebook, Whatsapp, etc., are able to keep track of
each and every detail of their users (name, phone number, photos, email address,
password, etc.) with the help of Database Management Systems.

6. Online Shopping (E-commerce Platforms like Amazon)

With time, more and more people have started shopping online, no one wants to go to a
shop and waste their time when they can do the same thing while at home and save time.
With the increase in online shopping customers, there's a need to store their details
efficiently.
That is why, all the details of the customers, products as well as order and tracking
details are stored and managed using a Database Management System.

7. Human Resource Management

Big companies have many employees, and their details and whereabouts are managed
by the Human Resource Management Department using DBMS.

8. Manufacturing

The products manufactured by companies have their details (quantity, amount, discount,
weight, etc.) stored using a Database Management System.

9. Telecommunication Sector

A Database Management System is a must for every telecommunication company to


store the details of their customers, calls, bills, different plans, different services, etc.

10. Ride-sharing Concept

Ride-sharing, also known as carpooling uses DBMS to store the details of their
customers, drivers, and cars. The reviews of different drivers and the maps used by GPS
are also stored in databases using DBMS.

11. Healthcare System

A real-time Database Management System is used to store and manage the details of the
patients, doctors, appointments, etc.

12. Scientific Database

Research areas like AI, cancer treatment, molecular biology, and DNA sequencing are
some good examples of scientific research. All the research done to date has to be
stored in such a way that the database is secured and accessible to every researcher,
this is only possible because of a Database Management System.
5

------------------------------Levels of Data
1. Real World Data : The real world level of data means that level of data at which entities or
objects exist in reality, it means that any object existing in reality have a name and other
identifiable attributes through which we can identify that specific object or entity. Example:
Any Student
2. Meta Data: For storage of the data related to any entity or object existing at real world level
we define the way the data will be stored in the database. This is called Meta data. Meta data
is also known as schema for the real world data. It tells that what type of data will be stored
in the database, what will be size of a certain attribute of the real world data, how many and
what attributes will be used to store the data about the entity in the database. Example:
Name Character Type 25 character size field
Age Date type 8 bytes size
Class Alpha Numeric 8 byte size

Example 2: Let's consider a common example that you'll find in any relational database:
I have a table called AUTHOR. It contains data. I type "SELECT * FROM AUTHOR;" and the system lists
the contents of the AUTHOR records. This is data, just ordinary data -- Names, like "Joe" or "Sam", for
example.
Now I type "DESCRIBE AUTHOR;" and it displays this:
sql> DESCRIBE AUTHOR; or desc author;
+---------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| A_ID | int(11) | | PRI | 0 | |
| A_FNAME | varchar(20) | YES | | NULL | |
| A_LNAME | varchar(20) | YES | MUL | NULL | |
| A_MNAME | varchar(20) | YES | | NULL | |
| A_DOB | date | YES | | NULL | |
| A_BIO | blob | YES | | NULL | |
+---------+-------------+------+-----+---------+-------+ 6 rows in set
(0.00 sec)
This is metadata: It is data that describes other data. This data describes the format of other data, so
that it can be processed. Within the AUTHOR table is a column called A_FNAME. It may contain
5
values, like "Joe" or "Sam". That's data. In the relational database's "system tables" is more data, like
the string "A_FNAME".
3. Existence of Data: Existence of the data level shows the actual data regarding the entities as real
world level according to the rules define at the Meta Data level. Example: According to the definition
given in the Meta data level the Actual data or Data occurrence for the entity at real world level is
shown below:
Name Age Class
Rakib 20/8/1990 M.Sc
Amir 22/3/1991 B.Sc
6

--------------------------Disadvantages of File Processing System


1. Redundancy
Data is stored more than once in different files, that means duplicate data may occur in all these files.
Since all the files are independent on each other so it is very difficult to overcome this error and if
anyone finds this error then it will take time and effort to solve this issue.
For Example: A student is having record in college library and in Examination department. Then his
name, roll number, fathers name and class will be same in both the departments. Also these
departments are not dependent on each other. So it create lots of duplicates value about that student
and when he needs any change for his name or class then he has to go to both the departments to
make these changes happen otherwise it will create problem for him.
2. Inconsistency
In file processing system, various copies of same data may contain different values. Data is not
consistent in this system, it means if a data item needs to be changed then all the files containing that
data need to be modified. It may create a risk of out dated values of data.
For Example: If you change student name in library then his name should be changed in all the
departments related to the student.
3. Data Mapping and Difficulty in Accessing Data
Difficulty in accessing data means that it is not easy to access data in a desired or efficient way. It
makes supervision of department very difficult. If a user wants information in a specific manner then
he requires creating a program for it. Although all the related information are grouped and stored in
different files, there is no mapping between any two files. i.e.; any two dependent files are not linked.
For example: Even though Student files and Student Report files are related, they are two different
files and they are not linked by any means. Hence if we need to display student details along with his
report, we cannot directly pick from those two files. We have to write a lengthy program to search
Student file first, get all details, then go Student_Report file and search for his report.
When there is very huge amount of data, it is always a time consuming task to search for particular
information from the file system. It is always an inefficient method to search for the data.
4. Data Isolation
Data is isolated in File Processing System and data is stored in different files. These files can be in
different formats. If you want to extract data from two files then you are required to write a program.
But before writing the program, the programmer should find out which part of the file is
needed and how they are related to each other, what is the format of each file, how to search
data in each file etc..
If there is 2-3 files involved, programming would be bit simple. Imagine if there is lot many files
involved in it? It would be require lot of effort from the programmer. Since all the data are isolated
from each other in different files, programming becomes difficult.
5. Integrity
The data values stored in the database must satisfy certain types of consistency constraints. A
programmer always puts these constraints in the programs by adding some codes.
In File Processing System, poor data integrity often arises and it becomes very
difficult to add new constraints at that time.
For Example: The maximum marks of the student can never be more than 100 or the balance of
certain types of bank accounts may never fall below a prescribed amount, say $25.
6. Atomicity
Atomicity means all actions of a transaction either happen or none. A computer system, like any other
device, is subject to failure. In many applications, it is crucial that, if a failure occurs, the data be
restored to the consistent state that existed prior to the failure.
7

For Example: Consider a program to transfer $500 from the account balance of department A to the
account balance of department B. If a system failure occurs during the execution of the program, it is
possible that the $500 was removed from the balance of department A but was not credited to the
balance of department B, resulting in an inconsistent database state. Clearly, it is essential to
database consistency that either both the credit and debit occur, or that neither occur. That is, the
funds transfer must be atomic—it must happen in its entirety or not at all. It is difficult to ensure
atomicity in a conventional file-processing system.
7. Concurrent-Access Anomalies
For the sake of overall performance of the system and faster response, many systems allow multiple
users to update the data simultaneously. Indeed, today, the largest Internet retailers may have
millions of accesses per day to their data by shoppers. In such an environment, interaction of
concurrent updates is possible and may result in inconsistent data. For example: Consider department
A, with an account balance of $10,000. If two department clerks debit the account balance (by say
$500 and $100, respectively) of department A at almost exactly the same time, the result of the
concurrent executions may leave the budget in an incorrect (or inconsistent) state. Suppose that the
programs executing on behalf of each withdrawal read the old balance, reduce that value by the
amount being withdrawn, and write the result back. If the two programs run concurrently, they may
both read the value $10,000, and write back $9500 and $9900, respectively. Depending on which one
writes the value last, the account balance of department A may contain either $9500 or $9900, rather
than the correct value of $9400.
8. Security Problems

Not every user of the database system should be able to access all the data. For example, in a
university, payroll personnel need to see only that part of the database that has financial information.

View of Data in DBMS

-------------------------- Database Abstraction


Database systems are made-up of complex data structures. To ease the user interaction with
database, the developers hide internal irrelevant details from users. This process of hiding irrelevant
details from user is called data abstraction.
Three levels of abstractions:
Physical level: This is the lowest level of data abstraction. It describes how data is actually stored in
database. You can get the complex data structure details at this level.
Logical level: This is the middle level of 3-level data abstraction. It describes what data is stored in
database and the relationships among data.
View level: Highest level of data abstraction. This level describes the user interaction with database
system.
For example: Let’s say we are storing customer information in a customer table.
At physical level these records can be described as blocks of storage (bytes, gigabytes, terabytes etc.)
in memory. These details are often hidden from the programmers.
8

At the logical level these records can be described as fields and attributes along with their data types,
their relationship among each other can be logically implemented. The programmers generally work
at this level because they are aware of such things about database systems.
At view level, user just interact with system with the help of GUI and enter the details at the screen,
they are not aware of how the data is stored and what data is stored; such details are hidden from
them.
2. Schema and Instance
Definition of schema: The overall design of a database is called the schema. Schema is of three types:
Physical schema, logical schema and view schema.
a) Physical schema: The design of a database at physical level is called physical schema, how
the data stored in blocks of storage is described at this level.
b) Logical schema: Design of database at logical level is called logical schema, programmers
and database administrators work at this level, at this level data can be described as
Certain types of data records gets stored in data structures, however the internal details
such as implementation of data structure is hidden at this level (available at physical
level).
c) View schema: Design of database at view level is called view schema. This generally
describes end user interaction with database systems.
Definition of instance: The data stored in database at a particular moment of time is called instance of
database. Database schema defines the variable declarations in tables that belong to a particular
database; the value of these variables at a moment of time is called the instance of that database.

-----------------------------Data Independence in DBMS

The ability to modify a schema definition in one level without affecting a schema definition in the next
level is called data independence.
There are two levels of data independence:
1. Physical Data Independence.
2. Logical Data Independence.
Physical Data Independence:
It is the ability to modify the physical schema without causing application programs to be rewritten.
Suppose there was a change in memory size of the database servers. This will not affect the logical
structure of any of the objects in the database. They are completely independent of the physical
structure. This is called physical data independence.
Logical Data Independence:
It is the ability to modify the logical schema without causing application program to be rewritten.
Logical data independence is more difficult than is the physical data independence.

Any changes to the database objects like changes to table structure, size or addition/removal of
columns from the table will not affect user views. They will see the data like before. This is called
logical data independence

There are two types of object based data Models – a) Entity Relationship Model and b) Object
oriented data model.
9

----- Entity Relationship Model


The entity-relationship model is based on a perception of the world as consisting of a collection of
basic objects (entities) and relationships among these objects as its name itself suggests.
1. An entity is a distinguishable object that exists.
2. Each entity has associated with it a set of attributes describing it.
E.g.number and balance for an account entity.
3. A relationship is an association among several entities. e.g.
A cust_acctrelationship associates a customer with each account he or she has.
4. The set of all entities or relationships of the same type is called the entity
set or relationship set.
5. Another essential element of the E-R diagram is the mapping cardinalities, which
express the number of entities to which another entity can be associated via a

relationship set.

c. Relational Model

In relational model, the data and relationships are represented by collection of inter-related tables.
Each table is a group of column and rows, where column represents attribute of an entity and rows
represents records.

Multivalued Attributes: An attribute that can hold multiple values is known as multivalued attribute.
We represent it with double ellipses in an E-R Diagram. E.g. A person can have more than one phone
numbers so the phone number attribute is multivalued.

Derived Attribute: A derived attribute is one whose value is dynamic and derived from another
attribute. It is represented by dashed ellipses in an E-R Diagram. E.g. Person age is a derived attribute
as it changes over time and can be derived from another attribute (Date of birth).

----------------------------------------------------------------------------------------------------

-----------------------Types of keys in DBMS


Primary Key – A primary is a column or set of columns in a table that uniquely identifies tuples (rows)
in that table.
Super Key – A super key is a set of one of more columns (attributes) to uniquely identify rows in a
table.
Candidate Key – A super key with no redundant attribute is known as candidate key
Alternate Key – Out of all candidate keys, only one gets selected as primary key, remaining keys are
known as alternate or secondary keys.
Composite Key – A key that consists of more than one attribute to uniquely identify rows (also known
as records & tuples) in a table is called composite key.
10

Foreign Key – Foreign keys are the columns of a table that points to the primary key of another table.
They act as a cross-reference between tables.

-----------------------------Difference between Primary Key & Unique Key


Primary Key Unique Key
Primary Key can't accept null values. Unique key can accept only one null value.
By default, Primary key is clustered index and data in
the database table is physically organized in the By default, Unique key is a unique non-clustered index.
sequence of clustered index.
We can have only one Primary key in a table. We can have more than one unique key in a table.
Primary key can be made foreign key into another In SQL Server, Unique key can be made foreign
table. key into another table.

-------------------------Database Users
The database users also can be categorized again into five groups according to how they interact with
the database. They are:
• Native Users
• Application Programmers
• Sophisticated Users
• Specialized Users

• Stand-alone Users

1. Native Users
These are the database users who are communicating with the database through an already written
program.
For example, when a student is registering on a website for an online examination. He creates data in
the database by entering and submitting his name, address and exam details.
2. Application Programmers

These are the software developers and programming professionals who write the program codes.
They use tools like Rapid Application Development (RAD) tools for creating user interfaces with
minimal efforts.

3. Sophisticated Users
Sophisticated users are those who are creating the database. These type of users do not write
program code. And they do not use any software to request the database.
The sophisticated users directly interact with the database system using query languages like SQL.
4. Specialized Users
The sophisticated users who write special database application programs are called specialized users.
The write complex programs for the specific complex requirements.
5. Stand-alone Users

Those who are using database of personal usage. There are many database packages for this type
database users.
11

--------------Database Administrators
The person who has the central control over a database system is called Database Administrator
(DBA).
The database administrator has the following functions in a database system.
-Schema Definition: The database administrator creates the original database schema by executing a
set of data definition statements in DDL.
-Storage structures an access method definition.
-Schema and physical or organization modification: The database administrator performs the changes
to the schema according to the needs of organizations or physical needs to improve the database
performance.
-Provide the granting of authorization to access data: The database administrator can decide the
which parts of the database can be accessed by a user, by using the different types of authorization
methods.
-Database maintenance: The database maintenance includes the following processes.
• Regular backing up of the database.
• Ensuring the disk space for performing the required operations.
• Monitoring the jobs running on the database.

I hope this article might be helped you for learning the Database Users and Administrators in DBMS.

---------------------------------------Structured Query Language (SQL)

SQL is a standard language for accessing and manipulating databases.


What is SQL?
• SQL stands for Structured Query Language
• SQL lets you access and manipulate databases

• SQL is an ANSI (American National Standards Institute) standard

SQL Commands
The standard SQL commands to interact with relational databases are CREATE, SELECT,
INSERT, UPDATE, DELETE and DROP. These commands can be classified into the following
groups based on their nature:
DDL - Data Definition Language
Command Description
CREATE Creates a new table, a view of a table, or other object in the database.
ALTER Modifies an existing database object, such as a table.
Deletes an entire table, a view of a table or other objects
DROP
in the database.
DML - Data Manipulation Language
Command Description
SELECT Retrieves certain records from one or more tables.
INSERT Creates a record.
UPDATE Modifies records.
12

DELETE Deletes records.


SQL Constraints
Constraints are the rules enforced on data columns on a table. These are used to limit the type of
data that can go into a table. This ensures the accuracy and reliability of the data in the database.
Constraints can either be column level or table level. Column level constraints are applied only to
one column whereas, table level constraints are applied to the entire table.
Following are some of the most commonly used constraints available in SQL:
NOT NULL Constraint: Ensures that a column cannot have a NULL value. DEFAULT Constraint:
Provides a default value for a column when none is specified. UNIQUE Constraint: Ensures that all
the values in a column are different. PRIMARY Key: Uniquely identifies each row/record in a
database table. FOREIGN Key: Uniquely identifies a row/record in any another database table.
CHECK Constraint: The CHECK constraint ensures that all values in a column satisfy certain
conditions.
INDEX: Used to create and retrieve data from the database very quickly.

Data Integrity
The following categories of data integrity exist with each RDBMS:
Entity Integrity: There are no duplicate rows in a table.
Domain Integrity: Enforces valid entries for a given column by restricting the type, the format, or
the range of values.

Referential integrity: Rows cannot be deleted, which are used by other records.

User-Defined Integrity: Enforces some specific business rules that do not fall into entity, domain or
referential integrity

char Varchar

It is an abbreviation for characters. It is an abbreviation for variable characters.

Char datatype is used to store character Varchar datatype is used to store character
strings of fixed length. strings of variable length.

It uses static memory location. It uses dynamic memory location.

Char takes 1 byte space for each character. Varchar take 1 byte for each character along
with some extra bytes to store length
13

information.

We can use char datatype when we know the We can use it when we are not sure of the
length of the string. length of the string.

Char datatype can be used when we expect Varchar datatype can be used when we expect
the data values in a column to be of same the data values in a column to be of variable
length. length.

NCHAR vs NVARCHAR

Similar to CHAR data type, the NCHAR data type:

• Is a fixed length data type


• Used to store Unicode characters (for example the languages Arabic, German
and so on)
• Occupies 2 bytes of space for each character
About the NVARCHAR data type:
• It is a variable-length data type
• Used to store Unicode characters
• Occupies 2 bytes of space for each character

Date and time data types

The Transact-SQL date and time data types are listed in the following table:

Data type Format Range Accuracy Storage User-defined Time


size fractional zone
(bytes) second offset
precision

time hh:mm:ss[.nnnnnnn] 00:00:00.0000000 100 3 to 5 Yes No


through nanoseconds
23:59:59.9999999

date YYYY-MM-DD 0001-01-01 through 1 day 3 No No


9999-12-31

smalldatetime YYYY-MM-DD hh:mm:ss 1900-01-01 through 1 minute 4 No No


14

Data type Format Range Accuracy Storage User-defined Time


size fractional zone
(bytes) second offset
precision

2079-06-06

datetime YYYY-MM-DD 1753-01-01 through 0.00333 8 No No


hh:mm:ss[.nnn] 9999-12-31 second

datetime2 YYYY-MM-DD 0001-01-01 100 6 to 8 Yes No


hh:mm:ss[.nnnnnnn] 00:00:00.0000000 nanoseconds
through 9999-12-31
23:59:59.9999999

datetimeoffset YYYY-MM-DD 0001-01-01 100 8 to 10 Yes Yes


hh:mm:ss[.nnnnnnn] 00:00:00.0000000 nanoseconds
[+|-]hh:mm through 9999-12-31
23:59:59.9999999 (in
UTC)

----------------------------------------------------------------------
Advantages of DBMS

• Controls database redundancy: All the data is stored in one place, and that
recorded in the database and hence controls the redundancy in the
database.
• Data sharing: DBMS allows users with authority to share the data in the
database with multiple users.
• Easy Maintenance: The centralized nature of the database helps in the easy
maintenance of the data.
• Reduce time: It reduces the maintenance need and development time.
• Backup: It automatically backs up data to maintain its integrity in case of
failure.
• Multiple user interfaces: It offers a number of user interface to multiple
users.
Disadvantages of DBMS

• Cost of software and hardware: It requires a number of high powered


processors and large size memory to run DBMS.
• Size: a Large amount of storage size is required to run DBMS efficiently.
• Complexity: DBMS adds an additional layer of complexity to the data.
• Higher impact of failure: DBMS faces a higher risk of losing the data since
all the data is stored at a single location and a catastrophic failure can
wipe it all
15

Object based data models:


----------------- In object based data models, the focus is on how data is represented. The
data is divided into multiple entities each of which has some defining characteristics.
Moreover, these data entities are connected with each other through some relationships.
So, in object based data models the entities are based on real world models, and how
the data is in real life. There is not as much concern over what the data is as compared
to how it is visualised and connected.
Some examples of object based data models are
• Entity Relationship Data Model
• Object Oriented Data Model
• Semantic Data Model
• Functional Data Model
Out of these models, Entity Relationship Data Model and Object Oriented Data Model are
the most popular. Therefore details about these two models are as follows –
16

---------------------------------What is Relational Model?


Relational Model (RM) represents the database as a collection of relations. A relation is
nothing but a table of values. Every row in the table represents a collection of related
data values. These rows in the table denote a real-world entity or relationship.
The table name and column names are helpful to interpret the meaning of values in each
row. The data are represented as a set of relations. In the relational model, data are
stored as tables. However, the physical storage of the data is independent of the way the
data are logically organized

Some popular Relational Database management systems are:

• DB2 and Informix Dynamic Server – IBM


• Oracle and RDB – Oracle
• SQL Server and Access – Microsoft

Relational Model Concepts in DBMS

1. Attribute: Each column in a Table. Attributes are the properties which define a
relation. e.g., Student_Rollno, NAME,etc.
2. Tables – In the Relational model the, relations are saved in the table format. It is
stored along with its entities. A table has two properties rows and columns. Rows
represent records and columns represent attributes.
3. Tuple – It is nothing but a single row of a table, which contains a single record.
4. Relation Schema: A relation schema represents the name of the relation with its
attributes.
5. Degree: The total number of attributes which in the relation is called the degree of
the relation.
17

6. Cardinality: Total number of rows present in the Table.


7. Column: The column represents the set of values for a specific attribute.
8. Relation instance – Relation instance is a finite set of tuples in the RDBMS
system. Relation instances never have duplicate tuples.
9. Relation key – Every row has one, two or multiple attributes, which is called
relation key.
10. Attribute domain – Every attribute has some pre-defined value and scope which is
known as attribute domain

SQL Create Constraints

Constraints can be specified when the table is created with the CREATE
TABLE statement, or after the table is created with the ALTER
TABLE statement.

Syntax
CREATE TABLE table_name (
column1 datatype constraint,
column2 datatype constraint,
column3 datatype constraint,
....
);

The following constraints are commonly used in SQL:

• NOT NULL - Ensures that a column cannot have a NULL value


• UNIQUE - Ensures that all values in a column are different
• PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Uniquely
identifies each row in a table
• FOREIGN KEY - Prevents actions that would destroy links between
tables
• CHECK - Ensures that the values in a column satisfies a specific
condition
• DEFAULT - Sets a default value for a column if no value is specified

Data integrity means the data has been collected and stored accurately, as well as
being contextually accurate to the model at hand. To maintain integrity, data must
be collected and stored in an ethical, law-abiding way and must have a complete
structure where all defining characteristics are correct and can be validated.

PHYSICAL INTEGRITY

Physical integrity is the overall protection of the wholeness of a data set as it is


stored and retrieved. Anything that impedes the ability to retrieve this data, such
18

as power disruption, malicious disruption, storage erosion and a slew of


additional issues may cause a lack of physical integrity.

Many companies outsource their data storage to cloud providers, such as AWS, to
manage the physical integrity of the data. This is particularly useful for small
companies that benefit from offloading data storage to spend more time focusing
on their business.

Databases use four variations of logical integrity:

• Entity integrity
• Referential integrity
• Domain integrity
• User-defined integrity

Entity integrity involves the creation of primary keys to identify data as distinct
entities and ensure that no data is listed more than once or is null. This allows data
to be linked to and enables its usage in a variety of ways.

Referential integrity is the series of processes that is used to store and access data
uniformly, which allows rules to be embedded into a database’s structure
regarding the use of foreign keys. This allows for a consistent and meaningful
combination of data sets across the database. Critically, referential integrity allows
the ability to combine various tables within a relational database, facilitating
uniform insertion and deletion practices.

Domain integrity refers to the collection of processes that ensure accuracy in each
piece of data included in a domain, or a set of acceptable values that a column may
contain.

User-defined integrity provides rules and constraints that are created by the user
in order to use data for their specific purpose.

• CREATE INDEX - Used to create and retrieve data from the database
very quickly

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy