Database Presentation

download Database Presentation

of 15

description

Data Base

Transcript of Database Presentation

  • DATABASE

    2015 NOVEMBER

  • 2WHAT ABOUT

    A database is a collection of data that is stored for a specific purpose and organized in a manner that allows its contents to be easily accessed, managed, and updated.

    In one view, databases can be classified according to types of content: bibliographic, full-text, numeric, and images.

    when we talk about databases we almost invariably mean a collection of data that is stored on a computer.

    There are two basic categories of database: transactional database (store dynamic data, such as inventory contents, which is subject to change on an ongoing basis) and analytical database (store static data, such as geographical or chemical test results, which is rarely altered);

    The most prevalent 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.

    .

  • 3A BRIEF HISTORY

    The first attempts at computer databases arose around the mid-twentieth century. Early versions were file-oriented;

    The earliest computer databases were based on a flat file model, in which records were stored in text format.

    The hierarchical model was designed to allow structured relationships that would facilitate data retrieval. Because table structures are permanently and explicitly linked in this model, data retrieval was fast.

    The hierarchical structure also means that if a record is deleted in a parent table, all the records linked to it in child tables will be deleted as well.

    The network model allowed more complex connections than the hierarchical model: several inverted trees might share branches, for example.

    However it also had a number of problems. For example, a user would need a clear understanding of the database structure to be able to get information from the data. Furthermore, if a set structure was changed, any reference to it from an external program would have to be changed as well.

    In the 1970s, the relational database was developed to deal with data in more complex ways. The relational model eventually dominated the industry and has continued to do so through to the present day.

  • 4SINGLE.. OR NOT

    Databases can be:

    single-user;

    multiuser.

    A single-user database exists on a single computer and is accessible only from that computer. Many single-user databases exist, and there are a number of commercial database manufacturers that address this market.

    A multiuser database may exist on a single machine, such as a mainframe or other powerful computer, or it may be distributed and exist on multiple computers. Multiuser databases are accessible from multiple computers simultaneously.

  • 5RELATIONAL DATABASE

    MANAGEMENT SYSTEMS

    A relational database management system (RDBMS) is a program that lets you

    create, update, and administer a relational database.

    The most common RDBMS are:

    Oracle

    MS SQL (Microsoft)

    My SQL (Oracle)

    IBM DB2

  • 6RELATIONAL DATABASE MANAGEMENT

    SYSTEMS

    MARKET SHARES

  • 7STRUCTURED QUERY LANGUAGE

    (SQL)

    SQL is the most common language used to interact with relational

    databases. SQL commands are fairly straightforward and easy to

    understand.

    SQL (Structured Query Language) is a standard language for making

    interactive queries from and updating a database such as IBM'sDB2,

    Microsoft's SQL Server, and database products from Oracle, Sybase, and

    Computer Associates.

    Most databases use SQL.

  • RELATIONAL DATABASES

    DEFINITION

    A relational database is a collection of data items organized as a set of

    formally-described tables from which data can be accessed or reassembled in

    many different ways without having to reorganize the database tables.

    8

  • RELATIONAL DATABASESSTRUCTURE

    The basic data structure of the relational model is the table, where information

    about a particular entity (ex. an employee) is represented in rows (also called

    tuples) and columns.

    A relation is a set of rows;

    The columns enumerate the various attributes of the entity (ex. theemployee's name, address or phone number)

    A row is an actual instance of the entity (a specific employee) that isrepresented by the relation. As a result, each tuple of the employee table

    represents various attributes of a single employee.

    9

  • RELATIONAL DATABASESRELATIONSHIPS

    A relational database contains multiple tables. Each table record contains a

    unique data instance defined for a corresponding column category. One or

    more data or record characteristics relate to one or many records to form

    functional dependencies. These are classified as follows:

    one to one one row in table A may be linked with only one row in table B andvice versa;

    one to many one row in table A may be linked with many rows in table B, butone row in table B is linked to only one row in table A;

    many to many multiple rows in table A may be linked with multiple rows in tableB and vice versa;

    10

  • RELATIONAL DATABASESKEYS

    Databases use keys to organize information in tables.

    Primary key: is a set of one or more attributes; the value this key holds is

    unique for each record in the database.

    Foreign key: is a field in one table that uniquely identifies a row in another

    table; is used to create relationships between tables; a primary key from table A

    becomes a foreign key in table B when there is a relationship between the two

    tables.

    11

  • DATABASE NORMALIZATIONDEFINITION

    Database Normalization is a technique of organizing the data in the database.

    Normalization is mainly used for:

    eliminating redundant data;

    eliminating undesirable characteristics like Insertion, Update and Deletion

    anomalies;

    ensuring data dependencies make sense.

    Normalization rules are divided into following normal forms:

    First Normal Form

    Second Normal Form

    Third Normal Form

    12

  • DATABASE NORMALIZATIONFIRST NORMAL FORM

    A table is in first normal form (1NF) if it meets the following:

    Each attribute (column) value must be a single value only.

    All values for a given attribute (column) must be of the same type.

    Each attribute (column) name must be unique.

    No two tuples (rows) in a relation can be identical.

    13

  • DATABASE NORMALIZATIONSECOND NORMAL FORM

    A table is in second normal form (2NF) if it meets the following:

    is in 1NF

    every non-prime attribute of the table is dependent on the whole of every

    candidate key.

    A non-prime attribute of a table is an attribute that is not a part of any candidate

    key of the table.

    14

  • DATABASE NORMALIZATIONTHIRD NORMAL FORM

    A table is in third normal form (3NF) if it meets the following:

    is in 2NF

    all the attributes in a table are determined only by the candidate keys of that

    table and not by any non-prime attributes.

    15