You are on page 1of 24

COMPUTER PRACTICAL FILE

INTRODUCTION ABOUT MS ACCESS


A database is a collection of information that's related. Access allow you to manage your information in one database file. Within Access there are four major areas: Tables, Queries, Forms and Reports Tables store your data in your database Queries ask questions about information stored in your tables Forms allow you to view data stored in your tables Reports allow you to print data based on queries/tables that you have created Microsoft Access, also known as Microsoft Office Access, is a database management system from Microsoft that combines the relational Microsoft Jet Database Engine with a graphical user interface and software-development tools. It is a member of the Microsoft Office suite of applications, included in the Professional and higher editions or sold separately. On May 12, 2010, the current version of Microsoft Access 2010 was released by Microsoft in Office 2010; Microsoft Office Access 2007 was the prior version. Microsoft Access provides users with one of the simplest and most flexible DBMS solutions on the market today. Regular users of Microsoft products will enjoy the familiar Windows "look and feel" as well as the tight integration with other Microsoft Office family products. An abundance of wizards lessen the complexity of administrative tasks and the ever-present Microsoft Office Helper (you know the paper clip!) is available for those who care to use it.

DEFINE DATABASE AND LIST STEPS TO CREATE A DATABASE


A database is an application that manages data and allows fast storage and retrieval of that data. A database is a collection of information that is organized so that it can easily be accessed, managed, and updated. Computer databases typically contain aggregations of data records or files, such as sales transactions, product catalogs and inventories, and customer profiles. In computing, databases are sometimes classified according to their organizational approach. The most prevalent approach is the relational database, a tabular database in which data is defined so that it can be reorganized and accessed in a number of different ways. A distributed database is one that can be dispersed or replicated among different points in a network. An object-oriented programming database is one that is congruent with the data defined in object classes and subclasses. 1. Open Microsoft Access -Start -> Programs -> Microsoft Office -> Microsoft Access. 2. Click on File -> New. 3. On the new tab on the right, select "Blank database...". Once you click on it, a new dialog window will open asking for the location to store you first Access database. 4. Creating the database file. In this new window, select any location, give it any file name (maybe "AIRLINE MANAGEMNET SYSTEM") and click "Create".

CREATE A DATABASE FOR AIRLINE MANAGEMENT SYSTEM

Show steps to create one table using design (using snapshots)


1) Open Microsoft access..click on blank database and save it in the appropriate folder

2) Design view enables you to create the names of each column, specify the type of data that
can go into each column, as well as specifying any other restrictions you'd like to enforce. Restricting the data type for each column is very important and helps maintain data integrity. For example, it can prevent us from accidentally entering an email address into a field for storing the current date.

More parameters can be added against each column if you require them

3) Once you've created your table in "design view", you can switch to "datasheet view" to
see the resulting table. You should see something like this:

Following are the snapshots for other tables in datasheet view International departure

Domestic arrival

Domestic departure

RELATIONSHIP AMONG THE TABLES International arrivals International departures Domestic arrivals Domestic departures

CREATE THE FOLLOWING QUERIES


A "query" refers to the action of retrieving data from your database List the name of fl ight carrying more than 100 passengers 1. On the Message Bar, click Options. 2. In the Microsoft Office Security Options dialog box, click Enable this content, and then click OK.
Click on create tab and then further click on create query design,a box will apear showing the table select the tables and drag the appropriate fiels to the bottom option ; the filed name etc..open the sql view and type the command WHERE NOP >100 and using the design tab click on RUN option..then a filtered datasheet view of the result will appear

LIST OF PILOTS HAVING EXPERIENCE

2) MORE THAN 20 YRS

2)LESS THAN 20 YRS

PILOTS WHOSE NAMES START WITH THE LETTER C

LIST OF FLIGHTS DEPARTING FROM NEW DELHI TO LONDON

INTRODUCTION OF FORM OBJECT


Forms are like display cases in stores that make it easier to view or get the items that you want. Since forms are objects through which you or other users can add, edit, or display the data stored in your Access database, the design of your form is an important aspect. If you database is going to be used by multiple users, well-designed forms is essential for efficiency and data entry accuracy. STEPS OF CREATING A FORM USING FORM WIZARD

