Database is a collection of related information which arranged in a systematic way that its reduced the redundancy and shareable by more then one person at the same time for different purpose . Databases constructed on computers is called electronic Database. we can also say that computer-based collection or listing of information, usually organized with searchable elements or fields is called Electronic database. For example library database which consists of records describing articles in journals or newspapers and the searching of these information easy and fast.
There are many reasons that we use the electronic database some of these reasons given below:
In Electronic Database we can can be searched through a query in few seconds on many millions of records. If we do this manually then its take allot of time. The electronic database have flexibility. So that we can develop different data model.
electronic Database remove the redundancy so the data in electronic database is consistent. So data will never mismatch. The oldest database with billions of records, as long as it has been properly designed and maintained, it will still search rapid and return result fast versus manual where each growing record slows down end point of search drastically. electronic data base is shareable so we access the record which we need very quickly from any ware with the help of networking or through the internet. In electronic database There is no limit that how many user and how many time database is searched.
Microsoft Access is DBMS system (database management system). MS office also called Microsoft office combines the relational Microsoft Jet Database Engine with a graphical user interface and software-development tools. MS Access is one of the member application of the Microsoft Office suite. in MS Access we can create table , queries, forms , module and macro with some clicks.
Some of the major components of MS Office 2007 interface are:
Title Bar
The title bar contains the name of the program. On the extreme right are the buttons to minimize, maximize/restore and close.
Menu Tab
Below the title bar is menu tab is located ( Commands Tab). we can select any menu item from this bar.
The Office Ribbon
This panel is located at the top of the program window. The office ribbon contain following item:
Command Tab
This is also called menu tab. This tab contain some option. when we select any option then related command are display below this tab.
Contextual command Tab
This tab is below the Command Tab. When we click on any option from Command tab then related commands depending on your context are appears in this tab.
Quick Access Toolbar
The small tool bar that appears on the Ribbon on left side and offers single-click access to most needed commands, such as Save and Undo and Redo. You cal also some more command which you commonly use by customizing this tool bar.
Navigation Pane
The area on the left side of the working window that displays your database objects. The Navigation Pane replaces the Database window from earlier versions of Access.
Status bar
In the bottom of working window a bar is called status bar which displays status information and includes buttons that allow you to change your view.
Mini toolbar
When you select the text and move the mouse on above text a menu appear transparently above that text that you have selected, and from this menu you can easily apply the formatting option to the text.
Office Button
Office button is located in the upper-left corner of the Microsoft Office 2007 Program window. Office button contain those Options command that was on the Tools menu in previous version like that Save , open Print etc.
in ms access Tables is collection of row and column like a grid which contain the actual records. The following are the different components of Access Table.
Rno | Marks | Result | Remarks |
101 | 500 | Pass | Good |
102 | 800 | Pass | Very Good |
1.Name of The Table
Every tbale have a unique name. The name of table define by user when you save the table in MS Access. For example tbl_main. so we also define table name as main but including a prefix tbl_ its make different and knowable from other object like that queries and forms etc.
2.Columns:
Vertical section of the table is called column. the number of column depend on the number of the fields which you want to store as your record. For example in above table we define four fields Rno, Marks, Result, Remarks then the table have four column.
3.Rows:
The horizontal segment of the table is called Rows. One row consist on one record.For example In the above table 101, 500, Pass, Good is one record. The record always entered left-to-right .
4.Cells:
The combination of a row and a column is called Cell. For example in above table intersection of First row and first Column is Rno this is first cell of the table.
Association Between Data Items
An association is logical relationship between data items. An association implies that the values for the associated data item are in same way depending on each other.
There are following four types of association:
1. One To One Association
2. One To Many Associations
3. Many To Many Associations
1) One To One Association:
A One To One association between data item X and Y means that for specified period of time a given value of X have one and only one value for Y. this association is represented as follow.
Suppose we have two data item Reg # and student name then there is one to one association between Reg # and student name because for specified period of time one registration number is assigned to one student.
2) One To Many Associations
A One To many association between data item X and Y means that for specified period of time a given value of X have one or more then one value for Y. this association is represented as follow.
Suppose we have two data item Teacher and Subject then there is one to many association between Teacher and Subject because for specified period of time one teacher may be teach more the one subject.
Many To Many Association:
A Many To Many association between data item X and Y means that for specified period of time a given value of X have more then one value for Y and Y have also more then one value for X. This association is represented as follow.
The most useful example of this association is relation between Student # and course #. Any student may have taken one or more then one course at a time and any course may have taken by one or more then one students.
Attribute:
A single data item related to a database object. The database schema associates one or more attributes with each database entity. Attribute is also known as: field, column.
Record:
Collection of different fields is called record. for example in above table 101, 500, pass is one record. we can also say in database table single record show the one record.
Tuples:
A row in table is called tuple , is also called Record.
File:
The collection of all database object for example Tables , Queries, Forms , Report and Access is called File. In access this file is store with .MDB extension and called MDB file.
A key is single attribute that is used to identify one or more item form database. In simple word we say that data item which is used to identify the record is called key. The data elements, which cause other element to be known, is called key.
For example
Rno name City
001 Toqeer DIKHAN
002 Abrar DIKHAN
003 Ali DIKHAN
In above table RNO is a data element by which we can identify the record so it is called key.
TYPES OF KEY
1. Primary Key
A data item or attribute that uniquely identify every tuple (row or record) in relation is called primary key or attribute key. It is used to access the data from database. It is also called atomic key (It is probably meant to identify something "as small as possible"). A table must have unique key so that no duplication occurs. Primary key always unique and not assign NULL value.
For example
Reg# Name City
In above relation Reg # is primary key because as no more then one student have same Reg # so we can access single row with the help of Reg#. In simple word if we give Reg # of the student then we can access the whole record of that student.
3. Compound Key
In database design, a compound key is a key that consists of 2 or more attributes that uniquely identify an entity occurrence. Each attribute that makes up the compound key is a simple key in its own right.
4. Composite Key
Composite key is also a key that consists of 2 or more attributes that uniquely identify an entity occurrence; at least one attribute that makes up the composite key is not a simple key in its own right.
5. Super Key
A super key is a set of columns within a table whose values can be used to uniquely identify a row. A candidate key is a minimal set of columns necessary to identify a row, this is also called a minimal super key. For example, given an employee table, consisting of the columns employeeID, name, job, and departmentID, we could use the employeeID in combination with any or all other columns of this table to uniquely identify a row in the table. Examples of superkeys in this table would be {employeeID, Name}, {employeeID, Name, job}, and {employeeID, Name, job, departmentID}.
In a real database we don't need values for all of those columns to identify a row. We only need, per our example, the set {employeeID}. This is a minimal superkey ? that is, a minimal set of columns that can be used to identify a single row. So, employeeID is a candidate key
6. Candidate key
When more then one attribute can access the uniquely record from a table then one attribute chosen as primary key then other attribute is candidate key.
7. Foreign Key
An attribute which is primary key in one relation and non primary key in other relation then it is called foreign key.
For example if we have two relation
Student(Rno#, Name, Marks)
Book(Rno#, Book#, Bname)
In student record Rno# is used as primary key and in book record of library one Rno# can take more then one books so in this relation we can not used Rno# as primary key. So in this relation Book# is used as primary key. So Rno# in Book relation is used as Foreign Key.
A wildcard is a symbol that takes the place of an unknown character or set of characters. Commonly used wildcards are the asterisk ( * ) and the question mark ( ? ).
When you are searching a record in access quires, you can simplify your search by using a wildcard.
First of all, wildcard characters can be categorized as follows:
1) 'String' Group
* (asterik)
2) 'Character' Group
? (question), # (pound), [ ] (bracket), ! (exclamation)
3) 'Range' Group
[ ] (bracket), - (hyphen), ! (exclamation)
? (Question)
This is a single character reference. It can be used as a substitute for any character (letters, numbers, special characters). Here are a couple of examples
(Input Criteria = Output Result being queried):
Code:
1) I Love MS A?cess = I Love MS Access
2) I Love MS A??e?? = I Love MS Access
# (pound)
This is also a single reference substitute. However, it is limited to numeric values only. Numeric values include any number, even if it has been declared as a non-numeric data type (such as text, or date. Here are some examples:
Code:
1) 1/##/2007 = 1/12/2007 or 1/20/2007 or 1/31/2007, etc...
[ ] (bracket)
This is very useful, especially when you need to extract specific data. It can be used to help retrieve specific characters within larger strings. You can use it to find one character, multiple characters, or even a range. The only bad thing about the bracket is the limitation. It can only be used to query one space at a time. The other thing to remember here is when you're using it to find multiple numeric values. If you have more than one numeric in the bracket, they must be delimited somehow (if they're not, they will be evaluated as one long numeric string). Commas, colons and semicolons all work fine for this purpose. Here are some examples of the bracketing method:
Code:
1) SQL is tou[g]h to learn = SQL is tough to learn
2) SQL is t[w, o, n, m]ugh to learn = SQL is tough to learn
- (hyphen)
This is very simple. It just specifies a range of values within a bracket. Examples:
Code:
1) This is si[k-p]ple = This is simple
2) This is si[g-p][g-p]le = This is simple or This is single
3) F[a-p]ll = Fall or Fell or Fill
! (exclamation)
Also called the "bang" symbol, this functions in a way similar to the not keyword. The only difference between the two is the context in which they are used. The bang operator is used with brackets:
Code:
1) [!3-7]st example = 1st example
2) F[!a-e]ll = Fill or Full
* (asterik)
This is probably the most confusing to work with. The part that is commonly misconstrued is the concatenation of the character with other strings (using the ampersand ("&")).
I use what I call the "connector" rule to determine weather or not my criteria will give me the result I want. Here is the basic principal:
If the * is connected to a string, it applies only to one non space-delimited string. If it is not connected to a string, it applies to the entire field value, relative to its placement within the criteria section as a whole. Here are some examples to illustrate:
Code:
1) Mic*oft = Microsoft
2) Micro* = Microsoft
Data Types in MS Access 2007
In Access when you declare a field then you must define the data type of that field. In Access you can define the following data type:
The different kinds of Access data are:
Text: This type allows you for the storage of any kind of data, characters, digits and special characters. The length of text is 50 characters with a maximum length of 255. It is normally used to store data such as names, addresses, or any number.
Memo: when you text length is more than 255 characters then you can use memo data type. It has a maximum length is 65536 characters.
Number: This type is use for storing the number data. The type of the Number data can be Byte, Integer and Long Integer which store the numbers without decimals and the types Single, Double and Decimal allow to store number contain decimals point.
Date/Time: This data type specially used to store the Date and time.
Currency: The accuracy data type is up to 15 digits to the left of the decimal separator and up to 4 digits to the right of the same.
Auto number: This is a unique sequential number which automatically increase one by one . when we add new record then the filed which contain auto number data type automatically assign the value by one added to previous value.
Yes/No: Yes and No values, store the data in shape of True or false / Yes or No / Activated / Deactivated.
OLE Object: an object such as a Microsoft Excel spreadsheet, a Microsoft Word document, graphics, images, sounds, or other binaries.
Hyperlink: text or a combination of text and numbers stored as text and used as a hyperlink address. A Hyperlink is a text or graphic that you click to go to a file, a location in a file, a web page on the Internet, or a web page on an intranet.
in Access 2007 we can create new database in two way :
Create a new Database from template.
Create a new Blank Database.
In MS access there is a wide variety of templates that you can use to create your database . This very easy process and you can save your time. A template is a Pre design database in which every thing already define like that tables, queries, forms, and reports which are needed to perform a specific task. Some templates contain a few sample records to help demonstrate their use. You can also customize these templates as you need.
Creating Process:
Open MS Access Application. or if you already open then Click the Microsoft Office Button and Click on New.
Chose Type of database
Type file name to save it.
Click on create button.
If you want to create Blank database and want to define every thing your self then don't use template. The following procedure is used to create a new blank database:
Open MS Access Application. or if you already open then Click the Microsoft Office Button and Click New.
Click the New Blank Database icon.
Type the name for the database which you want.
Click Create button.
in MS Access you create a new table in Three ways below we disuse each of thes in detail:
Creating a table in Design
Creating a table in Datasheet View
Creating a Table Through Table Templates
Creating a Table in Design
Create A new database or open an existing database in MS excel 2007
Click on CREATE Tab on the Access ribbon.
Select Table Design Option from Tables Group of office Ribbon.
In next appearing screen Add Field Name and Select its Data type and add the description if you want other wise leave description. For example Rno as filed name and Number as Data type.
Set The Some properties of each field form Field Properties Windows Section by clicking on General tab. For example Field Size Field format, default value etc. You can also set a Primary key from one filed.
Now Save This Table by click on Save Icon form Quick Access tool Bar or Form Office Button or Press CTRl + S key form Keyboard.
Give a name to your table and Click Ok Button.
Create Table In Datasheet View
The process of Creating a new table in datasheet view is given below:
Create A new database or open an existing database in MS excel 2007
click on CREATE Tab on the Access ribbon.
Select Table from Tables Group of office Ribbon.
Datasheet view will be open .The new table opens automatically in Datasheet view. You can add your fields by double-click the first field header and enter the Name for the field. When you finish, press ENTER.
Now Save This Table by click on Save Icon form Quick Access tool Bar or Form Office Button or Press CTRl + S key form Keyboard.
Give a name to your table and Click Ok Button.
Create Table Through Table Templates
In MS Access you can also create a new table Through Table Templates. Datasheet view which provides a visual way to create a new table. A Table template are Pre design Tables in which Fields and properties are already set you just select category of table.
Create A new database or open an existing database in MS excel 2007
click on CREATE Tab on the Access ribbon.
Click Little arrow on Table Templates from Tables Group of office Ribbon.
Select The Category.
The New table is Created .
Now Save This Table by click on Save Icon form Quick Access tool Bar or Form Office Button or Press CTRl + S key form Keyboard.
Give a name to your table and Click Ok Button.
The following process is used to enter the data in Table:
The Process of creating new relation ship between table is as fellow:
Click on Database Tools Tab on the Access ribbon. Then click the Relationships button.
The Show Tables dialog box will appear.
Now add the relational tables by selecting table name which you want to add and click on add button. You can also select multiple tables by Pressing Control and select each table one by one and then click on add button.
Now Create relation ship between tables .First, you will need to identify the primary key and the foreign key in the relationship.
Once you identified them, click on the primary key and drag it to the foreign key. You will then see the Edit Relationships dialog and select the relation type etc.
Once you will finish, click the Create button to close the Edit Relationships dialog.
In Access where table holed the record and Query is command which is use to access and manipulate the record form one or more then one table. The query is most essential component of a database. you can apply filter With a query , so that its restrict the user that he only get the information which you want.
This is the most common type of query.
Select Query
The select query is used to display the record form one or more then one table. When we execute Select query then its gets the record form physical database table and put in logical table in which you can also make change. You can also define criteria that tells the database which record you want to select.
Action Query
The query in which we perform some operation on table like that delete, update, insert data, and to create a new table from one existing table is called action query. Action queries are very important in data management because you can change more then one record at a time.
Four kinds of action queries are:
Append Query
: Its add the result in existing table.
Delete Query : Its delete the records.
Create Table Query : its creates a new table
based on the set results of a query.
Update Query : Its allows for one or more field
in your table to be updated.
Aggregate Query
This type of query is used when we perform some function like that sum the records , get the max record from table. Aggregate query work on other queries such as selection or action. Some of SQL aggregate functions available to Microsoft Access are Sum ,Avg, Min, Max, First etc
Cross Tab Query
The cross tab query is struck in form of matrix. in cross tab query the column heading are create form some table values. It usually involves aggregation of data means that Cross tab queries summarize the values of physical table and then group them by two sets of facts Row and Column.
In Access 2007 we have Two ways to create a Query.
Creating Query using the Query Wizard
Creating Query In Design View
Creating Queries using the Query Wizard In Access 2007
Creating Queries In design View In Access 2007
The following process is used to create query in Design view:
In the Query Design view, click the Criteria row in the desired field's column and type the criteria you want to use. For example if you have a column Name and have a value Saleem then you can add criteria as
=Slaeem
So the in the result the only those record selected where name is equal to saleem.
Creating Cross Tab Queries In Access 2007
The following process is used to create query in Design view:
When data from more than one table in the database is required, a join condition is used. Rows in a table can be joined to rows, in another table according to common values existing in the corresponding columns, i.e., usually the primary and foreign key columns.
A join is nothing more than writing a query that takes a set of rows from one or more tables and combines them together.
Types of Join
Inner Joining
If you want to show only those rows that have matching values in the joined field, you use an inner join. Access creates inner joins automatically.
Inner joins are the most common type of join. They tell a query that rows from one of the joined tables correspond to rows in the other table, on the basis of the data in the joined fields. When a query with an inner join is run, only those rows where a common value exists in both of the joined tables will be included in the query operations.
Outer Joining
Outer joins tell a query that although some of the rows on both sides of the join correspond exactly, the query should include all of the rows from one table, and also those rows from the other table that share a common value on both sides of the join.
Full Outer Joining
When you want to show all rows from two tables and join them based on common values, you use a full outer join.
Cross joins
Cross joins are different from inner and outer joins in that they are not explicitly represented in Office Access 2007. In a cross join, each row from one table is combined with each row from another table, resulting in what is called a cross product or a Cartesian product. Any time you run a query that has tables that are not explicitly joined, a cross product is the result. Cross joins are usually unintentional, but there are cases where they can be useful.
There are tow terminology are used in database one is Relationships and other is joins. These two Relationships and joins are not same . A relationship is a set of rules that enforces referential integrity. How you can add and delete data. For example, if you delete a supplier, referential integrity controls whether Access removes the products related to that supplier.
In contrast, a join describes how your data must match in order to be included in a record set. For example, one type of joins returns data from a source only when it finds matching records in another, and we'll show you what that means in the next section.
You only use joins in queries, and Access lets you use joins in ways that you can't use relationships. For example, you can delete joins without harming your database, but deleting a relationship will break part or all of that database. What's more, you can add joins where no table relationships exist. For example, you can join a table with a query, provided each has a field with a compatible data type.
Form is any easy way to enter, view, update and delete the data from database. You can Easily create the Entry Form using different tools in access 2007. in MS access there are number of way to create a form in Access 2007.
Creating Form through Wizard
Creating Form In Design View
If you have create a form for view purpose then you must add some navigation button on your form To move to the next record or previous record etc.
If you have create a form for entry purpose the first create a button form which you can add the record in database table.
The list box is Input tool when you want to limited the user that rather user write the input values, he select the values from some predefine values . Then you can use a List Box for this purpose. A List box control displays a list of values or choices and use can select one of them form this list. The list box contains rows of data. If the list has more rows than can be displayed in the control, Access displays a scroll bar in the control.
The process of creating a list box in form
combo box is also behave like a List Box but its take little space as one row. when you click on a little arrow on the combo box the pull down list will be open.
The process of creating a Combo box in form
A check box is graphical input which have two stat ON/Yes or OFF/No . If a check box is selected then its ON/Yes and have value 1 other wise its OFF/NO and have value 0.
The process of creating a Combo box in form
Draw a box where you wish to place the new checkbox.
After finishing the new checkbox appear with field label.
Right-click on the new created checkbox.
From the drop-down menu select Properties.
The checkbox Properties window will appear on right side of the working window.
Click on the Data Tab.
Click on Little arrow located next to the box labeled Control Source and select the field you wish to link with new check box form the drop-down menu.
The stat of the Check box must set Yes/No.
Give the Label for your new checkbox.
Creating a Radio Button
Radio buttons also called option buttons which is used to user input in form of YES or NO. If The radio Button Check then its stat is ON/Yes other wise its stat is OFF/NO. In a group of check box you can select more then one check box ON but in group of Option buttons only one option button have stat ON/Yes.
The process of Creating a Radio Button in form
Draw a box where you wish to place the new Radio Button.
After finishing the new Radio Button appear with field label.
Right-click on the new created Radio Button.
From the drop-down menu select Properties.
The Radio Button Properties window will appear on right side of the working window.
Click on the Data Tab.
Click on Little arrow located next to the box labeled Control Source and select the field you wish to link with new Radio Button form the drop-down menu.
The stat of the Radio Button must set Yes/No.
Give the Label for your new Radio Button.
With Form you can get the data form database on Computer Screen but if any one view form away from computer then you can use A report. Report is use to get information in such a way that you can print it in shape of hard copy of the document.
You can create report using by wizard or in design view
Following process is used for printing the report:
Open your Database in Microsoft Access.
Open The Report by double clicking on the report name from Navigation Pane .
Click on the Office button and then Select Print.
Select a printer in the Print dialog box and also set some necessary option. after this close the printer properties box.
Now Click on Print button.
Notes of Computer Network
Notes of MS Access
Notes of Adobe Photoshop For DIT
Notes of Inpage
Notes of Database
Notes of E-Commerce
Notes of Web Technology / HTML
Notes of Microsoft Word 2007
Notes of MS Excel 2007
Notes of C Language
Notes of Operating System For DIT
Notes of information technology Part -1
Notes of information technology Part -2
Notes of CorelDraw
Notes of Power Point