MIS 134 - Database Tables Database Concepts • Simple databases store information in only one table. These simple databases are often called flat file databases, or just flat databases. • More complex database programs, such as Access, store information in multiple related tables, thereby creating what are referred to as relational databases Database Concepts • Tables are one of the types of database objects you work with in Access. • Other types include forms, queries, reports, macros, and modules. • Of these object types, only tables are used to store information. • The others are used to enter, manage, manipulate, analyze, retrieve, or display the information stored in tables – to make the information as accessible and therefore as useful as possible Database Concepts • In its most basic form, a database is the electronic equivalent of an organized list of information. – Typically, this information has a common subject or purpose, such as the list of employees Database Concepts • This list is arranged in a table of columns and rows – Each column represents a field • a specific type of information about an employee: last name, first name, hire date, and so on – Each row represents a record • all the information about a specific employee • Storing the information in a database, has the following advantages: – It takes up far less space – It costs less to reproduce and distribute – If the database is designed correctly, the information can be retrieved in many ways • The real power of a database isn’t in its ability to store information; it is in your ability to quickly retrieve exactly the information you want from the database Intuitive Database Design • Let us take a look at a simple invoice. • By inspecting the individual data items on the invoice, the following main subjects can be derived: – Customer (who orders products) – Products/Services (ordered by the customer) – Company (which sells the products) • The database design process transforms user-perceived objects (like an invoice) into conceptual database objects (like Customer, Products, Company tables) and ultimately into physical database objects Company Information Customer Information Financial Information Services Ordered Products Ordered The Relational Model • Relational model defines – the way data can be represented => data structure – the way data can be protected => data integrity – the operations that can be performed on data => data manipulation • A relation is defined as a table of columns (attributes) and rows (tuples) – The definition specifies what will be contained in each column of the table, but it does not include data. – When you include rows of data, you have an instance of a relation. • However, a relation has some very specific characteristics that distinguish it from other rectangular ways of looking at data – flat file or a spreadsheet The Relational Model • Column Characteristics: – A name that is unique within the table – The values in a column are drawn from only one domain – Columns are subject to domain constraints • Besides the data type (such as integer or Date/Time, for example), other domain rules may be created for particular columns • Row Characteristics: – Only one value at the intersection of a column and a row. A relation does not allow multivalued attributes – There are no duplicate rows in a relation (Uniqueness) – Rows in a relation are unordered. – A primary key is a column or combination of columns that uniquely identifies each row Create Database Default Database Folder Options => Object Designers => AutoIndex on Import/Create Status bar • Across the bottom of the program window, this bar displays information about the current database and provides access to certain program functions. • At the right end of the bar is the View Shortcuts toolbar, which provides convenient buttons for switching the view of the active database object CREATE • Buttons representing commands related to creating database objects are organized on the Create tab in six groups: Templates, Tables, Queries, Forms, Reports, and Macros & Code. • Double-clicking the active tab hides the ribbon’s button groups and provides more space for the current database object Database Tables • Tables are the core database objects. – Their purpose is to store information. – The purpose of every other database object is to interact in some manner with one or more tables. • A database can contain thousands of tables, and the number of records each table can contain is limited more by the storage space available • Datasheet view displays the table’s data in columns (fields) and rows (records). The first row contains column headings (field names)