1. On the Create tab, in the Forms group, click More Forms, and then click Form Wizard. 2. Follow the directions on the pages of the Form Wizard. Then click Next or Finish to continue. 3. On the last page of the wizard, click Finish. The Form Wizard can create a variety of results depending on the options that you select. As a result, we recommend that you run the wizard several times, experimenting with different options each time, until you get the results that you want.

DEFINE NORMALIZATION AND ITS TYPES


Normalization is the process of organizing data into a related table; it also eliminates redundancy and increases the integrity which improves performance of the query. To normalize a database, we divide the database into tables can and establish be relationships defined as between the the practice tables. of

Database

normalization

essentially

optimizingtablestructures.Optimization is accomplished as a result of a thorough investigation of the various pieces of data that will be stored within the database, in particular concentrating upon how this data is interrelated. Normalization is a Six stage process - After the first stage, the data is said to be in first normal form, after the second, it is in second normal form, after the third, it is in third normal form and so on.

First Normal Form (1st NF) In 1st NF:


The table cells must be of single value. Eliminate repeating groups in individual tables. Create a separate table for each set of related data. Identify each set of related data with a primary key.

In 1NF relation the order of tuples (rows) and attributes (columns) does not matter.

Example: Order 1 2 3 4 Customer Rishabh Preeti Rishabh Rishabh Contact Person Manish Rohan Manish Manish Total 134.23 521.24 1042.42 928.53

The above relation satisfies the properties of a relation and is said to be in first normal form (or 1NF). Conceptually it is convenient to have all the information in one relation since it is then likely to be easier to query the database.

Second

Normal

Form

(2nd

NF)

In 2nd NF:

Remove Partial Dependencies. Functional Dependency: The value of one attribute in a table is determined entirely by the value of another. Partial Dependency: A type of functional dependency where an attribute is functionally dependent on only part of the primary key (primary key must be a composite key). Create separate table with the functionally dependent data and the part of the key on which it depends. Tables created at this step will usually contain descriptions of resources.

Definition: A relation is in 2NF if it is in 1NF and every non-key attribute is fully dependent on each candidate key of the relation.

Example:

The following relation is not in Second Normal Form: Order 1 2 3 4 Customer Rishabh Preeti Rishabh Rishabh Contact Person Manish Rohan Manish Manish Total 134.23 521.24 1042.42 928.53

In the table above, the order number serves as the primary key. Notice that the customer and total

amount are dependent upon the order number -- this data is specific to each order. However, the contact person is dependent upon the customer. An alternative way to accomplish this would be to create two tables: Customer Rishabh Preeti Contact Person Manish Rohan

Order Customer 1 2 3 4 Rishabh Preeti Rishabh Rishabh

Total 134.23 521.24 1042.42 928.53

The creation of two separate tables eliminates the dependency problem. In the first table, contact person is dependent upon the primary key -- customer name. The second table only includes the information unique to each order. Someone interested in the contact person for each order could obtain this information by performing a Join Operation.

Third

Normal

Form

(3rd

NF)

In 3rd NF:

Remove transitive dependencies. Transitive Dependency A type of functional dependency where an attribute is functionally dependent on an attribute other than the primary key. Thus its value is only indirectly determined by the primary key.

Create a separate table containing the attribute and the fields that are functionally dependent on it. Tables created at this step will usually contain descriptions of either resources or agents. Keep a copy of the key attribute in the original file.

A relation is in third normal form, if it is in 2NF and every non-key attribute of the relation is non-transitively dependent on each candidate key of the relation.

Boyce-Codd Normal Form (BCNF) In BCNF:


When a relation has more than one candidate key, anomalies may result even though the relation is in 3NF. 3NF does not deal satisfactorily with the case of a relation with overlapping candidate keys i.e. composite candidate keys with at least one attribute in common. BCNF is based on the concept of a determinant. A determinant is any attribute (simple or composite) on which some other attribute is fully functionally dependent. A relation is in BCNF is, and only if, every determinant is a candidate keyA relation is in Boyce-Codd Normal Form (BCNF) if every determinant is a candidate key.

An entity is in Fourth Normal Form (4NF) when it meets the requirement of being in Third Normal Form (3NF) and additionally:

Has no multiple sets of multi-valued dependencies. In other words, 4NF states that no entity can have more than a single one-to-many relationship within an entity if the one-to-many attributes are independent of each other. Many:many relationships are resolved independently.

