DataBase Lecture
DataBase Lecture
DataBase Lecture
1. **Hardware:** The physical equipment and devices that support the DBMS,
such as servers, storage devices, and network infrastructure.
1. **Internal Schema (Physical Level)**: Deals with the physical storage and
representation of data on the storage devices.
Advantages of database
▪ Data Abstraction:
hide the complexity of data from basic users.
Disadvantages of database
▪ Cost of hardware and software:
It required high speed processor and large memory size is required which causes
expensive hardware is needed.
▪ Scalability:
Databases can be difficult to scalable horizontally to accommodate increasing
amount of data and users.
2. **Workgroup Databases:**
- Definition: Databases that support a small group or team within an organization.
These databases facilitate collaboration and data sharing among team members,
often for projects or specific departmental needs.
3. **Department Database:**
- Definition: A database serving the needs of a specific department within an
organization. It caters to the data requirements of a particular functional area, such
as human resources, finance, or marketing.
4. **Enterprise Database:**
- Definition: A comprehensive and centralized database designed to serve the
entire organization. Enterprise databases integrate and manage data from various
departments, providing a unified view of the organization's information.
Introduction to Database
▪ A database is a structured information collection that is often stored
electronically in a computer system.
Purpose of Database
▪ Databases can be used to store, manage, and access any kind of data. They
gather data on people, locations, or objects. To enable observation and
analysis, that data is gathered in one location. Databases can be seen as a
well-organized collection of data.
What is RDBMS Define and Explain keys
RDBMS:
RDBMS stands for Relational Database Management System. It is a type of
database management system that stores data in a structured format, using rows
and columns in tables to represent and organize information. The relational aspect
refers to the use of relationships between tables to connect and manage data.
Now, let's discuss keys in the context of a relational database:
Type of keys
1. **Primary Key (PK): ** A primary key is a unique identifier for each record in
a table. It ensures that each row in the table is distinct and provides a reference
point for relationships with other tables.
- **Example: ** An employee ID in an employee table can be a primary key.
2. **Super Key: ** A super key is a set of one or more keys that can uniquely
identify a record in a table. It is a broader concept than a candidate key or primary
key.
- **Example: ** In a student table, a super key could be a combination of student
ID and email address.
4. **Foreign Key (FK):** A foreign key is a field in a table that refers to the
primary key in another table. It establishes a link between the two tables, creating
a relationship.
- **Example:** In an order table, a foreign key might reference the primary key of
a customer table.
5. **Alternate Key:** An alternate key is a candidate key that is not selected as
the primary key. It is an alternative choice for the primary key.
- **Example:** In a product table, both product ID and product name could be
candidate keys, but one is chosen as the primary key, and the other becomes an
alternate key.
7. **Artificial Key:** An artificial key is a key created for the sole purpose of
serving as a primary key. It is not inherently meaningful and is often generated by
the database system.
- **Example:** A serial number or an auto-incremented ID in a table can serve as
an artificial key.
**Responsibilities:**
1. **Database Design:** Structuring and organizing databases, defining tables,
relationships, and constraints.
Why it is use
1. **Data Storage:**
- Purpose: To provide a centralized and structured repository for storing large
volumes of data in an organized format.
2. **Data Retrieval:**
- Purpose: To enable efficient and targeted retrieval of specific information
through queries and filters.
3. **Data Integrity:**
- Purpose: To maintain the accuracy and consistency of data by enforcing
relationships, constraints, and preventing errors.
4. **Data Security:**
- Purpose: To implement measures such as access controls and encryption to
safeguard sensitive information.
5. **Concurrency Control:**
- Purpose: To manage simultaneous access to data, preventing conflicts and
ensuring data consistency.