2. MODULE OVERVIEW
• Table structure
• Creating tables. Field types
• Changing table structure
• Data input. MEMO - fields. OLE field. Hyperlinks
• Using counters. Field titles
• Numeric fields. Input Masks andValue Condition
3. LESSON 1: CREATING A DATABASE
• DB structure
• Creating tables. Field types
• Change table structure
4. DATABASE
• formally, a "database" refers to a set of related data and the
way it is organized
• organized collection of data, generally stored and accessed
electronically from a computer system
• access to this data is provided by a "database management
system" (DBMS) – computer software that allows users to
interact with one or more databases and provides access to all of
the data contained in the database. Access is a personal
DBMS
• relational database represents all data
as rows and columns in a series of tables, and the vast
majority use SQL for writing and querying data
5. DB CLASSIFICATION BY
DATA MODEL
• Hierarchical
• Network
• Relational
• Object
• Object oriented
• Object relationalSQL vs NoSQL
6. DB CLASSIFICATION BY USER
• Single-user
• Access
• Multiuser
(Enterprise-level)
• SQL Server
• Oracle
• MySQL
• …
7. DATA RELATIONS INSIDE DB
• relational DB – tables, rows and fields
• each table contains unique data
• the process of breaking your data into smaller
tables is called normalization
• relations via key fields (primary and foreign)
• unique entry identifier
• the field "on the other side" of relation
11. TEST QUESTION
What is the function of a primary key? (Pick one answer)
1. To uniquely identify each record in a table
2. To encrypt and decrypt your database
3. To help ensure you enter data in the correct table
12. TEST QUESTION
Primary keys do all that, and all your tables must have a
primary key field
What is the function of a primary key?
Answer:
1. To uniquely identify each record in a table
13. TEST QUESTION
You establish a relationship between Table A and Table B by: (Pick
one answer)
1. Merging Table A with Table B
2. Linking Table A with Table B
3. Adding the primary key from Table A to Table B
(or vice-versa)
14. TEST QUESTION
When you add a primary key field to another table and
create a relationship, that new field becomes a foreign key
You establish a relationship between Table A and Table B by:
Answer:
3. Adding the primary key from Table A to Table B
(or vice-versa)
15. DB STRUCTURE
• Access database consists of
objects
• Main objects:
tables, queries, forms and
reports
• Macros
• Modules
16. EXERCISE
1. Imagine a database
2. Write down what exactly
the database was used for
3. Record your intended uses
of the database
19. TABLES
• Standard DB Building Blocks
• essential component of any database
• a containers to store your data
• similar to data lists in Excel
(CTRL+T, CTRL+L inside
region)
• Access database contains at
least one table
21. TABLES
• a table for each object
of the domain
• rows and fields
• information about a particular
person, event, product, or other
item
• separate component
(one piece of data) of the row
23. HOW TO CREATE A TABLE
• New blank table
• DesignView
• Quick start*
Microsoft no longer recommends creating and using Access
web apps in SharePoint. As an alternative, consider
using Microsoft PowerApps to build no-code business
solutions for the web and mobile devices
29. FIELDTYPES
• (Short )Text
• up to 255 characters
• Number
• 1,2,4,8 bytes
• Large Number (16)
• (MEMO) LongText
• can contain up to 65535
characters
• Date/Time
• Currency type
• 1-4 decimal places
• up to 15 in the whole part
• 8 bytes
• AutoNumber
• Auto increment
• 4 bytes
• (Boolean) Yes/No
• OLE object
• Hyperlink
• up to 2048 characters
30. EACH RECORD IS UNIQUE
• there cannot be two identical
rows
• the primary key is the unique
identifier of each row
• how to ensure uniqueness:
• INN
• product code
• employee's number
• auto increment (autonumber)
31. KEYS
the primary key of one of
the related tables becomes
the foreign key of the
other
32. HOW TO CHANGE DB
STRUCTURE
• Design view for tables
• creating a data schema
• DatabaseTools → Relationships
33. EXERCISE
Create a database table to
store information about
employees of a small web
development startup.
What fields are logical to provide in the table?
34. Which of the following describes a relational database?
(Pick one answer)
1. It provides a relationship between integers
2. It consists of separate tables of related data
3. It retrieves data related to its queries
TEST QUESTION
35. 2. It consists of separate tables of related data
The separate tables are associated with each other through
relationships
TEST QUESTION
Which of the following describes a relational database?
Answer:
36. TEST QUESTION
Which of the following is not a database object?
(Pick one answer)
1. Table
2. Report
3. Query
4. Worksheet
37. 4. Worksheet
Although you can import worksheets from Microsoft Excel
into your database, worksheets are not database objects
TEST QUESTION
Which of the following is not a database object?
Answer:
38. What are the main building blocks of a database?
(Pick one answer)
1. Lists
2. Queries
3. Tables
TEST QUESTION
39. 3. Tables.
Every Access database contains one or more tables that
store your data
TEST QUESTION
What are the main building blocks of a database?
(Pick one answer)
Answer:
40. TEST QUESTION
How many tables should a well-designed database contain?
(Pick one answer)
1. As many as necessary to capture all your data without
redundancy
2. One
3. Two
41. TEST QUESTION
That can be one table, or it can be dozens
How many tables should a well-designed database contain?
Answer:
1. As many as necessary to capture all your data without
redundancy
42. Data should be organized into tables based on:
(Pick one answer)
1. Field properties
2. Subjects associated with the data
3. Character lengths
TEST QUESTION
43. 2. Subjects associated with the data
A well structured database has a table for each subject to
which data belongs, such as Employees, Students, or
Products
TEST QUESTION
Data should be organized into tables based on:
Answer:
44. A row in a table is also known as:
(Pick one answer)
1. A field
2. A record
3. A data type
TEST QUESTION
45. 2. A record.
A row is one record in a table; it contains a collection of data
about something, such as a product or employee. A record
includes data from several fields that might have names like
Unit Price or Employee ID
TEST QUESTION
A row in a table is also known as:
Answer:
46. A primary key is:
(Pick one answer)
1. A unique identifier that can be used to relate tables
2. The key that precedes the secondary key
3. The password that validates a database
TEST QUESTION
47. 1. A unique identifier that can be used to relate tables.
A primary key distinguishes one record from another and
links data in one table to data in other tables
TEST QUESTION
A primary key is:
Answer:
48. LESSON 2:WORKING WITH FIELDS
• Data input. MEMO fields. OLE field. Hyperlinks
• Using counter. Field titles
• Numeric fields. Input Masks andValue Condition
49. MEMO, OLE FIELDS ETC.
• (MEMO) Long Text field
• Can contain up to 65535 characters
• Unicode is used
• OLE field - link to OLE object
• Microsoft Excel sheet
• Microsoft Word document
• Sound, Picture, Video
• ...
• Hyperlinks - file path, web page
• display text
• address (file or page path)
• additional address (position inside file or page)
• tooltip text
• each part of the hyperlink can contain up to 2048 characters
50. AUTONUMBER
• 4-byte unique number
• Determined automatically for each new record
• either randomly or by increasing the previous value by 1
• Values cannot be updated
• The maximum number of entries in a table with a
counter field must not exceed two billion
51. LOOKUPWIZARD
• Field property, not real data type
• starts the wizard to create a lookup column
• list of values to choose from when entering data
52. FIELD CAPTION
• The property that sets the field header (caption)
• displayed in table mode
• It may be the same as the field name, or it may
differ from it
• If not specified,Access uses the field name for
this.
• may contain up to 2048 characters
53. NUMERIC FIELDS
• Field size - 1, 2, 4, 8 or 16 bytes
• The default is Long Integer
• 4 bytes
• from -2,147,483,648 to +2,147,483,647
• Byte - 1 byte
• Integer - 2 bytes
• Single (float) - 4 bytes
• Double (float) - 8 bytes
• Decimal - 12 bytes
• Replication ID - 16 bytes
• used to identify an entry in the table
54. INPUT MASK
• intended to facilitate control
over the entry of information in
the field of a table, query or
control of a form or report
• Character string
• regular characters
• brackets, points or hyphens
• Special symbols
• indicate in what positions, in
what quantity and what type of
data can be entered
59. VALIDATION RULE
• Applicable for all fields except AutoNumber and OLE
• If a condition is specified, when the field is saved, it will be
checked
• If the condition is not met, a message is displayed from the
error message (ValidationText)
• If the message text is not specified, a standard message will be
displayed.
• May contain up to 2048 characters
• Error Message (ValidationText) - up to 255 characters
62. EXERCISE
• Create a database of your home
library
• Consider the tables and their fields
• book author
• book title
• publisher
• number of pages
• Create tables and links
between them
63. BOTTOM LINE
• Table structure
• Creating tables. Field types
• Change table structure
• Data input. MEMO, OLE, Hyperlinks
• Auto Number. Field captions
• Numeric fields. Input Masks andValidation Rules