Fourth Normal Form (4th NF) In 4th NF: An entity is in Fourth Normal Form (4NF) when it meets the requirement of being in Third Normal Form (3NF) and additionally:

Has no multiple sets of multi-valued dependencies. In other words, 4NF states that no entity can have more than a single one-to-many relationship within an entity if the one-to-many attributes are independent of each other.

Fourth Normal Form applies to situations involving many-to-many relationship Definition: A table is in fourth normal form (4NF) if and only if it is in BCNF and contains no more than one multi-valued dependency. Take an example of Employee Table info(Employee, Skills, Hobbies)

Employee 1 1 1 1 2 2 2 2

Skills Programming Programming Analysis Analysis Analysis Analysis Management Management

Hobbies Golf Bowling Golf Bowling Golf Gardening Golf Gardening

In 5th NF:

A relation that has a join dependency cannot be decomposed by a projection into other relations without spurious results A relation is in 5NF when its information content cannot be reconstructed from several smaller relations i.e. from relations having fewer attributes than the original relation Definition: A table is in fifth normal form (5NF) or Project-Join Normal Form (PJNF) if it is in 4NF and it cannot have a lossless decomposition into any number of smaller tables. Fifth normal form, also known as join-projection normal form (JPNF), states that no nontrivial join dependencies exist. 5NF states that any fact should be able to be reconstructed without any anomalous results in any case, regardless of the number of tables being joined. A 5NF table should have only candidate keys and it's primary key should consist of only a single column. Example:

Take an example of a buying table. This is used to track buyers, what they buy, and from whom they buy. Take the following sample data: Buyer Shalley Mary Shalley Mary Shalley Vendor Kashmir House Kashmir House Radhika Sarees Radhika Sarees Radhika Sarees Item Jeans Jeans Saree Saree Suit

USE OF REPORT IN DBMS AND STEPS TO CREATE A REPORT

A report is a database object that comes in handy when you want to present the information in your database for any of the following uses:

Display or distribute a summary of data. Archive snapshots of the data. Provide details about individual records. Create labels.
Reports offer a way to view, format, and summarize the information in your Microsoft Access database. For example, you can create a simple report of phone numbers for all your contacts, or a summary report on the total sales across different regions and time periods.

Step 1: Choose a record


if the data is from an existing table or query, select the table or query in the Navigation Pane, and then continue 2 open the create tab and Click the button for the tool you want to use. If a wizard appears, follow the steps in the wizard and click Finish on the last page. Access displays the report in Layout view.

CONCEPT OF :
A database key is a attribute utilized to sort and identify data in some manner. There are many keys: 1. Primary key: The primary key is a attribute of a relational table uniquely identifies the each tuple of a table or each record in the table. It can either be a normal attribute

that is guaranteed to be unique. Such as Social Security Number in a table with no more than one record per person. Examples: Imagine we have a employees table that contains a record for each employee at a organization. The employee's unique employee ID number would be a good choice for a primary key in the employees table. The employee's first and last name would not be a good choice, as there is always the chance that more than one employee might have the same name. 2. Foreign Key: These keys are used to create relationships between tables. Natural relationships exist between tables in most database structures. Example: Lets assume that the Departments table uses the Department Name column as the primary key. To create a relationship between the two tables, we add a new column to the Employees table called Department. We then fill in the name of the department to which each employee belongs. We also inform the database management system that the Department column in the Employees table is a foreign key that references the Departments table. The database will then enforce referential integrity by ensuring that all of the values in the Departments column of the Employees table have corresponding entries in the Departments table. 3. Candidate key, Alternate key and Composite key: Any number of attributes that are uniquely identifying a row in a table is candidate key for the table. We select one of the candidate key as Primary key. All candidate keys which are not chosen as "primary key" are Alternate keys. The key which uniquely identify the rows of the table and which is made up of more than one attribute is called composite key. For Example: In a class we have to select Class Representative. So A, B, C and D stand for that post. So A, B, C and D are candidate for Class Representative so these are candidate key. We select B as Class Representative so B is primary key and A, C and D can be Class Representative but not selected as a Class Representative so they are alternative choice. So A, C and D are alternate key. When two students of class work together in a project then they are composite key for the class.

You might also like