Académique Documents
Professionnel Documents
Culture Documents
Sen Zhang
What is a databse?
A database is a collection of information stored on a computer in a systematic and structured way, which should facilitate information retrieval.
Database application cares about not only keeping track of information, but also retrieving information. So, to facilitate information retrieval, a database application has to consider how to save data in some well defined structures.
Why structured?
Think about how to put your books on shelves. Fast retrieval But slow down storing It is worth of the effort
Database application is meaningful when you need to save data and dynamically search data as well as derive new data, more powerful than Excel. It is especially useful when the application concerns about huge amount of information.
One example, all transactions of Walmart. How does Walmart maintain all customer transactions? How does walmart maintain all information about different kinds merchandise? Why maintain database? Why you maintain your house? Do you need them later? If yes, then you need. You can find out other examples
Excel does not impose rigid structure requirements to data in individual cells. Excel is not good at handling massive amounts of data. Excel does not support queries from different tables (actually, tables in Excel are different from the Accesss tables!)
It is the Access where tables are used in the real sense (It might sound difficult to understand at this moment, but it will be clear at the end of the lecture) . We will see the differences.
Database is managed by database management system. Microsoft Access is a powerful program to create and manage your databases.
Access is a database management system, and more precisely, a relational database management system. In a relational database, everything will be organized into tables. (a table = a relation).
Table A collection of records that identify a category of data, such as Customers, Orders, or Inventory.
A Primary key
A primary key is a field, or a collection of fields, whose values uniquely identify each record in a table.
The primary key uniquely identifies a record in the table. In other words, a primary key allows user to distinguish one record from another in the same table. In Access, a table usually has a field, or a collection of fields to be designated as the primary key. (Not a must, but usually we do.)
Relational database?
Every piece of information will be stored in relations, i.e. tables. For example, student table looks like:
Relational databse?
Course table
credit 3 3
Relational databse?
Enrollment table
sequence 1 2
status n w
Relational database?
Student id A23232 A23355 A34333 name john john kathy year 1988 1976 1979 status good good good
credit 3 3 status n w
Several Terminologies
A database is a collection of related information. An object is a member in the database such as a table, query, form, or macro. A table is a grouping of related data organized in fields (columns) and records (rows) on a datasheet. By using a common field in two tables, the data can be combined. Many tables can be stored in a single database. A field is a column on a datasheet and defines a data type for a set of values in a table. For a mailing list table might include fields for first name, last name, address, city, state, zip code, and telephone number. A record in a row on a datasheet and is a set of values defined by fields. In a mailing list table, each record would contain the data for one person as specified by the intersecting fields. Design View provides the tools for creating fields in a table. Datasheet View allows you to update, edit, and delete in formation from a table.
Database Window
The Database Window organizes all of the objects in the database. The default tables listing provides links for creating tables and will list all of the tables in the database when they have been added.
Design View
Design View customizes the fields in the database so that data can be entered.
Datasheet View
The datasheet allows you to enter data into the database
Forms
A form is nothing more than a graphical representation of a table. You can add, update, delete records in your table by using a form. NOTE: Although a form can be named different from a table, they both still manipulate the same information and the same exact data. Hence, if you change a record in a form, it will be changed in the table also. Actually, a form and a datasheet are simply different views of the same table.
You can navigate through the records by using the navigation buttons on the Navigations toolbar.
Reports
A report is an effective way to present your data in a printed format. Because you have control over the size and appearance of everything on a report, you can display the information the way you want to see it.