0% found this document useful (0 votes)
2 views

introduction to database

BUSINES IT

Uploaded by

akram.karor5050
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

introduction to database

BUSINES IT

Uploaded by

akram.karor5050
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Introduction to Database

The collection of raw facts and figures about an


entity is called data it is collected for a particular
purpose data is unprocessed and unorganized it
is not who’s the father making decisions for
example:
Marium 65 85 64
Fozia 43 85 85
Faizan 69 65 85
Alia 68 87 96
Commented [ST2R1]:

1. Numeric Data: Consists of numbers and numerical values, used


for mathematical operations and analysis. Examples: ages, salaries,
temperatures.

2. Alphabetic Data (also called Text Data): Consists of letters and


text, used for description and communication. Examples: names,
addresses, descriptions.

3. Alphanumeric Data: A combination of numeric and alphabetic


data. Examples: phone numbers, credit card numbers, passwords.

4. Video Data: Consists of moving images and sound, used for


entertainment, education, and communication. Examples: movies,
videos, tutorials.
5. Audio Data: Consists of sound and music, used for entertainment,
education, and communication. Examples: songs, podcasts, voice
recordings.
6. Graphic Data (also called Image Data): Consists of static images,
used for visual representation and communication. Examples:
photos, diagrams, charts.
(B)
Information
The processed data is called information information is
always meaningful inform we can make discussions on its
basis
What is difference between data and information
Data :

1. Data is collected for storage purposes.


2. Data has no inherent meaning or value.
3. Data is raw and unorganized, requiring processing.
4. Data has little value on its own.
5. Data requires interpretation and analysis.
6. Data lacks context and relevance.
7. Data may be inaccurate or incomplete.
8. Data may be outdated or obsolete.
9. Data has limited usefulness on its own.
10. Data is simply a collection of facts and figures.
11. Data requires processing to become useful.
12. Data is the basic building block of information.
13. Data is often represented by numbers, symbols.
Information :

1. Information is processed and analyzed data.


2. Information has meaning and value, providing insights and
knowledge.
3. Information is organized and structured for easy understanding.
4. Information has significant value, supporting decision-making and
action.
5. Information is the result of data analysis and interpretation.
6. Information provides context and relevance to data.
7. Information is accurate, reliable, and complete.
8. Information is up-to-date and timely.
9. Information is useful for decision-making and problem-solving.
10. Information is the result of data processing and analysis.
11. Information provides answers and insights, not just facts.
12. Information is the foundation of knowledge and wisdom.
13. Information is what transforms data into something
useful and valuable.
©
Data processing
The process which is used to change data into
information is called data processing. Far to change
data into information different steps are applied on
it.
Data Processing Information
Data can be processed directly and also by
computer nowadays computer are you for data
processing data and instructions are entered in the
computer computer process according to the given
instructions and output. If we process the above
data:
Sr no Name English Chemistry Computer Total
1 Marium 65 85 64 214

2 Fozia 43 85 85 213

3 Faizan 69 65 85 219

4 Alia 68 87 96 251

What is database explain with examples Commented [ST4R3]:

A database: A database is a collection of organized


data, like a digital filing cabinet, that helps store,
manage, and retrieve information efficiently.

- A college: A college database stores student


information, such as names, grades, and courses, as
well as faculty details and course schedules.

- A telephone: A telephone database is like a


phonebook or directory that contains names, phone
numbers, and addresses.

- A library: A library database catalogs books,


including titles, authors, and genres, as well as
borrower information and loan history.
Types:
Manual Database:
A manual database, also known as a manual filing
system, is a system where data is stored in physical
files and documents, and managed manually
without the use of computers. This type of database
is often used in small businesses, homes, and
organizations with limited data storage needs.

Characteristics:

- Data is stored in physical files and documents


- Data is managed manually by individuals
- Data retrieval is done manually, often through
searching and sorting
- Data security is limited, relying on physical storage
and access controls.
Electronic Database:

An electronic database, also known as a digital


database, is a system where data is stored
electronically, using computer software and
hardware. This type of database is widely used in
businesses, organizations, and institutions, where
large amounts of data need to be stored, managed,
and analyzed.
Characteristics:

- Data is stored electronically, using computer


