Database
A database is a collection of structured data that can be easily accessed, managed, and updated. It
helps store, organize, and retrieve large amounts of information efficiently.
Primary Key
A primary key is a unique identifier for each record in a database table. It ensures that no two
rows in a table have the same value in this field, making it easier to locate specific data.
● Example: In a student database, the student ID could be the primary key because each
student has a unique ID.
Foreign Key
A foreign key is a field (or a collection of fields) in one table that refers to the primary key in
another table. It establishes a relationship between two tables.
● Example: In a school database, a student table may have a class_id field, which is a foreign
key pointing to the primary key in the class table.
Flat Table
A flat table is a single table that holds all the data without any relationships to other tables. It can
lead to data duplication and anomalies but is simple to implement.
● Example: A spreadsheet where all information about students, classes, and teachers is
stored in one table.
Relational Table
A relational table refers to a table in a relational database where data is organized into multiple
tables related by foreign keys. This avoids data duplication and makes the database more
efficient.
● Example: Separate tables for students, teachers, and classes, with relationships
established through foreign keys.
Data Redundancy
Data redundancy occurs when the same piece of data is stored in multiple places within a
database. This can lead to inconsistency and wasted storage space.
● Example: Storing the same student’s address in both the student table and the class table.
Update Anomaly
An update anomaly happens when changes to data must be made in multiple places due to
redundancy, and failure to do so causes inconsistencies.
● Example: If a student's address is stored in several tables, and one table is updated but the
others are not, it leads to conflicting data.
Deletion Anomaly
A deletion anomaly occurs when deleting a record inadvertently removes other important data
due to poor table design.
● Example: In a flat table, deleting a student’s record may also delete the class information if
both are stored in the same table.
Query Tool in Microsoft Access
A query is a way to retrieve specific data from a database. The Query Tool in Microsoft Access
allows users to create queries that filter, sort, and display data based on specified conditions.
● Example: Finding all students who scored above 80% in their exams.
Wizard Tool in Microsoft Access
The Wizard Tool in Access helps users create database objects, such as tables, forms, queries, and
reports, by guiding them through a series of steps, making the process simpler.
● Example: Using the Table Wizard to quickly create a new table with predefined fields.
Delimiter
A delimiter is a character used to separate values in a file. Common delimiters include commas,
tabs, or semicolons.
● Example: In a CSV file, the comma (,) is the delimiter separating values like names and
addresses.
Wildcard in Microsoft Access
Wildcards are special symbols used to represent unknown or variable characters in search
criteria, making it easier to find data that follows certain patterns.
Common wildcards in Access:
* (asterisk): Matches any number of characters (e.g., A* finds "Alice," "Alan," "Andrew").
? (question mark): Matches exactly one character (e.g., A?e finds "Ace," "Axe").
● Example: To find all student names that start with "J," use J* in your search criteria.
CSV File
A CSV (Comma-Separated Values) file is a plain text file where each line contains data separated
by commas. It is commonly used to transfer data between applications.
● Example: A list of students' names and grades stored in a CSV file.
Big Data
Big Data refers to large, complex datasets that are too vast to be processed using traditional data
management tools. It requires advanced analytics and tools to derive meaningful insights.
Characteristics of Big Data
1. Volume: The enormous amount of data generated from various sources.
2. Velocity: The speed at which data is generated and processed.
3. Variety: The different forms of data (structured, unstructured, semi-structured).
4. Veracity: The uncertainty or inconsistency in the data.
5. Value: The usefulness or insights derived from analyzing the data.
Applications of Big Data
1. Healthcare: Analyzing patient records and treatment histories to improve medical care.
2. Retail: Tracking customer behavior to predict trends and improve services.
3. Finance: Risk analysis, fraud detection, and algorithmic trading.
4. Entertainment: Streaming platforms analyzing viewing habits to recommend content.
Extra Notes:
Creating a Relational Table Using a Data Package
A data package is a predefined structure or file that contains sets of data. In Microsoft Access, you
can import data from external sources (e.g., CSV, Excel, or other databases) to create tables, which
can then be used to establish relationships between multiple tables.
● Steps to create a relational table:
1. Open Microsoft Access and go to the "External Data" tab.
2. Choose the data source (e.g., Excel, CSV).
3. Follow the Import Wizard to map the fields correctly and import the data into a
new table.
4. Define the primary key for the imported table to ensure uniqueness.
5. Repeat this for other tables you want to include in your relational database.
Creating a Relationship Between Tables
A relationship is established between tables to connect them through primary and foreign keys,
allowing data from multiple tables to be combined in queries and reports.
● Steps to create a relationship:
1. Go to the "Database Tools" tab in Microsoft Access.
2. Click on Relationships.
3. Add the tables you want to relate.
4. Drag the primary key from one table and drop it onto the foreign key of another
table.
5. Choose the referential integrity options to ensure data consistency.
6. Click Create to establish the relationship.
Creating Complex Search in Database
A complex search in a database allows users to retrieve specific data based on multiple conditions
or criteria. In Microsoft Access, this can be done using the Query Design tool.
● Steps to create a complex search:
1. Open the Query Design tool in Microsoft Access.
2. Select the tables you want to include in the search.
3. Add the fields you want to search within.
4. In the criteria row, specify the conditions (e.g., >80, LIKE 'A%').
5. Run the query to see the results matching the criteria.
Creating Complex Search Using Multiple Criteria
In Microsoft Access, you can apply multiple criteria (conditions) to refine a search. These can be
combined using AND and OR logic to filter the data more precisely.
● AND Criteria: Both conditions must be true (e.g., find students who scored above 80 and
are in grade 10).
1. Example: >=80 AND [Grade]="10"
● OR Criteria: One or the other condition must be true (e.g., find students who are either in
grade 9 or grade 10).
1. Example: [Grade]="9" OR [Grade]="10"
● Steps to create a complex search with multiple criteria:
1. Open Query Design and select the necessary fields.
2. Add your first condition in the Criteria row.
3. Add the second condition in the or row (for OR) or on the same line (for AND).
4. Run the query to retrieve results that meet all the conditions.
Creating Complex Search in Relational Database
In a relational database, you can perform complex searches across multiple related tables.
Queries can pull data from different tables by leveraging the relationships (using primary and
foreign keys).
● Steps to create a complex search in a relational database:
1. Go to Query Design and select the tables related by primary key and foreign key.
2. Choose the fields you need from each table.
3. Define conditions across the fields. For example, search for students from the
student table who are enrolled in a specific class from the class table.
4. Use the criteria row to specify conditions from multiple tables.
5. Run the query to get results that match conditions from both tables.