Database Management On Online Ticket Booking

download Database Management On Online Ticket Booking

of 29

Transcript of Database Management On Online Ticket Booking

  • 8/3/2019 Database Management On Online Ticket Booking

    1/29

    Database

    A database is an organized collection ofdata for one or more purposes,usually in digital form. The data are typically organized to modelrelevant aspects of reality (for example, the availability of rooms inhotels), in a way that supports processes requiring this information (forexample, finding a hotel with vacancies). The term "database" refersboth to the way its users view it, and to the logical and physicalmaterialization of its data, content, in files, computer memory,and computer data storage. This definition is very general, and isindependent of the technology used. However, not every collection of

    data is a database; the term database implies that the data is managed tosome level of quality (measured in terms of accuracy, availability,usability, and resilience) and this in turn often implies the use of ageneral-purpose Database management system (DBMS). A general-purpose DBMS is typically a complex software system that meets manyusage requirements, and the databases that it maintains are often largeand complex. The utilization of databases is now spread to such a widedegree that virtually every technology and product relies on databases

    and dbmss for its development and commercialization, or even may havesuch embedded in it. Also, organizations and companies, from small tolarge, heavily depend on databases for their operations.

    The term database is correctly applied to the data and their containingdata structures, and not to the DBMS which is a software system used tomanage the data. The structure of a database is generally too complex to

    be handled without its DBMS, and any attempt to do otherwise is verylikely to result in database corruption. Dbmss are packaged as computersoftware products: well-known and highly utilized products includethe Oracle DBMS, Access and SQLServer from Microsoft, DB2 from IBM and the Opensource DBMS mysql. Each such DBMS product currently supports

    http://en.wikipedia.org/wiki/Datahttp://en.wikipedia.org/wiki/Computer_memoryhttp://en.wikipedia.org/wiki/Computer_data_storagehttp://en.wikipedia.org/wiki/Database_management_systemhttp://en.wikipedia.org/wiki/Computer_softwarehttp://en.wikipedia.org/wiki/Computer_softwarehttp://en.wikipedia.org/wiki/Computer_softwarehttp://en.wikipedia.org/wiki/Oracle_Corporationhttp://en.wikipedia.org/wiki/Microsoft_accesshttp://en.wikipedia.org/wiki/Microsoft_SQL_Serverhttp://en.wikipedia.org/wiki/Microsoft_SQL_Serverhttp://en.wikipedia.org/wiki/Microsofthttp://en.wikipedia.org/wiki/IBM_DB2http://en.wikipedia.org/wiki/IBMhttp://en.wikipedia.org/wiki/Open_sourcehttp://en.wikipedia.org/wiki/Open_sourcehttp://en.wikipedia.org/wiki/MySQLhttp://en.wikipedia.org/wiki/MySQLhttp://en.wikipedia.org/wiki/Open_sourcehttp://en.wikipedia.org/wiki/Open_sourcehttp://en.wikipedia.org/wiki/IBMhttp://en.wikipedia.org/wiki/IBM_DB2http://en.wikipedia.org/wiki/Microsofthttp://en.wikipedia.org/wiki/Microsoft_SQL_Serverhttp://en.wikipedia.org/wiki/Microsoft_SQL_Serverhttp://en.wikipedia.org/wiki/Microsoft_accesshttp://en.wikipedia.org/wiki/Oracle_Corporationhttp://en.wikipedia.org/wiki/Computer_softwarehttp://en.wikipedia.org/wiki/Computer_softwarehttp://en.wikipedia.org/wiki/Computer_softwarehttp://en.wikipedia.org/wiki/Database_management_systemhttp://en.wikipedia.org/wiki/Computer_data_storagehttp://en.wikipedia.org/wiki/Computer_memoryhttp://en.wikipedia.org/wiki/Data
  • 8/3/2019 Database Management On Online Ticket Booking

    2/29

    many thousands of databases all over the world. The stored data in adatabase is not generally portable across different DBMS, but differentdbmss can inter-operate to some degree (while each DBMS typecontrols a database of its own database type) to support together a single

    application using standards like SQL(Structured QueryLanguage)and ODBC(Open Database Connectivity). A successfulgeneral-purpose DBMS is designed in such a way that it can satisfy asmany different applications and application designers and builders aspossible. A DBMS also needs to provide effective run-time execution toproperly support (e.g., in terms ofperformance, availability,and security) as many end-users (the database's application users) asneeded. Sometimes the combination of a database and its respective

    DBMS is referred to as a Database system (DBS).

    A DBMS is a set ofsoftware programs that controls thesystem organization, storage, management, and retrieval of data indatabase. Dbmss are categorized according to their data structures ortypes. The DBMS accepts requests for data from an application programand instructs the operating system to transfer the appropriate data.

    The queries and responses must be submitted and received according toa format that conforms to one or more applicable protocols. When aDBMS is used, information can be changed more easily as theorganization's information requirements change. New categories of datacan be added to the database without disruption to the existing system.

    A DBMS allows different user application programs to concurrentlyaccess the same database. Dbmss may use a variety ofdatabase models,such as the relational model or object model, to conveniently describe

    and support applications. It typically supports query languages, whichare in fact high-level programming languages, dedicated databaselanguages that considerably simplify writing database applicationprograms. Database languages also simplify the database organization aswell as retrieving and presenting information from it. A DBMS providesfacilities for controlling data access, enforcing data integrity,

    http://en.wikipedia.org/wiki/Software_portabilityhttp://en.wikipedia.org/wiki/Interoperationhttp://en.wikipedia.org/wiki/Technical_standardhttp://en.wikipedia.org/wiki/ODBChttp://en.wikipedia.org/wiki/Run_time_(program_lifecycle_phase)http://en.wikipedia.org/wiki/IT_Performance_Managementhttp://en.wikipedia.org/wiki/Availabilityhttp://en.wikipedia.org/wiki/Securityhttp://en.wikipedia.org/wiki/End-userhttp://en.wikipedia.org/wiki/Database_systemhttp://en.wikipedia.org/wiki/Software_programhttp://en.wikipedia.org/wiki/Organizationhttp://en.wikipedia.org/wiki/Computer_storagehttp://en.wikipedia.org/wiki/Information_retrievalhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Information_retrievalhttp://en.wikipedia.org/wiki/Database_modelhttp://en.wikipedia.org/wiki/Relational_modelhttp://en.wikipedia.org/wiki/Object_databasehttp://en.wikipedia.org/wiki/Query_languagehttp://en.wikipedia.org/wiki/Data_accesshttp://en.wikipedia.org/wiki/Data_integrityhttp://en.wikipedia.org/wiki/Data_integrityhttp://en.wikipedia.org/wiki/Data_accesshttp://en.wikipedia.org/wiki/Query_languagehttp://en.wikipedia.org/wiki/Object_databasehttp://en.wikipedia.org/wiki/Relational_modelhttp://en.wikipedia.org/wiki/Database_modelhttp://en.wikipedia.org/wiki/Information_retrievalhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Information_retrievalhttp://en.wikipedia.org/wiki/Computer_storagehttp://en.wikipedia.org/wiki/Organizationhttp://en.wikipedia.org/wiki/Software_programhttp://en.wikipedia.org/wiki/Database_systemhttp://en.wikipedia.org/wiki/End-userhttp://en.wikipedia.org/wiki/Securityhttp://en.wikipedia.org/wiki/Availabilityhttp://en.wikipedia.org/wiki/IT_Performance_Managementhttp://en.wikipedia.org/wiki/Run_time_(program_lifecycle_phase)http://en.wikipedia.org/wiki/ODBChttp://en.wikipedia.org/wiki/Technical_standardhttp://en.wikipedia.org/wiki/Interoperationhttp://en.wikipedia.org/wiki/Software_portability
  • 8/3/2019 Database Management On Online Ticket Booking

    3/29

    managing control, recovering the database after failures and restoring itfrom backup files, as well as maintaining database security.

    A Basic introduction to Microsoft Access

    Ms. Access is a database management tool that enables one to have goodcommand of data collected. The programme enables one to retrieve, sort,summarize and report results speedily and effectively. It can combinedata from various files through creating relationships,

    And can make data entry more efficient and accurate.

    Microsoft Access (MS Access) enables one to manage all importantinformation from a single database file. Within the file, one can use:

    Tables: - Tables are the data storage facilities in Ms Access. Each tablecontains rows called records and columns called fields.

    Queries to find and retrieve specific data of interest.

    Forms to view, add, and update data in tables.

    Reports to analyze or print data in a specific layout.

    Data access pages to view or update, the data.

    In MS Access, data is stored once in one table, but can be viewed frommultiple locations.

    When the data is updated in a Table, Query or Form, it is automaticallyupdated everywhere it appears.

    Table:-

    Tables are the data storage facilities in Ms Access. Each table containsrows called records and columns called fields.

    http://en.wikipedia.org/wiki/Securityhttp://en.wikipedia.org/wiki/Security
  • 8/3/2019 Database Management On Online Ticket Booking

    4/29

    A record is a collection of facts about a particular animal or event. Eachrecord in a table should be unique. To distinguish one record fromanother, tables can contain a primary key field.

    A field is a single kind of fact that may apply to each animal or event.For example, date of birth is a field in a table on animal information.

    The fields in a database have settings that determine the

    -type of data they can store,

    -how the data is displayed,

    - what can be done with the data.

    For example, field settings can ensure that birth dates are entered withtwo numbers for the month, two numbers for the day, four numbers forthe year, and slashes in between: 01/04/2006.

    One important setting for fields is the data type, which could be anumber, text, currency, and date/time.

    Data types in Microsoft Access

    Text:-

    Use for text or combinations of text and numbers, such as addresses, orfor numbers that do not require calculations, such as phone numbers,part numbers, or postal codes.

    It can store up to 255 characters. The Field Size property controls themaximum number of characters that can be entered.

    Memo:-

    Use for lengthy text and numbers, such as notes or descriptions.

    It can store up to 65,536 characters.

  • 8/3/2019 Database Management On Online Ticket Booking

    5/29

    Number:-

    Use for data to be included in mathematical calculations, exceptcalculations involving money (use Currency type).

    It can store 1, 2, 4, or 8 bytes; stores 16 bytes for Replication ID(GUID). The Field Size property defines the specific Number type.

    Date/Time:-

    Use for dates and times.

    It can store 8 bytes.

    Currency:-

    Use for currency values and to prevent rounding off during calculations.

    It can store 8 bytes.

    Autonumber:-

    Use for unique sequential (incrementing by 1) or random numbers thatare automatically inserted when a record is added.

    It can store 4 bytes; stores 16 bytes for Replication ID (GUID).

    Yes/No:-

    Use for data that can be only one of two possible values, such asYes/No, True/False, On/Off. Null values are not allowed.

    It can store 1 bit.

  • 8/3/2019 Database Management On Online Ticket Booking

    6/29

    OLE Object:-

    Use for OLE objects (such as Microsoft Word documents, MicrosoftExcel spreadsheets, pictures, sounds, or other binary data) that were

    created in other programs using the OLE protocol.

    It can store up to 1 gigabyte (limited by disk space).

    Hyperlink

    Use for hyperlinks. A hyperlink can be a UNC path or a URL.

    It can store up to 64,000 characters.

    Lookup Wizard

    Allows to select values or types from other tables.

    Field Properties:-

    After you create a field and set its data type, you can set additional field

    properties. The field's data type determines which other properties youcan set. For example, you can control the size of a Text field by settingits Field Size property.

    For Number and Currency fields, the Field Size property is particularlyimportant, because it determines the range of field values. For example,a one-bit Number field can store only integers ranging from 0 to 255.

    The Field Size property also determines how much disk space each

    Number field value requires. Depending on the field size, the numbercan take up exactly 1, 2, 4, 8, 12, or 16 bytes.

    Text and Memo fields have variable field value sizes. For these datatypes, field Size sets the maximum space available for any one value.

  • 8/3/2019 Database Management On Online Ticket Booking

    7/29

    Fields also have properties that control the details of information insidethem, including a default value, and a validation rule that makes sure thedata meets certain criteria.

    Autonumber allows the following field properties:-

    Caption:-The label text that is displayed for this field by default informs, reports, and queries. If this property is empty, the name ofthe field is used. Any text string is allowed.

    Field Size:-Determines the amount of space that is allocated foreach value. For autonumber fields, only two values are allowed:

    The Long Integer field size is used for autonumber fields that arenot used as replication ids. This is the default value. You should notchange this value unless you are creating a replication ID field.

    Replication is not supported in databases that use a new file format,such as .accdb.This setting makes autonumber fields compatible with other LongInteger Number fields when they are used in relationships or joins.

    Each field value requires 4 bytes of storage.The Replication ID field size is used for autonumber fields that areused as replication ids in a database replica. Do not use this valueunless you are working in or implementing the design of areplicated database.

    Each field value requires 16 bytes of storage.

    Format:- If you are using an autonumber field as a primary key or as a

    Replication ID, you should not set this property. Otherwise,choose a number format that meets your specific needs.

    Indexed:- Specifies whether the field has an index. There are threeavailable values:

    Yes (No duplicates) Creates a unique index on the field.

    http://appendpopup%28this%2C%2723515614_13%27%29/http://appendpopup%28this%2C%2723515614_13%27%29/
  • 8/3/2019 Database Management On Online Ticket Booking

    8/29

    Yes (Duplicates OK) Creates a non-unique index on thefield.No Removes any index on the field.

    Do not change this property for a field that is used in aprimary key. Without a unique index, it is possible to enterduplicate values, which can break any relationships in whichthe key is a part.

    Although you can create an index on a single field by settingthe Indexed field property, some types of indexes cannot becreated in this way. For example, you cannot create a multi-field index by setting this property.

    NewValues:-

    Determines whether an autonumber field increments witheach new value or uses random numbers. Select one of thefollowing:

    Increment Starts with the value 1 and incrementallyincreases by 1 for each new record.Random Starts with a random value and assigns a random

    value to each new record. Values are of the Long Integerfield size, and range from -2,147,483,648 to 2,147,483,647.

    Currency allows the following field properties:-

    Caption:- The label text that is displayed for this field by default informs, reports, and queries. If this property is empty, the

    name of the field is used. Any text string is allowed.

    DecimalPlaces

    Specifies the number of decimal places to use whendisplaying numbers.

  • 8/3/2019 Database Management On Online Ticket Booking

    9/29

    DefaultValue

    Automatically assigns the specified value to this field whena new record is added.

    Format Determines the way that the field appears when it is

    displayed or printed in datasheets or in forms or reportsthat are bound to the field. You can use any valid numberformat. In most cases, you should set the Format valueto Currency.

    Indexed Specifies whether the field has an index. There are threeavailable values:

    Yes (No duplicates) Creates a unique index on the field.Yes (Duplicates OK) Creates a non-unique index on thefield.No Removes any index on the field.

    NOTE Do not change this property for a field that is usedin a primary key.

    Although you can create an index on a single field bysetting the Indexed field property, some types of indexescannot be created in this way. For example, you cannotcreate a multi-field index by setting this property.

    Input Mask Displays editing characters to guide data entry. Forexample, an input mask might display a dollar sign ($) atthe beginning of the field.

    Required Requires that data be entered in the field.

    Smart Tags Attaches a smart tag to the field.

    Text Align Specifies the default alignment of text within a control.

    ValidationRule

    Supplies an expression that must be true whenever you addor change the value in this field. Use in conjunction with

    http://appendpopup%28this%2C%27273152215_15%27%29/http://appendpopup%28this%2C%27273152215_15%27%29/
  • 8/3/2019 Database Management On Online Ticket Booking

    10/29

    the Validation Text property.

    ValidationText

    Enter a message to display when a value that is enteredviolates the expression in the Validation Rule property.

    DATE/TIME allows the following field properties:-

    Caption The label text that is displayed for this field by default informs, reports, and queries. If this property is empty, thename of the field is used. Any text string is allowed.

    DefaultValue

    Automatically assigns the specified value to this field whena new record is added.

    Format Determines the way that the field appears when it isdisplayed or printed in datasheets, or in forms or reportsthat are bound to the field. You can use a predefined formator build your own custom format.

    List of predefined formats

    Lists of components that you can use in custom formats

    IMEMode

    Controls the conversion of characters in East Asian versionsof Windows.

    IMESentenceMode

    Controls the conversion of sentences in East Asian versionsof Windows.

    Indexed Specifies whether the field has an index. There are threeavailable values:

    Yes (No duplicates) Creates a unique index on the field.Yes (Duplicates OK) Creates a non-unique index on thefield.

    http://togglediv%28%27divexpcollasst_264044817%27%29/http://togglediv%28%27divexpcollasst_400452634%27%29/http://appendpopup%28this%2C%27184603555_17%27%29/http://togglediv%28%27divexpcollasst_400452634%27%29/http://togglediv%28%27divexpcollasst_264044817%27%29/http://togglediv%28%27divexpcollasst_400452634%27%29/http://togglediv%28%27divexpcollasst_264044817%27%29/http://appendpopup%28this%2C%27184603555_17%27%29/http://togglediv%28%27divexpcollasst_400452634%27%29/http://togglediv%28%27divexpcollasst_264044817%27%29/
  • 8/3/2019 Database Management On Online Ticket Booking

    11/29

    No Removes any index on the field.NOTE Do not change this property for a field that is usedin a primary key.

    Although you can create an index on a single field bysetting the Indexed field property, some types of indexescannot be created in this way. For example, you cannotcreate a multi-field index by setting this property.

    Input Mask Displays editing characters to guide data

    entry. For example, an input mask mightdisplay a dollar sign ($) at the beginning ofthe field.

    Required Requires that data be entered in the field.

    Show DatePicker

    Specifies whether to show the DatePicker control.

    NOTE If you use an input mask for a

    Date/Time field, the Date Picker control is

    unavailable regardless of how you set thisproperty.

    Smart Tags Attaches a smart tag to the field.

    Text Align Specifies the default alignment of textwithin a control.

    ValidationRule

    Supplies an expression that must be truewhenever you add or change the value in

    this field. Use in conjunction withthe Validation Text property.

    ValidationText

    Enter a message to display when a valuethat is entered violates the expression inthe Validation Rule property.

  • 8/3/2019 Database Management On Online Ticket Booking

    12/29

    HYPERLINK allows the following field properties:-

    AllowZeroLength

    Allows entry (by setting to Yes) of a zero-length string ("")in a Hyperlink, Text, or Memo field.

    AppendOnly

    Determines whether to track field value changes. There aretwo settings:

    Yes Tracks changes. To view the field value history, right-click the field, and then click Show column history.No Does not track changes.

    WARNING Setting this property to No deletes any

    existing field value history.

    Caption The label text that is displayed for this field by default informs, reports, and queries. If this property is empty, thename of the field is used. Any text string is allowed.

    Default Value Automatically assigns the specified value to this fieldwhen a new record is added.

    Format Determines the way that the field appears when it isdisplayed or printed in datasheets or in forms or reportsthat are bound to the field. You can define a customformat for a Hyperlink field.

    IME Mode Controls the conversion of characters in East Asian

    versions of Windows.

    IME SentenceMode

    Controls the conversion of sentences in East Asianversions of Windows.

    Indexed Specifies whether the field has an index. There are three

    http://appendpopup%28this%2C%27211227735_20%27%29/http://appendpopup%28this%2C%27211227735_20%27%29/
  • 8/3/2019 Database Management On Online Ticket Booking

    13/29

    available values:

    Yes (No duplicates) Creates a unique index on thefield.

    Yes (Duplicates OK) Creates a non-unique index onthe field.No Removes any index on the field.

    NOTE Do not change this property for a field that isused in a primary key.

    Although you can create an index on a single field bysetting theindexed field property, some types of indexes

    cannot be created in this way. For example, you cannotcreate a multi-field index by setting this property.

    Required Requires that data be entered in the field.

    Smart Tags Attaches a smart tag to the field.

    Text Align Specifies the default alignment of text within a control.

    UnicodeCompression

    Compresses text that is stored in this field when lessthan 4,096 characters are stored.

    ValidationRule

    Supplies an expression that must be true whenever youadd or change the value in this field. Use in conjunctionwith the Validation Text property.

    Validation

    Text

    Enter a message to display when a value that is entered

    violates the expression in the Validation Rule property.

    MEMO allows the following field properties:-

  • 8/3/2019 Database Management On Online Ticket Booking

    14/29

    Allow ZeroLength

    Allows entry (by setting to Yes) of a zero-length string("") in a Hyperlink, Text, or Memo field.

    Append Only Determines whether to track field value changes. There

    are two settings:Yes Tracks changes. To view the field value history,right-click the field, and then click Show columnhistory.No Does not track changes.

    WARNING Setting this property to No deletes

    any existing field value history.

    Caption The label text that is displayed for this field by defaultin forms, reports, and queries. If this property is empty,the name of the field is used. Any text string is allowed.

    Default Value Automatically assigns the specified value to this fieldwhen a new record is added.

    Format Determines the way that the field appears when it isdisplayed or printed in datasheets or in forms or reports

    that are bound to the field. You can define a customformat for a Memo field.

    IME Mode Controls the conversion of characters in East Asianversions of Windows.

    IME SentenceMode

    Controls the conversion of sentences in East Asianversions of Windows.

    Indexed Specifies whether the field has an index. There are threeavailable values:

    Yes (No duplicates) Creates a unique index on thefield.Yes (Duplicates OK) Creates a non-unique index onthe field.

    http://appendpopup%28this%2C%27325250700_21%27%29/http://appendpopup%28this%2C%27325250700_21%27%29/
  • 8/3/2019 Database Management On Online Ticket Booking

    15/29

    No Removes any index on the field.NOTE Do not change this property for a field that isused in a primary key.

    Although you can create an index on a single field bysetting theindexed field property, some types of indexescannot be created in this way. For example, you cannotcreate a multi-field index by setting this property.

    Required Requires that data be entered in the field.

    Smart Tags Attaches a smart tag to the field.

    Text Align Specifies the default alignment of text within a control.

    UnicodeCompression

    Compresses text that is stored in this field when lessthan 4,096 characters are stored.

    ValidationRule

    Supplies an expression that must be true whenever youadd or change the value in this field. Use in conjunctionwith the Validation Textproperty.

    ValidationText

    Enter a message to display when a value that is enteredviolates the expression in the Validation Rule property.

    NUMBER allows the following field properties:-

    Caption The label text that is displayed for this field by default informs, reports, and queries. If this property is empty, the

    name of the field is used. Any text string is allowed.DecimalPlaces

    Specifies the number of decimal places to use whendisplaying numbers.

    DefaultValue

    Automatically assigns the specified value to this field whena new record is added.

  • 8/3/2019 Database Management On Online Ticket Booking

    16/29

    Field Size Select one of the following:

    ByteUse for integers that range from 0 to 255. Storagerequirement is 1 byte.

    IntegerUse for integers that range from -32,768 to32,767. Storage requirement is 2 bytes.Long IntegerUse for integers that range from -2,147,483,648 to 2,147,483,647. Storage requirement is 4bytes.

    TIP Use Long Integer when you create a foreign key torelate to another table's autonumber primary key field.

    Single Use for numeric floating point values that rangefrom -3.4 x 1038 to 3.4 x 1038 and up to seven significantdigits. Storage requirement is 4 bytes.Double Use for numeric floating point values that rangefrom -1.797 x 10308 to 1.797 x 10308 and up to fifteensignificant digits. Storage requirement is 8 bytes.Replication ID Use for storing a globally unique identifierrequired for replication. Storage requirement is 16 bytes.

    Note that replication is not supported using the .accdb fileformat.Decimal Use for numeric values that range from -9.999...X 1027to 9.999... X 1027. Storage requirement is 12 bytes.

    Format Determines the way that the field appears when it isdisplayed or printed in datasheets, or in forms or reportsthat are bound to the field. You can use any valid number

    format.Indexed Specifies whether the field has an index. There are three

    available values:

    Yes (No duplicates) Creates a unique index on the field.Yes (Duplicates OK) Creates a non-unique index on the

    http://appendpopup%28this%2C%27478476041_22%27%29/http://appendpopup%28this%2C%27478476041_22%27%29/
  • 8/3/2019 Database Management On Online Ticket Booking

    17/29

    field.No Removes any index on the field.

    NOTE Do not change this property for a field that is used

    in a primary key.

    Although you can create an index on a single field bysetting the Indexed field property, some types of indexescannot be created in this way. For example, you cannotcreate a multi-field index by setting this property.

    Input Mask Displays editing characters to guide data entry. Forexample, an input mask might display a dollar sign ($) at

    the beginning of the field.

    Required Requires that data be entered in the field.

    Smart Tags Attaches a smart tag to the field.

    Text Align Specifies the default alignment of text within a control.

    ValidationRule

    Supplies an expression that must be true whenever you addor change the value in this field. Use in conjunction withthe Validation Text property.

    ValidationText

    Enter a message to display when a value that is enteredviolates the expression in the Validation Rule property.

    OLE OBJECT allows the following field properties:-

    Caption The label text that is displayed for this field by default informs, reports, and queries. If this property is empty, thename of the field is used. Any text string is allowed.

    Required Requires that data be entered in the field.

  • 8/3/2019 Database Management On Online Ticket Booking

    18/29

    TextAlign

    Specifies the default alignment of text within a control.

    TEXT allows the following field properties:-

    AllowZeroLength

    Allows entry (by setting to Yes) of a zero-length string ("")in a Hyperlink, Text, or Memo field.

    Caption The label text that is displayed for this field by default informs, reports, and queries. If this property is empty, thename of the field is used. Any text string is allowed.

    Default

    Value

    Automatically assigns the specified value to this field when

    a new record is added.

    Field Size Enter a value from 1 to 255. Text fields can range from 1 to255 characters. For larger text fields, use the Memo datatype.TIP For best performance, always specify the smallest

    sufficient Field Size.For example, if you are storing postal codes of a knownlength, you should specify that length as the Field Size.

    Format Determines the way that the field appears when it isdisplayed or printed in datasheets or in forms or reports thatare bound to the field. You can define a custom format fora Text field.

    IME Mode Controls the conversion of characters in East Asianversions of Windows.

    IMESentenceMode

    Controls the conversion of sentences in East Asian versionsof Windows.

    Indexed Specifies whether the field has an index. There are threeavailable values:

    http://appendpopup%28this%2C%27276121386_24%27%29/http://appendpopup%28this%2C%27276121386_24%27%29/
  • 8/3/2019 Database Management On Online Ticket Booking

    19/29

    Yes (No duplicates) Creates a unique index on the field.Yes (Duplicates OK) Creates a non-unique index on thefield.No Removes any index on the field.

    NOTE Do not change this property for a field that is usedin a primary key.

    Although you can create an index on a single field bysetting theindexed field property, some types of indexescannot be created in this way. For example, you cannotcreate a multi-field index by setting this property.

    Required Requires that data be entered in the field.

    Smart Tags Attaches a smart tag to the field.

    Text Align Specifies the default alignment of text within a control.

    UnicodeCompression

    Compresses text that is stored in this field when lessthan 4,096 characters are stored.

    Validation Rule Supplies an expression that must be true whenever youadd or change the value in this field. Use inconjunction with the Validation Text property.

    Validation Text Enter a message to display when a value that is enteredviolates the expression in the Validation Rule property.

    YES/NO allows the following field properties:-

    Caption The label text that is displayed for this field by default informs, reports, and queries. If this property is empty, thename of the field is used. Any text string is allowed.

    DefaultValue

    Automatically assigns the specified value to this field whena new record is added.

  • 8/3/2019 Database Management On Online Ticket Booking

    20/29

    Format Determines the way that the field appears when it isdisplayed or printed in datasheets, or in forms or reportsthat are bound to the field. Select one of the following:

    True/False Displays the value as either True or False.Yes/No Displays the value as either Yes or No.On/Off Displays the value as either On or Off.

    Indexed Specifies whether the field has an index. There are threeavailable values:

    Yes (No duplicates) Creates a unique index on the field.

    Yes (Duplicates OK) Creates a non-unique index on thefield.No Removes any index on the field.

    NOTE Do not change this property for a field that is usedin a primary key.

    Although you can create an index on a single field bysetting the Indexed field property, some types of indexes

    cannot be created in this way. For example, you cannotcreate a multi-field index by setting this property.

    Text Align Specifies the default alignment of text within a control.

    ValidationRule

    Supplies an expression that must be true whenever you addor change the value in this field. Use in conjunction withthe Validation Text property.

    ValidationText

    Enter a message to display when a value that is enteredviolates the expression in the Validation Rule property.

    Relational databases

    http://appendpopup%28this%2C%27678606643_25%27%29/http://appendpopup%28this%2C%27678606643_25%27%29/
  • 8/3/2019 Database Management On Online Ticket Booking

    21/29

    A relational database is one whose components (tables, forms, queriesetc) are related (linked). The linkages between database components arecreated by making relationship links Between them. The relationship canbe between:

    -one component and another (one-to-one relationship),

    -one component related to several other components (one-to-many)

    -several database components (many-to-many).

    Creation of relationships between database components reduces dataredundancy and enhances ease of access of the information.

    Creation of relationships between database components

    When you create a relationship between tables, the related fields don'tnecessarily have to have the same names. However, related fields musthave the same data type. Unless the

    Primary key field is an autonumber field. Ms-access basic 6An autonumber field can be matched with a number field only if thefieldsize property of both of the matching fields is the same. Forexample, you can match an autonumber field and a number field if thefieldsize property of both fields is long integer. Even when bothmatching fields are number fields, they must have exactly the samefieldsize property setting.

    Defining a one-to-many or a one-to-one relationship

    1. Close any tables you have open. You can't create or modifyrelationships between open tables.

    2. Press f11 to switch to the database window.

  • 8/3/2019 Database Management On Online Ticket Booking

    22/29

    3. Click relationships on the toolbar.

    4. If you haven't yet defined any relationships in your database, the showtable dialog box is automatically displayed.

    If you need to add the tables you want to relate and the show table dialogbox isn't displayed, click show table on the toolbar.

    5. Double-click the names of the tables you want to relate, and thenclose the show table dialog box. To create a relationship between a tableand itself, add that table twice.

    6. Drag the field that you want to relate from one table to the related

    field in the other table. In most cases, you drag the primary key field(which is displayed in bold text) from one table To a similar field (oftenwith the same name) called the foreign key in the other table (see theillustration below).

  • 8/3/2019 Database Management On Online Ticket Booking

    23/29

    7. The edit relationships dialog box is displayed. Check the field namesdisplayed in the two columns to ensure they are correct. You can changethem if necessary.

    Set the relationship options if necessary.

    8. Click the create button to create the relationship.

    9. Repeat steps 5 through 8 for each pair of tables you want to relate.

    When you close the relationships window, Microsoft access asks if youwant to save the layout. Whether you save the layout or not, therelationships you create are saved in the Database.

    Note: you can create relationships using queries as well as tables.However, referential integrity isn't enforced with queries.

    Queries

    A query is a derived item in the database meant to answer specificquestions that relate to the information in the database. Queries are

    handy during data processing.

    To find and retrieve just the data that meets conditions that you specify,including data from multiple tables create a query. A query can alsoupdate or delete multiple records at the same time, and performpredefined or custom calculations on your data.

    A query requests data from the database. At its simplest, a query merelyfetches all data from a single table. But as you create more complex (andmore typical) queries, you can

    Assemble exactly the data you want (i.e. Unique sets of data that yourequire at any given time).

  • 8/3/2019 Database Management On Online Ticket Booking

    24/29

    Queries can also be used to execute mathematical and logical functionsto obtain certain information in the database.

    Queries are derived from and linked to tables or other queries. (due to

    these linkages, they tend to largely inflate the size of the database andshould thus only be used to execute the intended functions, and storedonly if updated information is to be retrieved)

    There are various types of queries for different uses:

    Select queries- used for extracting specific information from alarge multi-information table. They can also be helpful in mergingrelated information from different tables.

    Make-table queries: - used for making sub tables from the maintable(s) and queries.

    Update queries: - important in adding information in the fields of atable.

    Append queries: - used to copy records from one table/ query toanother.

    Delete query: - to permanently remove unwanted content from thetable. Note: Delete query should not be used unless one surely willnot require the information to be deleted.

    Crosstab query: a query that calculates a sum, average, count, orother type of total on records, and then groups the result by twotypes of information: one down the left side of the datasheet andthe other across the top

    To run a simple select query: in the database window, click queriesunder objects. Click the Query you want to open. Click open on thedatabase window toolbar.

    Caution: It's a good idea to make a copy of the data you are changing ormoving in an action.

  • 8/3/2019 Database Management On Online Ticket Booking

    25/29

    Query, in case you need to restore the data to its original state afterrunning the action query

    In design view,

    - Choose the tables or existing queries that contain the fields to use

    - Select and drag those fields to a grid (the fields can come from just onetable, or from

    Multiple tables, the fields specified for a query control the data that thequery retrieves)

    - Specify criteria and other settings, such as whether to sort the results.To test a new query in design view, just click the run button on the querydesign toolbar.

    This will switch you to the results view.

    If you don't see the results you want, click the design button to return todesign view.

    Note: to stop a query in progress (after you start it), press ctrl +break

    Forms:-

    A form is a type of a database object that is primarily used to enter ordisplay data in a database. Most forms are bound to one or more tablesand queries in the database. A form's record source refers to the fields inthe underlying tables and queries.

    A form:

    - Focuses on one record at a time

    - Can display fields from more than one table

  • 8/3/2019 Database Management On Online Ticket Booking

    26/29

    - Can also display pictures and other objects

    - Can contain a button that prints, opens other objects, or otherwiseautomates tasks

    Data entry forms can be created either using a form wizard or in thedesign view. Once a table with fields is available, it is easy to create aform using the wizard:

    Click on the forms tabDouble click on the create form by using a wizard.This will lead you through a series of steps until you finish creating

    the form.

    The form created is linked to the table and information entered in thefields of the form is stored in the table.

    A form need not contain all the fields from each of the tables or queriesthat it is based on.

    When you open a form, Microsoft access retrieves the data from one ormore tables, and displays it on the screen with the chosen layout in the

    form wizard, or with the layout that you created on your own in designview.

    Reports:-

    Reports provide a means of organizing and summarizing data. Reports

    are often used to present an overview highlighting main points andtrends. A report can be a simple list, a status report or a monthlyproduction report. With reports, one can prepare:

    - Mailing labels for various producers

  • 8/3/2019 Database Management On Online Ticket Booking

    27/29

    - Produce a directory

    - Prepare invoices

    - Present data summaries.

    A report is made from the data available. There are several ways ofpreparing a report:

    Auto report: the quickest way to create a report, but gives least controlover the report's structure and appearance. This automatically containsall the fields in its data source, whether table or query.

    Report wizard: asks you questions and creates a report based on youranswers. The report wizard asks which tables or queries the report willbe based on, and which fields to use from those data sources. It also askswhether the data is to be grouped, and how it should be sorted andsummarized.

    Creating a report in design view: - gives one control, right from thestart. Design view provides you with a toolbox from which you dragselected controls and arrange them on a grid.

    To see the report as it will appear when printed, it should be viewed inprint preview.

    Different properties may be set for a report, to change how it is viewedor printed. For example, a report's Page Header property determineswhether the page header is printed on the page that begins with theReport Header.

    To view or change a report's properties, just double-click the reportselector where the rulers meet.

    To see more details about a property, click that property and then pressF1.

  • 8/3/2019 Database Management On Online Ticket Booking

    28/29

    To view a control's properties, double-click the control.

    Further information is available through the help section within access,and at http://office.microsoft.com/en-gb/training/CR061829401033.aspx

    Macros:-

    Microsoft Access provides the ability for you to create macros. A"macro" refers to a set of actions that can be run automatically, and ondemand. You could make a macro run when a user presses a certain key,or you could make a macro run everytime your database is opened.

    For example, if say 90% of your database usage is entering data into thesame form, you could create a macro that automatically opens that formevery time the database is opened. That way, it saves you from having toclick on the Forms tab, then double clicking the form you want to open.

    Here's how you can go about creating a macro:

    1.Ensuring the "Macros" tab is selected, click "New".2.Use the dropdown menu to select your first action - choose

    "openform". In the bottom pane, select the form name you wish toopen - choose "Individual Form"

    http://office.microsoft.com/en-gb/training/CR061829401033.aspxhttp://office.microsoft.com/en-gb/training/CR061829401033.aspx
  • 8/3/2019 Database Management On Online Ticket Booking

    29/29

    3.Use the dropdown menu to select your second action - choose"gotorecord". In the bottom pane, choose the record you want to goto - choose "New". What we're doing here is ensuring that the formdoesn't open up a previous record - it goes straight to the end and

    has a blank record ready for you to enter a new record (this savestime and unnecessary clicks).

    4.You're now ready to save your macro. To do this, click on the"Save" icon and enter a name for your macro. Make sure you name

    this macro "Autoexec". By naming it Autoexec, we are instructingAccess to run this macro everytime we open the database.

    Testing your Macro

    Now that you've created your macro, it's time to test it! Close yourdatabase and then open it again. You will notice that when you open it,the Individual Form automatically opens and is ready for you to enter anew record. You can also run macros by opening the Macros tab anddouble clicking on the macro you want to run (or selecting it andclicking "Run").