hardware and software
- Data is managed using database management
software
- Data retrieval is fast and efficient, using queries
and search functions
- Data security is enhanced, with access controls,
encryption, and backups
- Data backup and recovery are automated and
efficient
Question no 3 :
Explain advantages and disadvatngse of electronic
database
Advantages of electronic databases:

1. Fast Data Retrieval


Electronic databases allow for fast and efficient data retrieval,
making it easy to access information when needed.

2. Enhanced Data Security


They provide enhanced data security, with features like access
controls, encryption, and backups to protect sensitive information.

3. Easy Data Sharing


Electronic databases enable easy data sharing and collaboration,
facilitating teamwork and communication.
4. Automated Backup and Recovery
They automate data backup and recovery processes, reducing the
risk of data loss and minimizing downtime.

5. High Scalability
Electronic databases offer high scalability, making it easy to expand
or upgrade as data grows or needs change.

6. Advanced Data Analysis


They enable advanced data analysis and reporting, supporting
informed decision-making and business insights.

7. Data Consistency
Electronic databases reduce data redundancy and inconsistencies,
ensuring accuracy and reliability.

8. Real-Time Updates
They allow for real-time data updates, ensuring that information is
always current and up-to-date.

9. Flexible Data Organization


Electronic databases provide flexible data organization and
structuring, accommodating diverse data types and formats.

10. Automated Data Validation


They support automated data validation and error checking,
minimizing errors and inaccuracies.

11. Data Integration


Electronic databases enable data integration and linking, connecting
related information across different sources.
12. Cost-Effective
They offer cost-effective data management, reducing storage costs,
labor, and other expenses associated with manual systems.
Disadvantagse:
1. High Hardware and Software Costs
The cost of hardware and software for electronic databases can be
prohibitively expensive, especially for small organizations or those
with limited budgets.

2. Costly Staffing Requirements


The cost of hiring and training staff to manage and maintain
electronic databases can be high, adding to the overall expense.

3. Need for Specialized Technical Staff


Electronic databases require specialized technical staff to manage
and maintain them, which can be a challenge for organizations with
limited technical expertise.
4. Costly Upgrades and Maintenance
Upgrading hardware and software for electronic databases can be
costly and time-consuming, requiring significant resources and
downtime.

5. Vulnerability to Virus Attacks


Electronic databases are vulnerable to virus attacks, which can
compromise data integrity and system functionality.

6. Risk of Hacker Attacks


Electronic databases are also vulnerable to hacker attacks, which
can result in data breaches and unauthorized access.

7. Risk of Data Loss and Corruption


The risk of data loss and corruption due to technical failures or
human error is a constant concern with electronic databases,
requiring robust backup and recovery systems.
Question no 04
What is the database management system explain it’s different
parts ?
Here are the different parts of a Database Management System
(DBMS), explained in sentence form, with separate headings:

Data
The data component of a DBMS refers to the raw facts and figures
stored in the database, such as customer names, addresses, and
sales data.

Hardware
The hardware component of a DBMS consists of the physical
components used to store and process data, including servers,
storage devices, network infrastructure, and backup devices.

Software
The software component of a DBMS includes the programs and
tools used to manage and interact with the database, such as DBMS
software, application software, and utility software.

Personnel
The personnel component of a DBMS refers to the people
responsible for managing and maintaining the database, including
database administrators, data analysts, data scientists, and IT
support staff.
 Database Administrators (DBAs)
Database Administrators (DBAs) are responsible for designing,
implementing, and maintaining the database, ensuring data
security, integrity, and performance.
 Application Programmers
Application Programmers develop and maintain applications that
interact with the database, writing code to store, retrieve, and
manipulate data, and ensuring data consistency and integrity.

 End-Users
End-Users interact with the database through applications or
interfaces, entering, updating, and retrieving data, and may have
varying levels of access and privileges.
Question #5
What are the advantages of database management
system ?
- Data Consistency: The DBMS ensures that data is
consistent and accurate, enforcing data integrity
constraints and preventing data duplication.

- Data Redundancy: The DBMS reduces data redundancy


by preventing duplicate data entries and ensuring that
data is stored in a single, centralized location.

- Data Security: The DBMS provides a secure platform for


data storage and access, protecting against unauthorized
access and breaches.
Data Sharing: The DBMS allows multiple users to access
and share data, increasing collaboration and productivity.

