Introduction to Databases.ppt
- Количество слайдов: 31
Introduction to databases Grade 11
Overview • What a database is • How it fits into the broader information management picture • What the different parts of a database are
What is a database? A database is a storage space for content / information (data)
But what is data? And where is it now? Data is factual information about objects and concepts, such as: • measurements • statistics You can find it in: · spreadsheets · folders · lists · piles of papers on your desk
What does “managing information” mean? • Making information work for us • Making information useful • Making information easily accessible and integrated with the rest of our work
Managing as re-organising We often need to access and re-sort data for various uses. These may include: • Creating mailing lists • Writing management reports • Generating lists of selected news stories • Identifying various client needs Can you add to the list?
Managing as re-processing The processing power of a database allows it to: · Sort · Match · Link · Aggregate · Skip fields · Calculate · Arrange
Databases everywhere! Because of the versatility of databases, we find them powering all sorts of projects: · A web site that is capturing registered users · A client tracking application for social service organisations · A medical record system for a health care facility · Your personal address book in your e-mail client · A collection of word processed documents · A system that issues airline reservations
Exercise 1: Understanding data and data-gathering • Think of Facebook • What data does it gather? • What do you think it does with the data it gathers
Different parts of a database • Fields • Records • Entity • Attributes • Queries • Reports
Fields (Tuples) • Database storage units • Generic elements of content
Exercise 2: Breaking down content into fields and field types Thinking of Facebook again. List the field names and then think about what field type it may be. E. g. integer, string, etc
Records and Tables A simple table showing fields (columns) and records(rows): And as part of an MS Access database table:
Time to think • How do you think table are sorted?
Keys • Sort key also known as the primary key • If two tables are connected they must be connected through a key, known as a foreign key.
Exercise 3: Entities, Attributes and Tuples • Think of a hospital, can you think of what tables (Entities) it may contain?
One to One Relationships • Occur when each entry in the first table has one, and only one, counterpart in the second table. • One-to-one relationships are rarely used because it is often more efficient to simply put all of the information in a single table.
One to Many Relationships • Most common type of database relationship. They occur when each record in the first table corresponds to one or more records in the second table but each record in the second table corresponds to only one record in the first table. • For example, the relationship between a Teachers table and a Students table in an elementary school database would likely be a one-to-many relationship, because each student has only one teacher, but each teacher may have multiple students.
Queries • Queries are the information retrieval requests you make to the database • Your queries are all about the information you are trying to gather
Reports • If the query is a question. . . then the report is its answer • Reports can be tailored to the needs of the data-user, making the information they extract much more useful
Information first Database second
Exercise 4 • Think of school student management system. • Create a two tables within that system (Students and Courses) showing the fields and field types they would contain • How would you link the tables?
Conclusion: Database - the information tool • A powerful tool for managing information • Information first - database second
Introduction to Databases.ppt