DATABASE PART 2 Components and Functions
Key Terms data type field record form query report primary key foreign key one-to-one table relationship one-to-many table relationship many-to-many table relationship Structured Query Language (SQL) MySQL
Learning Targets Identify the components of a database. Distinguish between fields and records in a database. Describe the basic data types and formats used in a database. Distinguish between a table and a query. Identify database keys, including primary and foreign. Identify the relationships between tables in a database (i.e., one-to-one, one-to-many, many-to-many). Distinguish between a query and a report. Identify various report types. Describe Structured Query Language (SQL) and discuss its use with databases. Identify and compare various database applications, including Microsoft Access, MySQL, Oracle.
Database Uses Many of us do not realize that we use databases in our everyday tasks. We use databases in items such as smartphones, Web sites, computers and ATMs. Databases make it easy to search through large amounts of information. when people register with Web sites such as Facebook, YouTube, Snapchat and Instagram, all of their personal information is stored in those sites' databases.
basic data types used in a database Text Number Currency Date/Time Yes/No Memo Attachment Hyperlink
Database Tables, Fields and Records databases store data in tables that are made up of fields and records. Tables within a database can also be called datasheets
Distinguish between fields and records in a database In a database table of columns and rows, a field is a column and a record is a row. Web sites such as Facebook, all of your profile information, posts and photos anything you enter on the site are stored in the site's database tables.
Database Forms database programs use forms that provide a simplified way to enter, modify and view the database records using a database form is an alternative method to entering the data directly into the table or datasheet.
Database Query Query is another word for question Databases store data in a structured format, which can be accessed using queries the structured query language (SQL) was designed specifically for this purpose Users can create SQL queries that retrieve specific information from a database Review Introduction to Objects: Forms, Queries and Reports. Difference between a table and a query: Table: a file that stores all of the data Query: retrieves specific data from the tables
Database Table Keys and Relationships Primary key: A primary key is a unique identifier for a database record Foreign key: it is a field in a related database table that refers to the primary key in the primary table the data contained in the primary key is unique that is, no duplicate data can be contained in the field. the primary key and foreign key are used to relate two separate database tables
3 types of relationships in database tables
One-to-Many one-to-many relationship is the most common type of table relationship
Many-to-Many a many-to-many relationship between two tables is established by creating two oneto-many relationships with a third table, called a junction table. The junction table contains the primary key fields from each of the other two tables in the relationship.
Database Queries and Reports queries are used to request information from a database and display only that information to the user a query displays only the particular fields and records from a database that you want to see you can print a report to display information contained in a database or database query
Structured Query Language (SQL) SQL is pronounced sequel SQL is commonly used for developing and managing Web databases It is a query language used for accessing and modifying information in a database on the web MySQL is a variation of the language that makes it possible to create dynamic web pages that can display different information each time it loads.
Database Applications DMBS Database Management System a program used to store, access and manipulate database information. Microsoft Access is an end-user DBMS that you can use to create and manipulate fairly small and uncomplicated databases. Microsoft Access is generally used by individuals, rather than businesses. Oracle and MySQL are high-end DBMS programs used to create and manipulate large, complex databases. Oracle and MySQL and generally used by large organizations.