- Data Independence: The DBMS provides a layer of


abstraction between the physical storage of data and the
users, allowing for changes to the physical storage
without affecting the users.
Application DBMS Database
program

- Report Generator: The DBMS provides a report


generator tool that allows users to easily generate
reports and extract insights from the data.

- Backup and Recovery: The DBMS provides a backup and


recovery system that ensures data is safely stored and
can be easily recovered in case of a failure.

- Online Data Access: The DBMS provides online data


access, allowing users to access and interact with the
data in real-time.
Question no 06
Note on Database Administrator:

A Database Administrator (DBA) is a critical role in an


organization that involves designing, implementing, and
maintaining databases to store and manage large
amounts of data. The DBA is responsible for ensuring the
security, integrity, and performance of the database.

Responsibilities:
- Database Design and Implementation: Design and
implement database architecture
- Database Management: Install, configure, and upgrade
database software
- Security and Access: Manage database security, access,
and authentication
- Performance and Troubleshooting: Optimize database
performance and troubleshooting
- Data Backup and Recovery: Develop and implement
data backup and recovery plans
- Data Integrity: Ensure data integrity and consistency
- Monitoring and Collaboration: Monitor database
activity and performance, and collaborate with
developers and other teams to ensure database meets
business needs
Qualities :

- Technical Skills: Strong technical skills in database


management systems
- Database Design Principles: Good understanding of
database design principles and data modeling
- Problem-Solving Skills: Excellent problem-solving and
analytical skills
- Communication Skills: Effective communication and
collaboration skills
- Attention to Detail: Strong attention to detail and
organizational skills
- Data Security Knowledge: Knowledge of data security
and privacy principles
- Staying Current: Ability to stay up-to-date with new
technologies and trends
- Business Acumen: Good understanding of business
needs and processes
Question #7
What is database security write the actions of database
security system ?
Database security refers to the practices, techniques, and
technologies used to protect databases from
unauthorized access, use, disclosure, disruption,
modification, or destruction. It involves ensuring the
confidentiality, integrity, and availability of data stored in
databases, as well as preventing data breaches and cyber
threats.

Some key aspects of database security include:

1. Access control and authentication


2. Encryption and decryption
3. Authorization and privilege management
4. Data backup and recovery
5. Intrusion detection and prevention
1. Password Security: Use strong passwords that are at
least 12 characters long and changed regularly to prevent
unauthorized access to the database.

2. Network Security: Implement network security


measures such as firewalls and encryption to protect the
database from unauthorized access and malicious
attacks.

3. Database Storage Protection: Encrypt data at rest and


in transit to protect it from unauthorized access and
store backups securely to prevent data loss.

4. Biometric Access Control: Use fingerprint recognition


or other biometric authentication methods to grant
access to the database, ensuring that only authorized
personnel can access the data.
. Role-Based Access Control: Grant access to specific
parts of the database based on user roles, limiting access
to sensitive data and functions to prevent unauthorized
access and data breaches.
Question #8
What is relational database? What is the relation?
Explain its parts?
In relational data, a table is a basic object that stores
data. In relational data, a table is called a relation.
Publication data can have many relationships. Each
relation has a unique name. A relation stores data about
an object. Suppose the college relational data contains
the distance Student and Marks. The Student relation
stores the names and addresses of the students, while
the Marks relation stores the marks obtained in their
various subjects in the exam. Both these relations
(tables) with data are shown in the following figure.
Students relation table :
Roll No Name City
1 Faizan Karor
2 Fozia Choral Layyah
3 Marium Multan
Marks relation table :
Roll No Eng.. Urd… Comp…
1 Faizan
2 Fozia Choral
3 Marium
A relational database management system is a modern
data management system. It is based on models in
relational data. This model Dr. E.

Dr. E.F.Codd (Dr. E.F.Codd) proposed in 1970. He


introduced twelve principles in relational wealth. Be
based on these principles

Co-designed relational database management systems. )


(Relation) :

A set of columns and rows (rows) of unique names is


called a relation. He is also called Nabeel. Display
columns fields or metrics

do Each row represents the corresponding data or


