Beruflich Dokumente
Kultur Dokumente
A. Data:
Data is distinct pieces of information, usually formatted in a special way. All software is
divided into two general categories: data and programs. Programs are collections of
instructions for manipulating data.
Data can exist in a variety of forms- as numbers or text on pieces of paper, as bits and bytes
stored in electronic memory, or as facts stored in a persons mind.
Strictly speaking, data is the plural or datum, a single piece of information. In practice,
however, people use data as both the singular and plural form of the word.
The term data is often used to distinguish binary machine- readable information from textual
human- readable information. For example, some applications make a distinction between
data files (files that contain binary data) and text files (files that contain ASCII data).
In database management systems, data files are the files that store the database information,
whereas other files, such as index files and data dictionaries, store administrative information,
known as metadata.
For example: life insurance companies use certain data, such as sex, age and health to make
their insurance rates applicable to each individual.
B. Information:
Knowledge or facts learned, especially about a certain subject or event. The act of informing
or the condition of being informed, communication of knowledge, safety instructions are
1 | Page
C. Data base:
A data base is basically a collection of information organized in such a way that a computer
program can quickly select desired pieces of data. Data base as an electronic filing system.
Data base are structured to facilitate the storage, retrieval, modification and deletion of data
in conjunction with various data processing operations. A data base management system
(DBMS) extracts information from the data base in response to queries.
Traditional data bases are organized by fields, records, and files. A field is a single piece of
information, a record is one complete set of fields, and a file is a collection of records. For
2 | Page
example, a telephone book is analogous to a file. It contains a list of records, each of which
consists of three fields: name, address, and telephone number.
An alternative concept in data base design is known as Hypertext. In a Hypertext database,
any object, it is a piece of text, a picture, or a film, can be linked to any other object.
Hypertext database are particularly useful for organizing large amounts of disparate
information, but they are not designed for numerical analysis.
To access information from a database, you need a database management system (DBMS).
This is a collection of programs that enables you to enter, organize, and select data in a
database.
Increasingly, the term database is used as shorthand for database management system. There
are many different types of DBMSs, ranging from small systems that run on mainframes.
For example: in order to figure out if the man was who he said he was, I had to check this
massive database with a lot of names in it.
You need to make sure that your company has a big enough database to handle all of the
information that you gather. When constructing a database makes sure you include all
pertinent information about the customer that salesman may need to know, include any
quirks, or extra attention the customer may require.
a) Importance of Data base:
1) Database development and maintenance:
A flat holds all of the information about a record. The name, address, phone number,
meeting attendance, publications ordered, committee membership, and any other information
you choose is kept in a single database. A flat database is very easy to manage. All the
information is stored in one source. You can see how many board members have e- mail
addresses, or how many donors are also volunteers. You can create a variety of different ways
to look at the data with input screens, reports, mailing lists and special queries.
The limits of a flat database are not in the number of records you can put in, but in how much
information you can track per record. As your organization grows, and more people need to
track a great deal of different information about each record, you may want to change to
3 | Page
using a rational or shared database. This allows one of your staff to track meeting attendance
and program involvement in detail, while another may search detailed information about each
records donation history. But you do not need this when you are starting up. Go with a
simple, reliable data base program.
2) Shopping for database software:
When shopping for database software, make sure that it at least meets these basic criteria:
a) It can work on the computer you have in-house.
b) It allows the user to change, add or delete fields of information. Your organization
may have a particular information interest in a particular group, and no specialised
software can anticipate every organisations every need.
3) Specialised Data base software:
Once your organization has out- grown the data base program you are currently using, you
will need to consider the purchase of a more complex data management system. Before you
invest in specialised database software consider the following:
a) Make a list of the features and qualities needed.
b) Request a demonstration of the software from the company that markets it. If a
supplier is reluctant to provide in- house training, re- examines this purchase.
c) The idea of designing and using a database can be intimidating, but the reality is
completely different. Data base make sense, they bring and maintain order, they
force the user to think in a very logical and linear path, and they are flexible. A
database is truly an invaluable tool for any organization.
Advantages of data base system:
1)
2)
3)
4)
5)
6)
7)
b)
4 | Page
A hierarchical database is a design that uses a one-to-many relationship for data elements.
Hierarchical database models use a tree structure that links a number of disparate elements to
one owner, or parent, primary record.
1) Data base (university of DB)
2) File (Non teaching, teaching, student)
3) Record/fields: records shows all information and fields specify different attributes like
age, marks of students)
4) Data items (particular marks of students)
Hierarchical Database Model
2) DBMS:
A. Introduction and meaning of DBMS:
A database management system is system software for creating and managing databases. The
DBMS provides users and programmers with a systematic way to create, retrieve, update and
manage data.
A DBMS makes it possible for end users to create, read, update and delete data in a database.
The DBMS essentially serves as an interface between the data base and end users or
5 | Page
application programs, ensuring that data is consistently organized and remains easily
accessible.
The DBMS manages three important things: the data, the database engine that allows data to
be accessed, locked and modified, and the database scheme, which defines the databases
logical structure. These three foundational elements help provide concurrency, security, data
integrity and uniform administration procedures. The DBMS is perhaps most useful for
providing a centralized view of data that can be accessed by multiple users, from multiple
locations, in a controlled manner. A DBMS can limit what data the end user sees, as well as
how that and user can view the data, providing many views of a single database schema. End
users and software programs are free from having to understand where the data is physically
located or on what type of storage media it resides because the DBMS handles all requests.
The DBMS can offer both logical and physical data independence. That means it can protect
users and applications from needing to know where data is stored or having to be concerned
about changes to the physical structure of data. As long as programs use the application
programming interface for the database that is provided by the DBMS, developers wont have
to modify programs just because changes have been made to the database.
NAME
AGE
ADDRESS
SALARY
Ramesh
32
Ahmedabad
2000
Khilan
25
Delhi
1500
Kaushik
23
Kota
2000
Chitali
25
Mumbai
6500
Hardik
27
Bhopal
8500
Komal
22
MP
4500
Muffy
24
Indore
10000
1. Field:
Every table is broken up into smaller entities called fields. The fields in the CUSTOMERS
table consist of ID, NAME, AGE, ADDRESS and SALARY.
A filed is a column in a table that is designed to maintain specific information about every
record in the table.
7 | Page
2. Record or Row:
A record, also called a row of data, is each individual entry that exists in a table. For example
there are 7 records in the above CUSTOMERS table. Following is a single row of data or
record in the CUSTOMERS table:
1
Ramesh
32
Ahmedabad
2000
4. Tuple:
It is a logical related set of one or more fields.
5. Null value:
A Null value in a table is a value in a field that appears to be blank, which means a field with
a NULL value is a field with no value.
8 | Page
It is very important to understand that a Null value is different than a zero value or a field that
contains spaces. A field with a NULL value is one that has been left blank during record
creation.
SQL Constraints:
Constraints are the rules enforced on data columns on table. These are used to limit the type
of data that can go into a table. This ensures the accuracy and reliability of the data in the
database.
Constraints could be column level or table level. Column level constraints are applied only to
one column where as table level constraints are applied to the whole table.
Following are commonly used constraints available in SQL:
NOT NULL Constraint: ensures that a column cannot have Null value.
DEFAULT Constraint: provides a default value for a column when none I specified.
UNIQUE Constraint: ensures that all values in a column are different.
PRIMARY KEY: uniquely identified each rows/records in a database table.
Definition of Primary Key: it is an attribute or set o attributes that helps to uniquely identify
record in a relation. One record differentiates to other record. E.g., student id, name.
Conditions/Properties:a)
b)
c)
d)
9 | Page
Table:
Sr No.
Employee id
Name
Dep id
101
aa
D02
102
bb
D02
103
cc
D01
104
dd
Conditions/Properties:
a) It should act as a primary key in some other table. E.g. 2nd table.
b) It can contain a null value. E.g. in 1st table Dep. id- null value not but in 2nd table.
c) It can contain only the values from main domain on corresponding primary key. E.g. DOS
add create problem in system so not used in it.
CHECK Constraint: the CHECK constraint ensures that all values in a column satisfy certain
conditions.
INDEX
: use to create and retrieve data from the database very quickly.
DATA Integrity
: The following categories of the data integrity exist with each RDBMS:
Entity Integrity
Domain Integrity
: Enforces valid entries for a given column by restricting the type, the
User- Defined Integrity: Enforces some specific business rules that do not fall into entity,
domain or referential integrity.
The table is an Access feature for define and use to store data. Each table contains
information about a particular subject, such as customers or orders. Table contains fields (or
columns) that store different kinds of data, such as a name or an address, and Records (for
rows) that collect all the information about a particular instance of the subject.
You can define a primary key (one or more fields that have a unique value for each record)
and, one or more indexes on each table to help retrieve your data more quickly.
5) Queries:
The query grid is the feature of Access that lets users fetch data from tables they have created.
Access displays lists of tables from which users can choose a table to query with the grid.
Users type names of the tables columns into the grid. They also type in the grid the criteria
that data must meet for Access to include it in the query results. The SQL window is a feature
of Access that offers an alternative to the query grid. User familiar with SQL syntax can enter
their statements in this window, then run the statements by clicking the Run button on the
toolbar. The Query Wizard is another feature for fetching data. When a user clicks the button
for this feature, Access creates SQL statements in response to user input in the Wizards
screens. Access users rely on this tool and the query grid for retrieving their stored data.
6) Form:
A form is the feature of Access designed primarily for data input or display or for control, of
application execution. You use forms to customize the presentation of data that your
application extracts for queries or tables. You can also print forms. You can decide a form to
run a macro or a Visual Basic Procedure in response to any of a number of events. For
example, to run a procedure when the value of data changes.
7) Data Access Page:
It includes an HTML file and supporting files to provide custom access to your data from
Microsoft Internet Explorer. You can publish these files on your company intranet to allow
other users on your network who also have Office 2000 and Internet Explorer version 5 or
later to view, search, and edit your data.
8) Macro:
12 | P a g e
It is a structured definition of one or more actions that you want Access to perform in
response to a defined event.
For example, you might design a macro that opens a second form in response to the selection
of an item on a main form. You might have another macro that validate the content of a field
whenever the value in the field changes. You can lead simple conditions in macros to specify
when one or more actions in the macro should be performed or skipped. You can use macros
to open and execute queries, to open tables, or to print or view reports. You can also run other
macros or visual Basic Procedures from within a macro.
9) Module:
It contains custom procedures that you code using Visual Basic. Modules provide a more
discrete flow of actions and allow you to trap errors something you cant do with macros.
Modules can be stand- alone objects containing functions that can be called from anywhere in
your application, or they can be directly associated with a form or a report to respond to
events on the associated form or report.
Table stores the data that you can extract with queries and display in reports or that you can
display and update in forms or data access pages. Notice that forms, reports, and data access
pages can use data either directly from tables or from a filtered view of the data created by
using queries. Queries can use visual, basic functions to provide customised calculations on
data in your database. Access also has many built- in functions that allow you to summarise
and format your data in queries. Event on forms and reports can trigger either macros or
Visual Basic procedures.
10) Event:
Event is any change in state of an Access object.
For example, you can write macros or Visual Basic procedures to respond to
a)
b)
c)
d)
11) Control:
Opening a form
Closing a form
Entering a new row on a form
Changing data in the current record
13 | P a g e
It is on a form or report that contains data. You can even design a macro or a Visual Basic
Procedure that responds to the user pressing individual keys on the keyboard when entering
data.
B. Creating a blank database:
1. Click on the blank access database button in the initial ms access dialog box
2. Click on the OK button, as a result, new database dialog box will be opened.
3. Specify the appropriate name in the file name text box and then click on create
button.
4. A crested database will appear in the ms access window.
14 | P a g e
D. Data type:
15 | P a g e
2.
Memo: Use for lengthy text and numbers, such as notes or descriptions. Stores up to
65,536 characters.
3. Number: Use for data to be included in mathematical calculations, except calculations
involving money (use currency type). Stores 1, 2, 4 or 8 bytes; stores 16 bytes for
Replication ID (GUID). The Field Size property defines the specific Number type.
4. Date/Time: Use for dates and times. Stores 8 bytes.
5. Currency: Use for currency values and to prevent rounding off during calculations.
Stores 8 bytes.
6. Auto Number: Use for unique sequential (incrementing by 1) or random numbers that
are automatically inserted when a record is added. Stores 4 bytes, stores 16 bytes; for
replication ID (GUID).
7. Yes/No: Use for data that can be only one of two possible values, Such as Yes/No,
True/False, On/Off. Null values are not allowed. Stores 1 bit.
8. Lookup wizard: in lookup wizard, the reoccurring things can be managed.
9. OLE object: Use for OLE objects (such as Microsoft Word documents, Microsoft Excel
Spreadsheets, pictures, sounds or other binary data) that were created in other programs
using the OLE protocol. Stores up to 1 gigabyte (limited by disk space).
10. Hyperlink: Use for hyperlinks. A hyperlink can be a UNC path or a URL. Stores up to
64,000 characters.
11. Attachments: it helps in attaching files
2)
Click the down- row in the first field on the field row and then select the tablename.*
In descending order:
17 | P a g e
Result :
18 | P a g e
3) Click the Run button. Access retrieves all the fields and records for the table and displays
them in Datasheet view.
Without Query:
F. Query Design:
1) Open a table or Query in Query Design View.
19 | P a g e
2) Click the down- row in the first field on the field row and then select the tablename.*
option. The table name appears on the table line.
3) Click the Run button. Access retrieves all the fields and records for the table and displays
them in Datasheet view.
Result:
20 | P a g e
Result:
21 | P a g e
22 | P a g e
Result:
23 | P a g e
Result:
24 | P a g e
Result:
25 | P a g e
26 | P a g e
Result:
27 | P a g e
Result:
28 | P a g e
29 | P a g e
2. Similarly create the second table with three fields. The emp no field is the same in the
both tables. Again, assign the primary key to the emp no field.
3. After creating the two tables select the relationship option from data base tools in the
main menu.
30 | P a g e
5. Drag the emp no field from the first table to the second table. Select all the three
options namely enforce referential integrity.
31 | P a g e
H. Forms:
Forms are used for entering, modifying and viewing records. You likely have had to fill out
forms on many occasions, like when visiting a doctors office, applying for a job, or
registering for school. The reason forms are used so often is that they are an easy way to
guide people toward entering data correctly. When you enter information into a form in
Access, the data goes exactly where the data base designer wants it to go, in one or more
related tables.
Forms make entering data easier. Working with extensive tables can be confusing, and when
you have connected tables you might need to work with more than one at a time to enter a set
of data. However, with forms its possible to enter data into multiple tables at once, all in one
place. Data base designers can even set restrictions on individual form components to ensure
all of the needed data is entered in the correct format. All in all, forms help keep data
consistent and organized, which I essential for an accurate and powerful data base.
Using a Form Wizard:
1)
2)
3)
Click the New button at the top of the Data Sheet view.
Choose Form Wizard from the list of options.
Click ok to begin the Wizard.
In the first step of Wizard, you are asked to specify which fields will be used in the form.
32 | P a g e
4)
Click the button to select all of the fields for use in the form all of the fields
5)
6)
7)
8)
The last step in the Wizard asks you to specify the name for the form. When you click Finish,
the form is automatically saved with that name.
9)
Close the form. There is no need to save it since it was saved at the end of
wizard.
I. Reports:
Reports offer you the ability to present your data in print. If you have ever received a
computer printout of a class schedule or a printed invoice of a purchase, you have seen a data
base report. Reports are useful because they allow you to present components of your data
base in an easy- to- read format. You can even customize a reports appearance to make it
visually appealing. Access offers you the ability to create a report from any table or query.
33 | P a g e
Creating a report is very similar to creating a form a like a form, can be done using following
method:
a)
b)
c)
d)
1)
2)
3)
Make sure you are in the forms section of the Data base Window.
Click the New button at the top of the Data base Window.
Select Auto Report: Tabular and make sure the employee id table is selected as
4)
the source.
Click Ok to create the report. The report will appear in Print Preview ready for
printing.
Redundant data wastes disk space and creates maintenance problems. If data that exists in
more than one place must be changed, the data must be changed in exactly the same way in
all locations. A customer address change is much easier to implement if that data is stored
only in the customers table and nowhere else in the data base.
What is an inconsistent dependency? While it is intuitive for a user to look in the customers
table for the address of a particular customer, it may not make sense to look there for the
salary of the employee who calls on that customer. The employees salary is related to, or
dependent on, the employee and thus should be moved to the employees table. Inconsistent
dependencies can make data difficult to access because the path to find the data may be
missing or broken.
There are a few rules for database normalization. Each rule is called a normal form. If the
first rule is observed, the data base is said to be in first normal form. If the first three rules
are observed, the data base considered to be in third normal form. Although other levels of
normalization are possible, third normal form is considered the highest level necessary for
most applications.
As with many formal rules and specifications, real world scenarios do not always allow for
perfect compliance. In general, normalization requires additional tables and some customers
find this cumbersome. If you decide to violate one of the first three rules of normalization,
make sure that your application anticipates any problems that could occur, such as redundant
data and inconsistent dependencies.
The following descriptions include examples:
First normal form:
a)
b)
c)
Do not use multiple fields in a single table to store similar data. For example, to track an
inventory item that may come from two possible sources, an inventory record may contain
fields for Vendor code 1 and Vendor code 2.
Second normal form:
35 | P a g e
a)
b)
Create separate tables for sets of values that apply to multiple records.
Relate these tables with a foreign key.
Records should not depend on anything other than a tables primary key. For example,
consider a customers address in an accounting system. The address is needed by the
customers table, but also by the orders, shipping, invoices, accounts receivables, and
collections tables. Instead of storing the customers address as a separate entry in each of
these tables, store it in one place, either in the customers table or in a separate addresses table.
Third normal form:
a)
Values in a record that are not part of that records key do not belong in the table. In general,
any time the contents of a group of fields may apply to more than a single record in the table,
consider placing those fields in a separate table.
For example, in an Employee Recruitment table, a candidates university name and address
may be included. But you need a complete list of universities for group mailings. If university
information is stored in the candidates table, there is no way to list universities table and link
in to the candidates table with a university code key.
36 | P a g e