Presentation is loading. Please wait.

Presentation is loading. Please wait.

Relational Databases Today we will look at: Different ways of searching a database Creating queries Aggregate Queries More complex queries involving different.

Similar presentations


Presentation on theme: "Relational Databases Today we will look at: Different ways of searching a database Creating queries Aggregate Queries More complex queries involving different."— Presentation transcript:

1 Relational Databases Today we will look at: Different ways of searching a database Creating queries Aggregate Queries More complex queries involving different types of relationships

2 Query By Example Access and Base allow us to use filters like those in spreadsheet applications

3 Query By Example We can also create queries to help us search We first select the table we want to use And then which fields we want to see in the results table We can also sort results Finally, we enter the criteria used to select the results

4 Complex Queries With a relational database we can also do queries across multiple tables Usually they need to be linked, but you can do this in the query itself This query shows all of the students in alphabetical order, together with the name of their tutor.

5 Aggregate Queries Aggregate queries are ones that perform calculations across groups of records – e.g. counting them, or working out totals or averages This query shows how many students there are in each year The first step is to group the records, e.g. into years, and then the function works on a group at a time

6 Relationship Types By default, queries only show rows where there are records in each table In this example, only students that have a transport type entered will appear in the results Can we show the students who haven’t had a transport type entered?

7 Relationship Types We can change the type of the relationship to show those missing records We can choose the table from which we want to see all records We can also use the criteria Is Null (or Is Empty in LibreOffice) to find blank entries


Download ppt "Relational Databases Today we will look at: Different ways of searching a database Creating queries Aggregate Queries More complex queries involving different."

Similar presentations


Ads by Google