Short Answer Questions: 1. Define The Term Cardinality?
Short Answer Questions: 1. Define The Term Cardinality?
3. What is Metadata?
Metadata refers to "data about data." It provides information or
context about other data, helping users understand and work with
that data more effectively. Metadata describes the characteristics,
structure, and meaning of data, making it easier to search, manage,
and use in various applications.
1.Student Table
student_id Student_name
1 Alice
2 Bob
3 Charli
4 Diana
5 Alex
6 James
2.Course Table
course_id course_name cr_hours
1 Database Systems 3
2 Data Structures 3
3 Web Development 4
4 Operating Systems 3
3.Enrolled Table
student_id course_id course grade
1 1 Database Systems A
1 2 Data Structures B
2 1 Database Systems C
3 3 Web Development A
4 1 Database Systems B
5 2 Data Structures A
6 4 Operating Systems C
SQL Queries with Examples:
1) Query to show which students are enrolled in the Database
course:
SELECT s.student_id, s.student_name
FROM Student s
JOIN Enrolled e ON s.student_id = e.student_id
JOIN Course c ON e.course_id = c.course_id
WHERE c.course_name LIKE '%Database%';
Result:
student_id student_name
1 Alice
2 Bob
4 Diana
2) Query to display students whose names start with 'A' and end
with 'S':
SELECT student_id, student_name
FROM Student
WHERE student_name LIKE 'A%S';
Result:
student_id student_name
5 Alex
Question#1
Write down a detail note on Three Tier Architecture?
Three-Tier Architecture
Three-Tier Architecture is a software design pattern that separates
applications into three distinct layers or tiers: the presentation tier,
the application tier (also known as the business logic tier), and the
data tier. This architectural model promotes the separation of
concerns, making it easier to develop, maintain, and scale
applications. Here’s a detailed overview of each tier, its
components, and its benefits.
Data Tier:
This bottom layer is responsible for data storage,
retrieval, and management. It consists of databases and data
management systems.
Components: Database servers (e.g., MySQL, PostgreSQL, Oracle,
MongoDB) and data storage systems.
Responsibilities
- Store and manage application data.
- Ensure data integrity and security.
- Provide mechanisms for data access and retrieval (e.g., SQL
queries, data APIs).
- Perform backup and recovery operations.
Communication Between Tiers
Client-Server Interaction: The presentation tier communicates
with the application tier using APIs or web services (e.g., RESTful APIs
or SOAP). The application tier processes the requests, interacts with the
data tier, and returns the results to the presentation tier.
Data Access: The application tier communicates with the data tier
using database queries or ORM (Object-Relational Mapping)
frameworks, allowing it to perform CRUD (Create, Read, Update,
Delete) operations on the data.