record. Suppose the data of students is stored in the
Student relation or table.
Students relation table :
Roll No Name City
1 Faizan Karor
2 Fozia Choral Layyah
3 Marium Multan
Basic parts of relation :
1. Attributes: These are the columns or fields in the
relation, each representing a specific characteristic or
attribute of the data. For example, in a "Student"
relation, attributes might include "Roll-No", "Name",
"City", etc.

2. Degree: The degree of a relation refers to the number


of attributes or columns it contains. For example, if a
relation has five columns, its degree is five.

3. Tuple: A tuple (also called a row or record) represents


a single data entry in the relation, consisting of values for
each attribute. For instance, in the "Student" relation, a
tuple might be ("1", "Asim", "Lahore").

4. Cardinality: The cardinality of a relation refers to the


number of tuples or rows it contains. In other words, it
represents the total number of data entries in the
relation.
Question #9 :
What is meant by key in database? Which keys are used
in database ?
Primary Key (PK) :
A primary key is a unique identifier for a record in a table,
ensuring uniqueness and integrity. It must be unique, not
null, and unchanged. Example: "Student ID" is a primary
key in a Students table.

Composite Key :
A composite key is a primary key made up of multiple
fields, used when a single field cannot uniquely identify a
record. Example: "Student ID" and "Course ID" together
form a composite key in an Enrollments table.

Candidate Key :
A candidate key is a field or combination of fields that
could be used as a primary key. It is a potential unique
identifier for a record. Example: "Email" or "Phone
Number" could be candidate keys in a Students table.
Alternate Key :
An alternate key is a field or combination of fields that
could be used as a primary key, but isn't. It is an
alternative unique identifier for a record. Example:
"Email" is an alternate key in a Students table if "Student
ID" is the chosen primary key.

Secondary Key :
There is no official concept of a "secondary key" in
databases. However, some databases use this term to
refer to alternate keys or indexes created on columns for
faster data retrieval.

Sort Key :
A sort key is a field used to sort data in a specific order
(e.g., ascending or descending). It is not a unique
identifier, but rather a field used for organizing data.
Example: "Name" or "Age" could be sort keys in a
Students table.

Foreign Key (FK) :


A foreign key is a field in a table that refers to the
primary key of another table, establishing relationships
between tables. Example: "Student ID" in an Enrollments
table is a foreign key referencing the primary key in
the Students table.
Question #10 :
How to design database write its principle ?
The principles of database design are guidelines and rules
that help create a robust, efficient, and scalable
database. These principles ensure that the database is:
Design a table :
When designing a table, identify the entities and
attributes needed for the table. Choose a suitable name
for the table and its columns, and define the columns'
data types and lengths. This involves understanding the
data requirements and structuring the table to efficiently
store and retrieve data.

Division of data into small units :


Break down large amounts of data into smaller,
manageable tables, each with a specific purpose and a
limited number of columns. This division helps maintain
data organization, reduces data redundancy, and
improves data integrity.

Correct data type selection :


Choose appropriate data types for each column,
considering the data's format, size, and potential values.
This ensures efficient data storage and retrieval, and
prevents data type mismatch errors.

Use of primary key :


Define a primary key (PK) for each table, which should be
unique, not null, and unchanged. The PK identifies each
record uniquely, enabling efficient data retrieval and
relationships with other tables.
Making relationships:
Establish relationships between tables using foreign keys
(FK), which reference the primary key of another table.
Define the relationship type (one-to-one, one-to-many,
many-to-many) to maintain data consistency and enable
efficient data retrieval.

Normalization of table:
Normalize tables to minimize data redundancy and
improve data integrity. Apply the First Normal Form
(1NF), Second Normal Form (2NF), and Third Normal
Form (3NF) rules to ensure each table has a specific
purpose and no transitive dependencies.
Question no 11
What is mean by SQL ?
What is SQL server ?
Structured Query Language (SQL) is a programming
language designed for managing and manipulating data
in relational database management systems (RDBMS).

Note on SQL:
- SQL is used to store, modify, and retrieve data in a
database.
- It is a declarative language, focusing on what the
desired output is, rather than how to achieve it.
- SQL consists of commands like SELECT, INSERT, UPDATE,
and DELETE, which perform specific actions on data.
- SQL is a standard language, with various dialects
supported by different database management systems
like MySQL, PostgreSQL, and SQL Server.

Structured Query Language Server (SQL Server) is a


relational database management system developed by
Microsoft.

Explanation of SQL Server:

- SQL Server is a database management system that


stores and manages data in a structured and organized
way.
- It supports various database operations, including
creation, modification, and querying of databases.
- SQL Server provides features like data indexing, caching,
and security to ensure efficient and secure data
management.
- It also offers tools like SQL Server Management Studio
(SSMS) for database administration and development.
- SQL Server is widely used in enterprise environments
for storing and managing large amounts of data.

In summary, SQL is a language used to manage data in


databases, while SQL Server is a specific database
management system that implements SQL to store
and manage data.
Short answer and questions

Here are the explanations in separate paragraphs:

1-Data:
Data refers to the raw, unorganized facts and figures that
are collected and stored. It can be in the form of
numbers, words, images, or sounds. Data is the
foundation of information and is often used as input for
various processes and analyses.

2-Merit Data:
Merit data is accurate, complete, and relevant data that
is useful for decision-making. It is the data that has been
cleaned, processed, and verified to ensure its quality and
reliability. Merit data is essential for making informed
decisions and taking appropriate actions.
3-Information:
Information is the result of organizing, analyzing, and
interpreting data to extract meaning and value. It is the
transformation of data into a form that is useful for
decision-making, problem-solving, and learning.
Information is the output of the processing and analysis
of data.

4-Data Processing:
Data processing is the conversion of raw data into useful
information through various operations like sorting,
filtering, and calculations. It involves manipulating and
transforming data to extract insights and meaning. Data
processing can be manual or automated, depending on
the volume and complexity of the data.

5-Database:
A database is a collection of organized data stored in a
way that allows for efficient retrieval and manipulation. It
is a systematic collection of data that is managed and
controlled using various software tools and techniques. A
database can be manual or electronic, depending on the
size and complexity of the data.

6-Manual Database:
A manual database is a database managed and updated
manually, often using physical files and documents. It
relies on human effort to store, retrieve, and update
data, which can be time-consuming and prone to errors.
Manual databases are often used for small-scale data
management.

7-Electronic Database :
An electronic database is a database stored and managed
using computer software and hardware. It uses digital
storage media and software tools to store, retrieve, and
update data. Electronic databases offer faster data
retrieval, improved data accuracy, and enhanced data
security compared to manual databases.

8-Database Management System (DBMS) :


A DBMS is software that manages and controls access to
a database, providing features like data security, backup,
and recovery. It allows users to define, create, maintain,
and manipulate databases. A DBMS provides a layer of
abstraction between the user and the database, making
it easier to interact with the data.
Here are the answers to the questions:

Who is a Database Administrator?


A Database Administrator (DBA) is a professional
responsible for designing, implementing, and maintaining
databases.
Responsibilities of a Database Administrator:
1. Database design and development
2. Data security and access control
3. Data backup and recovery
4. Performance tuning and optimization

What is Database Security?


Database security refers to the measures taken to
protect a database from unauthorized access, corruption,
or loss.

What is a Relational Database?


A relational database is a database that stores data in a
structured format, with relationships between different
data entities.

What is a Relational Database Management System


(RDBMS)?
An RDBMS is a software system that manages and
controls access to a relational database.

Define Relation:
A relation is a table in a relational database that contains
related data.

Define Attributes:
Attributes are the columns or fields in a relation that
define the characteristics of the data.

Define Degree:
The degree of a relation is the number of attributes it
contains.

Define Tuple:
A tuple is a single row or record in a relation.

Define Cardinality:
Cardinality refers to the number of tuples in a relation.

Role of Primary Key:


A primary key is a unique identifier for each tuple in a
relation, used to maintain data integrity.

Composite Key:
A composite key is a primary key made up of multiple
attributes.

Candidate Key:
A candidate key is a unique identifier for each tuple, but
not necessarily the primary key.

Alternate Key:
An alternate key is a candidate key that is not chosen as
the primary key.

Role of Secondary Keys:


Secondary keys are used for indexing and fast data
retrieval.

Foreign Key:
A foreign key is a field in a relation that references the
primary key of another relation.

Normalization:
Normalization is the process of organizing data in a
database to minimize data redundancy.

Structured Query Language (SQL):


SQL is a language used to manage and manipulate data in
relational databases.

Structured Query Language Server (SQL Server):


SQL Server is a relational database management system
developed by Microsoft.

You might also like