ahmed ali [database design & concepts]

Upload: ahmed

Post on 07-Jul-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    1/37Islamabad

    Ahmed Ali Khan  HD-92224  1

    My Special Gratitude towards the respected

    Sir Muhammad Bilal Khan for his Appreciation,

    Encouragement and Support. Which gave me thepassion to do better than the best.

    & for leading me to a path where I can make myself

    helpful for others.

     

    Database Design

    Concepts 

    Unit Report On:

    Submitted by:  Ahmed Ali Khan (HD-92224)

    Submitted to:  Sir Muhammad Bilal Khan 

    Grafton College, Islamabad. 

    Islamabad

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    2/37

    Islamabad

    Ahmed Ali Khan  HD-92224  2

    Introduction 03

    Database/Types of Databases 03

    Terminologies of Database 05

    What is DBMS 06

    Types of DBMS 06

    Some Dominating DBM Softwares 08

    DBMS Language 10

    SQL 11

    SQL Statements and their functions/Formats 12Lo1 Understand databases and data management systems 14Task 1 Based on the case study of FastCabs company, analyze the key issues and

    application of database within that organization.

    14

    Issues[Problems faced by FastCabs due to absence of a DBMS] 14

    Applications of DBMS in FastCabs 15

    Task 2 Critically evaluate the features and advantages of using MS-Access as a

    database management system for a company like FastCabs.

    16

    Features of MS Access 16

    Advantages of MS Access for FastCabs 16

    Lo2 Understand database design techniques 18Task 1 Based on the requirements and the assumptions you have made of FastCabs

    case study, analyze the use of popular Prototyping database development

    methodology.

    18

    Task 2 Discuss entity-relationship modeling and normalization 21

    What is Entity Relationship Diagram 21

    Entity Relationship Diagram for FastCabs 21

    Lo3 Be able to design, create and document databases 23Task 1 apply the database developmental cycle to a given data Set 23

    Prototyping the Database of FastCabs 23

    Task 2 Complete the design of FastCabs database and implement it using MS-

    Access as a target DBMS including user interface.

    24

    Task 3 Evaluate the effectiveness of the database solution and suggest methods of

    improvement.

    33

    Effectiveness of the Database in overcoming the problems 33

    Suggestions for improvement of the Existing DBMS 33

    Task 4 provide supporting user and technical documentation. 34

    User manual 34

    Career in Database 36

    References 37

    Table of Contents

    As Instructed by my Unit Tutor this Unit Report contains some extra

    documentation on Database. Therefore the actual LO1 starts at page No. 14.

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    3/37

    Islamabad

    Ahmed Ali Khan  HD-92224  3

    Amazon SimpleDB is a Document Oriented database written in Erlang  by Amazon.com. It is used as a

    web service in concert with Amazon Elastic Compute Cloud (EC2) and Amazon S3 and is part of Amazon

    Web Services.

    Major implementations of this Database are SQL Server Compact from Microsoft Corporation, InnoDB 

    from Oracle Corporation and Informix Dynamic Server (IDS) from IBM.

    Graph databases are well-suited for analyzing interconnections, which is why there has been a lot of

    interest in using graph databases to mine data from social media just like Facebook graph search. The

    concept behind graphing a database is often credited to 18th century mathematician Leonhard Euler. 

    Herman Hollerith conceived the idea

    that data could be represented by holes

    punched in paper cards then tabulated

    by machine. He implemented this

    concept for the US Census Bureau; thus

    the 1890 United States Census

    processing created the first database

    consisting of thousands of boxes full of

    punched cards.

    Database:

    Types of Database:

    Following are types of Database:

    1. Document Oriented Database:

    A document-oriented database or document store is a computer program designed for storing,

    retrieving, and managing document-oriented information, also known as semi-structured data.

    2. Embedded Database: 

    An embedded database system is a database which is tightly integrated with an application software

    that requires access to stored data, such that the database system is "hidden" from the application's

    end-user and requires little or no ongoing maintenance.

    3. Graph Database:

    A graph database, also called a graph-oriented database, is a type of NoSQL

    database that uses graph theory to store, map and query relationships.

    A graph database is essentially a collection of nodes and edges. Each node represents an entity (such

    as a person or business) and each edge represents a connection or relationship between two nodes. 

    Introduction

    "A database is a collection of information that is organized so

    that it can easily be accessed, managed, and updated. In one

    view, databases can be classified according to types of content:

    bibliographic, full-text, numeric, and images."

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    4/37

    Islamabad

    Ahmed Ali Khan  HD-92224  4

    Microsoft Encarta was a digital

    multimedia encyclopedia based on

    Hypertex Database published by

    Microsoft Corporation from 1993 to

    2009.

     

    Operational databases are used to store, manage and track real-time business information. For

    example, a company might have an operational database used to track warehouse/stock quantities.

    As customers order products from an online web store, an operational database can be used to keep

    track of how many items have been sold and when the company will need to reorder stock.

    In Pakistan NADRA is a good example of distributed database which generates massive amount of

    data through numerous offices throughout the country. This data is synced periodically & is accessed by

    many authorized governmental agencies/departments.

    4. Hypertext Database: 

    Hypertext databases are particularly useful for organizing large

    amounts of disparate information. in which objects (text,

    pictures, music, programs, and so on) can be creatively linked to

    each other. When you select an object, you can see all the other

    objects that are linked to it. For example they are useful for

    maintaining online encyclopedias.

    5. Operational Database: 

    Operational database management systems are used to manage dynamic data in real-time. These

    types of databases allow you to do more than simply view archived data. Operational databases

    allow you to modify that data (add, change or delete data), doing it in real-time.

    6. Distributed Database: 

    A database that consists of two or more data files located at different sites on a computer network.

    Because the database is distributed, different users can access it without interfering with one

    another. However, the DBMS must periodically synchronize the scattered databases to make sure

    that they all have consistent data.

    7. Flat File Database: 

    A flat file database is a database which is stored on its host computer system as an ordinary "flat

    file". To access the structure of the data and manipulate it, the file must be read in its entirety into

    the computer's memory. Upon completion of the database operations, the file is again written out in

    its entirety to the host's file system. In this stored mode the database is "flat", which means it has no

    structure for indexing and there are usually no structural relationships between the records. A flat

    file can be a plain text file or a binary file.

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    5/37

    Islamabad

    Ahmed Ali Khan  HD-92224  5

    Terminologies:

    Term Definition

    Database A database is a collection of data that is organized in a specific way. The data isstored in a way that makes it easy to access using queries. For example, a

    database called 'Grafton Students'.

    Table A database can have multiple tables in it. All the data is stored in the tables. Atable has a set of fields in it. These fields makes the design or the structure of

    the database.

    Field A field is the basic unit of data entry in a record. To define a new field, we giveit a name. Then we select options that determine how the field interprets,

    enters, calculates, stores, and displays data.

    Data Type Each field can have only one kind of data. That is called the Data Type of thatfield. This can be a string, an integer, a date, etc.

    Row/Record row—also called a record or tuple—represents a single, implicitly structureddata item in a table. In simple terms, a database table can be thought of as

    consisting of rows and columns or fields.

    Primary Key Primary key is a field that will uniquely identify each row in the table. The valueof this field will be unique through the table.

    Relation There will be many cases when the data in one table can be related to the datain another table. This connection between two tables is called a relation.

    Foreign Key When there is a relation between 2 tables, these tables will be connected byinserting the primary key of one table into the corresponding row of the other

    table. The field used in such a way to connect the 2 tables is called the foreign

    key.

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    6/37

    Islamabad

    Ahmed Ali Khan  HD-92224  6

    The hierarchical structure

    was developed by IBM in the

    1960s, and used in early

    mainframe DBMS. Records'

    relationships form a treelike

    model. This structure is

    simple but inflexible because

    the relationship is confined

    to a one-to-many

    relationship. 

    What is DBMS?

    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 database and end users or application

    programs, ensuring that data is consistently organized and remains easily accessible.

    The three basic tasks of DBMS:

    The DBMS manages three important things:

      The Data.

      The database engine that allows data to be accessed, locked and modified.

      The database schema, which defines the database’s logical structure. 

    These three foundational elements help provide concurrency, security, data integrity and

    uniform administration procedures.

    Typical database administration tasks supported by the DBMS include

    change management, performance monitoring/tuning and backup and

    recovery.

    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.

    Types of DBMS:

    There are four types of Database Management Softwares:

    1. Hierarchal Database:

    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.

    The hierarchical database model mandates that each child record has only one

    parent, whereas each parent record can have one or more child records. In

    order to retrieve data from a hierarchical database the whole tree needs to be

    traversed starting from the root node.

    "A database management system (DBMS) 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."

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    7/37

    Islamabad

    Ahmed Ali Khan  HD-92224  7

    The network model's original inventor was Charles Bachman, and it was developed into a standard

    specification published in 1969 by the Conference on Data Systems Languages (CODASYL) Consortium.

    This was followed by a second publication in 1971, which became the basis for most implementations

    The relational database was first defined in June 1970 by Edgar Codd, of IBM's San Jose Research

    Laboratory. Codd's view of what qualifies as an RDBMS is summarized in Codd's 12 rules. A relational

    database has become the predominant type of database.

    2. Network Database:

    A network database is a type of database model wherein multiple

    member records or files can be linked to multiple owner files and

    vice versa. The model can be viewed as an upside-down tree where

    each member information is the branch linked to the owner, which is

    the bottom of the tree. Essentially, relationships are in a net-like form where a single element can

    point to multiple data elements and can itself be pointed to by multiple data elements.

    3. Relational Database(RDBMS):

    A relational database (RDB) is a collective set of multiple data

    sets organized by tables, records and columns. RDBs establish a

    well-defined relationship between database tables. Tables communicate and

    share information, which facilitates data searchability, organization and reporting.

    RDBs use Structured Query Language (SQL), which is a standard user application that provides an

    easy programming interface for database interaction.

    4. Object Oriented Database(OODBMS):

    An object database (also object-oriented database management system - OODBMS) is a database

    management system in which information is represented in the form of objects as used in object-

    oriented programming. Object databases are different from relational databases which are table-

    oriented. Object-relational databases are a hybrid of both approaches.

    As the usage of web-based technology increases with the implementation of Intranets and

    extranets, companies have a vested interest in OODBMSs to display their complex data. Using a

    DBMS that has been specifically designed to store data as objects gives an advantage to those

    companies that are geared towards multimedia presentation or organizations that utilize computer-

    aided design (CAD).

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    8/37

    Islamabad

    Ahmed Ali Khan  HD-92224  8

    Some Dominating DBM Softwares:

    ORACLE RDBMS:

    Oracle Enterprise Server, designed for grid computing, is the best RDBMS,

    running on multiple platforms, with the latest version 12c, in which the "c" is

    for cloud computing. In the IT industry, Oracle is "THE DATABASE." Oracle has the unshakeable

    market share in database field with big corporations, government agencies, and mission-critical data

    centers running on Oracle database in the Real Application Cluster (RAC) environment.

    IBM DB2:

    DB2 is the database management system that delivers a flexible and cost-

    effective database platform to build robust on demand business

    applications. The DB2 Universal Database (UDB) Enterprise Server Edition (ESE) is one of the best

    RDBMS. IBM positions DB2 as the database of choice for robust, enterprise-wide solutions handling

    high-volume workloads.

    Microsoft SQL Server:

    Microsoft SQL Server is a comprehensive database software platform providing

    enterprise-class data management and integrated business intelligence (BI)

    tools. Even though as a late starter in database, Microsoft has made strategic

    investments to push its SQLServer to the frontline to compete with Oracle and

    DB2 head-to-head. As the foundation of Microsoft's comprehensive data platform, SQL Server

    delivers breakthrough performance for mission-critical applications, using in-memory technologies,

    faster insights from any data to any user in familiar tools like Excel, and a resilient platform for

    building, deploying, and managing solutions that span on-premises and cloud.

    TERDATA:

    Teradata Database, with an interesting tagline, - "When the world gets

    smaller, the data gets bigger," is the most powerful Very Large Database

    (VLDB) system. Nowadays the concept of VLDB has shifted to Big Data which focuses on the value of

    data for business decision-making. Many large scale data warehousing and business intelligence

    systems are powered by Teradata. Teradata database is often used by big retailers and telecom

    enterprises.

    My SQL:

    MySQL. an open source database, is the most popular database for web-

    based business applications, and is moving to enterprise level. MySQL is the

    most popular database for internet systems such as e-commerce and dynamic website. If you run

    your own blog with Wordpress, you are using MySQL. Many of the world's largest and fastest-

    growing organizations including Facebook, Google, Adobe, Alcatel Lucent and Zappos rely on MySQL

    to save time and money powering their high-volume Web sites, business-critical systems and

    packaged software.

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    9/37

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    10/37

    Islamabad

    Ahmed Ali Khan  HD-92224  10

    Database Schema:

    A database schema is the

    skeleton structure that

    represents the logical view of

    the entire database. It defines

    how the data is organized and

    how the relations among them

    are associated. It formulates all

    the constraints that are to be

    a lied on the data. 

    Although the current Database era is Fully dominated by SQL but some other Query languages are:

    Contextual Query Language (CQL), Cypher, DMX  for Data Mining models, HTSQL is a query language thattranslates HTTP queries to SQL, OQL is Object Query Language, Gremlin is a graph traversal language.

    DBMS Language:

    Database languages are used for read, update and store data in a

    database. There are several such languages that can be used for this

    purpose; one of them is SQL (Structured Query Language).

    Types of DBMS language:

    Data Definition Language (DDL): 

    DDL is used for specifying the database schema. Let’s take SQL for instance to categorize the

    statements that comes under DDL.

      To create the database instance – CREATE

      To alter the structure of database – ALTER

     

    To drop database instances – DROP

      To delete tables in a database instance – TRUNCATE

      To rename database instances – RENAME

    All these commands specify or update the database schema that’s why they come under Data

    Definition language.

    Data Manipulation Language (DML): 

    DML is used for accessing and manipulating data in a database.

      To read records from table(s) – SELECT

      To insert record(s) into the table(s) – INSERT

      Update the data in table(s) – UPDATE

      Delete all the records from the table – DELETE

    Data Control language (DCL): 

    DCL is used for granting and revoking user access on a database :

      To grant access to user – GRANT

     

    To revoke access from user – REVOKE

    In practice, the data definition and data manipulation languages are not two separate

    languages. Instead they simply form parts of a single database language such as Structured

    Query Language (SQL). SQL represents combination of DDL and DML, as well as statements

    for constraints specification and schema evaluation.

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    11/37

    Islamabad

    Ahmed Ali Khan  HD-92224  11

    The original version called

    SEQUEL (structured English

    query language) was

    designed by an IBM research

    center in 1974 and 1975 by

    Donald D. Chamberlin  andRaymond F. Boyce. SQL was

    first introduced as a

    commercial database system

    in 1979 by Oracle

    Corporation.

    OQL (Objective Query Language):

    Arguably, the most popular NoSQL database is Apache Cassandra. Cassandra, which was once Facebook’s 

    proprietary database, was released as open source in 2008. Other NoSQL implementations include

    SimpleDB, Google BigTable, Apache Hadoop, MapReduce, MemcacheDB, and Voldemort. Companies

    that use NoSQL include NetFlix, LinkedIn and Twitter.

    SQL:

    SQL (Structured Query Language) is a special-purpose programming

    language designed for managing data held in a relational database

    management system (RDBMS), or for stream processing in a relational data

    stream management system (RDSMS).

    Originally based upon relational algebra and tuple relational calculus, SQL

    consists of a data definition language, data manipulation language, and a

    data control language. The scope of SQL includes data insert, query,

    update and delete, schema creation and modification, and data access

    control. 

    Historically, SQL has been the favorite query language for database management systems running on

    minicomputers and mainframes. Increasingly, however, SQL is being supported by PC database

    systems because it supports distributed databases (databases that are spread out over several

    computer systems). This enables several users on a local-area network to access the same database

    simultaneously.

    Object Query Language (OQL) is a query language standard for object-oriented databases modeled

    after SQL. OQL was developed by the Object Data Management Group (ODMG). Because of its overall

    complexity no vendor has ever fully implemented the complete OQL. OQL has influenced the design

    of some of the newer query languages like JDOQL and EJB QL, but they can't be considered as

    different flavors of OQL.

    NoSQL (Not Only SQL database): 

    NoSQL database, also called Not Only SQL, is an approach to data management and database design

    that's useful for very large sets of distributed data. NoSQL, which encompasses a wide range of

    technologies and architectures, seeks to solve the scalability and big data performance issues that

    relational databases weren’t designed to address. NoSQL  is especially useful when an enterprise

    needs to access and analyze massive amounts of unstructured data or data that's stored remotely on

    multiple virtual servers in the cloud.

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    12/37

    Islamabad

    Ahmed Ali Khan  HD-92224  12

    SQL is NOT case sensitive:

    select is the same as SELECT

    The short description of SQL:

      SQL stands for Structured Query Language

      SQL lets you access and manipulate databases

     

    SQL is an ANSI (American National Standards Institute) standard

    Capabilities of SQL:

      SQL can execute queries against a database

      SQL can retrieve data from a database

      SQL can insert records in a database

      SQL can update records in a database

      SQL can delete records from a database

      SQL can create new databases

     

    SQL can create new tables in a database

      SQL can create stored procedures in a database

      SQL can create views in a database

      SQL can set permissions on tables, procedures, and views

    SQL Statement:

    Most of the actions we need to perform on a database are done with

    SQL statements.

    The following SQL statement selects all the records in the "Customers" table: 

    SELECT * FROM Customers;

    Some database systems require a semicolon at the end of each SQL statement.

    Semicolon is the standard way to separate each SQL statement in database systems that

    allow more than one SQL statement to be executed in the same call to the server.

    SQL Statements & Their format:

    SELECT  The SELECT statement is used to select data from a database.SELECT column_name,column_name FROM table_name; 

    DISTICT The SELECT DISTINCT statement is used to return only distinct values.SELECT DISTINCT column_name, column_name FROM table_name;

    WHERE The WHERE clause is used to extract only those records that fulfill a specifiedcriterion.

    SELECT column_name,column_name FROM table_name WHERE column_name operator value; 

    AND

    Operator

    The AND operator displays a record if both the first condition AND the second

    condition are true.

    SELECT * FROM Customers WHERE Country='Germany' ANDCity='Berlin';

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    13/37

    Islamabad

    Ahmed Ali Khan  HD-92224  13

    OR Operator The OR operator displays a record if either the first condition OR the secondcondition is true.

    SELECT * FROM Customers WHERE City='Berlin' ORCity='München';

    ORDER BY The ORDER BY keyword is used to sort the result-set by one or more columns.SELECT column_name, column_name FROM table_name ORDER BY

    column_name ASC|DESC, column_name ASC|DESC;INSERT INTO The INSERT INTO statement is used to insert new records in a table.

    INSERT INTO table_name (column1,column2,column3,...)VALUES (value1,value2,value3,...);

    UPDATE The UPDATE statement is used to update records in a table.UPDATE table_name SET column1=value1,column2=value2,...WHERE some_column=some_value;

    DELETE The DELETE statement is used to delete records in a table.DELETE FROM table_name WHERE some_column=some_value;

    DELETE ALL It is possible to delete all rows in a table without deleting the table.DELETE * FROM table_name;

    SELECT TOP The SELECT TOP clause is used to specify the number of records to return.SELECT column_name(s) FROM table_name LIMIT number;

    LIKE

    Operator

    The LIKE operator is used in a WHERE clause to search fora specified pattern in a column.SELECT column_name(s) FROM table_name WHERE column_nameLIKE pattern;

    IN Operator The IN operator allows us to specify multiple values in a WHERE clause.SELECT column_name(s) FROM table_name WHERE column_name IN(value1,value2,...);

    BETWEEN The BETWEEN operator selects values within a range. The values can benumbers, text, or dates.

    SELECT column_name(s) FROM table_name WHERE column_name BETWEEN value1 AND value2; 

    ALIASES SQL aliases are used to give a database table, or a column in a table, atemporary name.

    SELECT column_name AS alias_name FROM table_name;

    UNIOIN The SQL UNION operator combines the result of two or more SELECTstatements.

    SELECT column_name(s) FROM table1UNIONSELECT column_name(s) FROM table2; 

    SELECT INTO The SELECT INTO statement copies data from one table and inserts it into anew table.

    SELECT * INTO newtable [IN externaldb] FROM table1;

    INSERT INTO

    SELECT

    The INSERT INTO SELECT statement selects data from one table and inserts it

    into an existing table. Any existing rows in the target table are unaffected.

    INSERT INTO table2 SELECT * FROM table1;

    Create DB The CREATE DATABASE statement is used to create a database.CREATE DATABASE dbname;

    Create Table The CREATE TABLE statement is used to create a table in a database.CREATE TABLE table_name(column_name1 data_type(size),column_name2 data_type(size),column_name3 data_type(size),....);

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    14/37

    Islamabad

    Ahmed Ali Khan  HD-92224  14

    Issues[Problems faced by FastCabs due to absence of a DBMS]:

    After critically analyzing the current situation of FastCabs I was able to point out the following key

    issues in the organization which were a direct result of absence of a DBMS:

    Huge amounts of Paperwork: 

    Due to the expansion of company fields now the company has to process huge

    amounts of paperwork. This means lots and lots of paper composition, Printing,

    Distribution and storage.

    Hiring of massive staff:

    In order to keep up with the current amounts of event logging and paper processing

    the company has no choice but to hire more and more of office staff.

    Lack of Communication & Distribution:

    The company faces a serious lack of communication and distribution because the

    company is present in all major cities of Scotland the company documentation has

    to be shared to all braches simultaneously which is nearly impossible. This results

    into miscommunication and mismanagement of company work.

    Mistakes:

    Huge amounts of paperwork & lack of communications means there is more room

    for mistakes. Some serious management and misguidance of Drivers is a major issue

    in FastCabs.

    Increases in Operating cost:

    All of the above mentioned issues ultimately result in huge budget of company.

    Which is why the FastCabs operating income is declining day by day.

    FastCabs Bankruptcy:

    The company CEO is already suspecting that the success of his company will be short

    lived. In order to avoid this the issue mentioned above must be addressedimmediately.

    Understand databases and data management

    s stems. 

    LO 1 

    Based on the case study of FastCabs company, analyze the key issues and

    application of database within that organization. 

    Task

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    15/37

    Islamabad

    Ahmed Ali Khan  HD-92224  15

    Applications of DBMS in FastCabs:

    Here are some of the key Applications that can be implemented in FastCabs:

    Electronic Records (softcopy):

    Records of every asset and service of the company will be maintained electronically through

    custom designed tables. e.g. Offices, Managers, Staff, Drivers, Cars, Jobs, Clients and

    Contracts. So no more physical paperwork.

    Absolute Detailing:

    In depth details of everyday work and company assets including satff will be maintained

    through dedicated columns in each table. For each staff store information such as staffNo,

    fName, lName, sAddress, jobDescription, salary, NIN, sex, and DOB. Each office office

    number, address, and phone number.

    Tracking:

    Tracking of clients, Contracts and Drivers will configured to be logged in the DBMS.

    Report Generation:

    A real time latest state report generation capability will configured in the DBMS. Current

    reports will be generated in the matter of seconds.

    Data Entry Through Forms:

    Data entry will be done through elegantly designed forms for each Table.

    Query Generation:

    Options for Query generation can be configured in the DBMS to show only the specific data

    asked by Users and Staff.

    User Control(Access Control):

    The DBMS can be configured in way that only authorized user having a Valid Username and

    Password will be able to use the Company Database.

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    16/37

    Islamabad

    Ahmed Ali Khan  HD-92224  16

    Features of MS Access:

      Table creation is simply done by design or wizard options.

      Data entered and stored in MS-Access can easily be exported or pasted into spreadsheets or

    statistical software for further analysis.

      As part of the MS Office Suite, MS Access integrates seamlessly with MS Word and Excel. Any

    data stored in MS-Access can be easily used throughout the MS-Office applications.

      One of the powerful features of Microsoft Access is the ability for developers to create custom

    solutions using VBA code (Visual Basic for Applications), which is similar to Visual Basic 6.0.

     

    Another useful feature of MS-Access is its relational ability that allows users to join tables, usingfields common to both, thereby allowing users to extract data from one table that relates to

    data in another.

      The "Report Writer" function in MS-Access is one of the best available. The stored data can be

    given in a wonderful format to take print or any other purpose.

      In general users with little programming knowledge can use MS Access effectively.

      There is no console window, no complex Syntaxes, and no complex queries for Ms-Access.

      There is also the Jet Database format (MDB or ACCDB in Access) which can contain the

    application and data in one file. This makes it very convenient to distribute the entire application

    to another user, who can run it in disconnected environments.

    Advantages of MS Access for FastCabs:

    Here are some Key advantages of MS Access for FastCabs:

    Cost Benefits:

    Microsoft Access is virtually free. If FastCabs computers already have the Microsoft Office

    Professional Suite of business products installed that is automatically bundled as part of Microsoft

    Office Professional, Microsoft Access is already available and there is no additional database

    software that is required.

    Cost of Development:

    There is a tremendous amount of Access developer resources to choose from. Due to the wide

    spread popularity of Access, Access developers are often available at a very competitive market rate

    that is significantly lower than Oracle or SQL Server database consultants.

    Implementation and Maintenance:

    Due to the simplicity of Microsoft Access, implementation and maintenance is significantly cheaperwhen compared to more complex database systems such as SQL Server or Oracle.

    Critically evaluate the features and advantages of using MS-Access as a database

    management system for a company like FastCabs. 

    Task

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    17/37

    Islamabad

    Ahmed Ali Khan  HD-92224  17

    User Friendly: 

    Access is user friendly and features the familiar Windows ‘look and feel’ which is appealing to most

    users.

    Unique Identifier:

    Each piece of information is assigned a unique identifier. This is extremely important since it ensures

    that each piece of information is only entered once, eliminating human and duplication errors.

    Custom Design:

    Customized forms can be created that will make it easy for FastCabs employees to enter your

    information.

    Scalability:

    If FastCabs is growing, one of the benefits of Microsoft Access is that it has upgrade capabilities. If

    the size of FastCabs database is continually growing and the performance starts to suffer, we can

    easily upgrade to SQL Server along with an Access Data Project (ADP).

    Backup: 

    The database can be backed up to prevent the loss of data.

    GUI interface:

    Another advantage is, it provides excellent graphical user interface (GUI) whereas most database

    management tools provide console operating interface (CUI). This feature creates excellent User-

    friendly environment.

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    18/37

    Islamabad

    Ahmed Ali Khan  HD-92224  18

    Prototyping:

    Software prototyping is a risk-reduction

    technique commonly used in software

    development when the requirements of the

    system under development are not well

    defined. For this purpose a software prototype

    is a partial implementation of the system to be

    built. This software prototype is exposed to user

    comment and then refined to meet additional

    requirements or correct errors.

    SDLC:

    The Systems Development Life Cycle (SDLC) is a

    process used in the development, creation, and

    maintenance of an information system. This

    process is often used in the creation or updating

    of a database system, and can serve as a useful

    tool for anyone trying to undertake a large

    database project.

    Its often denoted as DBLC.

    For Prototyping and Database development process we can use The SDLC(System Development Life

    Cycle).

    As a specific type of information system, Database Design can be modeled using a similar SDLC type

    approach, sometimes referred to as DBLC or the Database Development Life Cycle. As in the SDLC

    approach, DBLC consists of several iterative steps (which vary slightly depending on the model used).

    However, the overall approach is the same:

    Our DBLC will comprise of the following Six steps:

    STEP-1: Database Initial Design

    This stage is essentially the planning stage of the SDLC.

    Understand database design techniques.LO 2 

    Based on the requirements and the assumptions you have made of FastCabs case

      study, analyze the use of popular Prototyping database development methodology. 

    Task

    •  Purposes 

     –  Analyze company situation 

    •  Operating environment 

    •  Organizational structure 

     –  Define problems and constraints 

     –  Define objectives 

     –  Define scope and boundaries 

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    19/37

    Islamabad

    Ahmed Ali Khan  HD-92224  19

    STEP-2: Database Design

    This stage encompasses much of both the Analysis and Design stages of the SDLC.

    STEP-3: Implementation & LoadingThe efforts so far are implemented!

    STEP-4: Testing & Evaluation

    Make sure that the Database is working as planned!

    •  Most Critical DBLC phase 

    •  Makes sure final product meetsrequirements 

    •  Focus on data requirements 

    •  Sub phases 

     –  Create conceptual design 

     –  DBMS software selection 

     –  Create logical design 

     –  Create physical design 

    •  Creation of special storage-related

    constructs 

    to house end-user tables 

    •  Data loaded into tables 

    •  Other issues 

     –  Performance 

     –  Security 

     –  Backup and recovery  –  Integrity 

     –  Company standards 

     –  Concurrency controls 

    •  Database is tested and fine-tuned forperformance, integrity, concurrent

    access, and security constraints 

    •  Done in parallel with application

    programming 

    •  Actions taken if tests fail 

     –  Fine-tuning based on reference

    manuals 

     –  Modification of physical design 

     –  Modification of logical design 

     – 

    Upgrade or change DBMSsoftware or hardware 

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    20/37

    Islamabad

    Ahmed Ali Khan  HD-92224  20

    STEP-5: Operation

    The Database is up and running! Of course problems arise, and changes are always necessary!

    STEP-6: Maintenance & Evaluation

    Changes are made to the system as problems are solved and new requirements are identified.

    In short, the process begins anew!

    •  Database considered operational •  Starts process of system evaluation 

    •  Unforeseen problems may surface 

    •  Demand for change is constant 

    •  Preventative maintenance 

    •  Corrective maintenance 

    •  Adaptive maintenance 

    •  Assignment of access permissions 

    •  Generation of database access statistics

    to monitor performance 

    •  Periodic security audits based onsystem-generated statistics 

    •  Periodic system usage-summaries 

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    21/37

    Islamabad

    Ahmed Ali Khan  HD-92224  21

    ERM:

    The entity-relationship model (or

    ER model) is a way of graphically

    representing the logical

    relationships of entities (or

    objects) in order to create a

    database. The ER model was first

    proposed by Peter Pin-Shan Chen 

    of Massachusetts Institute of

    Technology (MIT) in the 1970s.

    What is Entity Relationship Diagram?

    An entity-relationship diagram (ERD) is a graphical representation of an

    information system that shows the relationship between people,

    objects, places, concepts or events within that system. An ERD is a data

    modeling technique that can help define business processes and can be

    used as the foundation for a relational database.

    Three main components of an ERD are the entities, which are objects or

    concepts that can have data stored about them, the relationship

    between those entities, and the cardinality, which defines that

    relationship in terms of numbers.

    Normalization:

    One of the ways an ERD is enhanced during the logical design phase is through the process of

    normalization. Normalization is one of the key tenets in relational model design. It is the process of

    removing redundancy in a table so that the table is easier to modify. It usually involves dividing an

    entity table into two or more tables and defining relationships between the tables. The objective is

    to isolate data so that additions, deletions, and modifications of an attribute can be made in just one

    table and then propagated through the rest of the database via the defined relationships.

    Performing normalization during ERD development can improve the conceptual model, and speed its

    implementation.

    Entity Relationship Diagram for FastCabs:

    As we know that all of the required fields and their attributes are provided by the CEO of FastCabs I

     just categorized them in their relevant Tables.

    Made some enhancements to their respective entries.

    Included some more precise and to the point entries.

    Made a logical schema design so I can determine relationship between tables.

    Determined primary and foreign keys.

    The Following EERD was developed:

    Discuss entity-relationship modeling and normalization. Task

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    22/37

    Islamabad

    Ahmed Ali Khan  HD-92224  22

    Contracts

    Contract ID

    Start Date

    End Date

    Rate

    Total Charge

    DriversDriver ID

    Driver Name

    Mobile Num

    Gender DOB

    Driver Add

    License No

    License Type

    License Expiry

    Penalty Points

    Job

    Job ID

    Job

    Phone

    Contract ID

    Pickup Add

    Drop Add

    Pickup Date

    Pickup Time

    VehiclesVehicle ID

    Reg Number

    Veh_Model

    Veh_Make

    Veh_Color

    Veh_Capacit

    Milage

    MOT Due

    Office

    Address

    Address ID

    Address

    City

    Postal Code

    StaffStaff ID

    First Name

    Last Name

    Staff Add

    Designation

    Salary

    NIN

    Gender

    DOB

    User NamePassword

    Client

    Client ID

    Client Name

    Phone No

    Client Add

    City

    Office

    Office ID

    Office Add

    Office Mail

    Manager

    Phone No

    ERD for FatsCabs:

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    23/37

    Islamabad

    Ahmed Ali Khan  HD-92224  23

    Prototyping the Database of FastCabs:

    As all the data set required was already explained to me and I had successfully developed the ERD

    for FastCabs Database. Hence I started the following:

      Step 1: Created the Tables in Accordance with the ERD.

      Step 2: Made raw forms for automated entry of data.

      Step 3: I generated some queries and Reports. As shown Below

    Be able to design, create and document

    databases. 

    LO 3 

    Apply prototyping database to the FastCabs data set. The purpose of this prototypeis to allow the Director to provide feedback on your proposed design. The prototype

    should facilitate the creation, maintenance and querying of records and where

    appropriate automate various tasks for the user. 

    Task

    This only the

    prototype

    RAW

    database

    design. Actual

    Interactive is

    designed in

    task 2

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    24/37

    Islamabad

    Ahmed Ali Khan  HD-92224  24

    1. Create the tables for the FastCabs database. Where appropriate set field and table properties,

    including any required indexes. Ensure that referential integrity is established between relatedtables.

    Complete the design of FastCabs database and implement it using MS-Access as a

    target DBMS including user interface. 

    Task

    Creation & All Tables

    Clients Table & its Design Properties

    Contracts Table & its Design Properties

    Driver Table & its

    Design Properties

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    25/37

    Islamabad

    Ahmed Ali Khan  HD-92224  25

    Office Table & its Design Properties Job Table & its Design Properties

    Staff Table & its

    Design Properties

    VehicleTable & itsDesign Properties

    As Shown Above I created All of the required Tables and their fields.

    Forms Shown Below:

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    26/37

    Islamabad

    Ahmed Ali Khan  HD-92224  26

    Info

    Link to FastCabs Website

    Forms Section Contains

    Navigation Buttons to all Forms

    Reports Section Contains

    Navigation Buttons to all Reports

    Query button Leads to a

    dedicated Query Form

    Exits the Whole Database

    Main

    Menu

    Clients Theme

    Close & Back to Main

    Data View & Entry Area

    Record Navigation

    Record Manipulation

    Record Printing Button

    Clients

    Form

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    27/37

    Islamabad

    Ahmed Ali Khan  HD-92224  27

    Contracts Data View & Entry form

    Drivers Data View & Entry form

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    28/37

    Islamabad

    Ahmed Ali Khan  HD-92224  28

    Jobs Data View & Entry form

    Staff Data View & Entry form

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    29/37

    Islamabad

    Ahmed Ali Khan  HD-92224  29

    Vehicle Data View & Entry form

    Navigation form for Queries

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    30/37

    Islamabad

    Ahmed Ali Khan  HD-92224  30

    Reports: As shown in Main Menu there is a separate section for Report generation:

    Each Button Shows a

    Corresponding Report

    Which then has options

    for

    Printing

    Mailing

    & Exporting

    Date Stamp Report Preview Mailing, Exporting &

    Printing Options

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    31/37

    Islamabad

    Ahmed Ali Khan  HD-92224  31

    Database Security: [Login Authentication]

    I created a separate login form:

    Set control sources for LoginID and Password which were in staff table:

     

    After that I set the close events for exit button.

    Set properties as modal form so on startup the user

    must enter username password.

    Set masking's for Password so they can't be visible.

    Started working on the VB Code for Login Button

    As Shown Below:

    VB Code for Login

    Setting MsgBoxs Login Requirment Integrating User name Password location.

    Closing and Main

    Menu Open Cmds

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    32/37

    Islamabad

    Ahmed Ali Khan  HD-92224  32

    On my way out I Disabled some options to Enable effective security performance:

     

    The result was as desired:

    To be Sure of the security measures. I ran some further tests on the "login"

    which turned out to be Satisfactory.

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    33/37

    Islamabad

    Ahmed Ali Khan  HD-92224  33

    Effectiveness of the Database in overcoming the problems:

    After Testing, Evaluation and Implementation it's clear that the database has successfully overcame

    the following problems:

    Problem Is it Solved RemarksHuge amounts of Paperwork Paperwork is almost eliminated. Through E-

    Records. A good Sign for Operating Costs.

    Massive Staff Clerical and paper handling staff can now be

    reduced to minimum.

    Lack of Communication &

    Distribution

    Now with DBMS deployed strong

    Communication & Distribution is in Place.Mistakes No mistakes with DBMS.

    Increases in operating Cost All of the above ultimately result in dramatic

    reduction of Operating cost.

    Bankruptcy No chance of Bankruptcy if All of the above

    problems are solved.

    Suggestions for improvement of the Existing DBMS:

    Although the FastCabs DBMS is more than capable of doing the

    required job but there is always room for improvements:

    Which are:

      The Database should be integrated with a web based application so Customers can

    make an On-Line booking.

      The database should be configured as a JET Database so just install and run.

      User Level Security clearance should be configured to tighten the security.

      A web integrated report generation system should be deployed so the CEO can see his

    company's progress anywhere anytime.

    Evaluate the effectiveness of the database solution and suggest methods of

    improvement. 

    Task

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    34/37

    Islamabad

    Ahmed Ali Khan  HD-92224  34

    User manual:

    1. Open the Database File:

    2. Enter Username and Password as provided by your IT-Admin.

    3. Choose your desired field among main menu items:

    Create a user manual that describes your database solution for the FastCabs

    database. The user manual should introduce the database application to the users,

      describe the functionality of the database application and clearly demonstrate how

    to use the application. 

    Task

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    35/37

    Islamabad

    Ahmed Ali Khan  HD-92224  35

    4. To view records or to create new just click on the related form:

    5. To view or Print report just click on the desired report from main Menu and Right Click for more

    Options:

    6. To generate a Query just click on the Button and click on desired Query:

     

    7. To Exit Application Just Click In main Menu.

    Use Navigation to

    explore other records

    Use form close or Main

    Menu Buttons

    Create or Print Records

    Using These

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    36/37

    Islamabad

    Ahmed Ali Khan  HD-92224  36

    Database managers, sometimes referred to as database administrators, identify a

    company's information management needs and create a database to meet those needs.

    They also merge old and new databases, ensure that databases operate correctly, ensure

    that database information is secure, and fix any related problems.

    Besides

    No business solution could work without database. SQL is the language to use in almost all

    databases. SQL programming skill is a must for all IT professionals, especially database

    programmers and solution developers. In addition to basic SQL programming skill, youshould also master vendor-based SQL extensions - SQL in Oracle, IBM DB2, and Microsoft

    SQLServer.

    Some Work designations Database Administration:

    Designation DescriptionDatabase

    Administrator

    (DBA)

    Responsible for installing, configuring and maintaining a database

    management system (DBMS). Often tied to a specific platform such as

    Oracle, MySQL, DB2, SQL Server and others.

    DatabaseDeveloper

    Works with generic and proprietary APIs to build applications that interactwith DBMSs (also platform specific, as with DBA roles).

    Database

    Designer/Database

    Architect

    Researches data requirements for specific applications or users, and designs

    database structures and application capabilities to match.

    Data Analyst/Data

    Scientist

    Responsible for analyzing data from multiple disparate sources to discover

    previously hidden insight, determine meaning behind the data and make

    business-specific recommendations.

    Data

    Mining/Business

    Intelligence(BI)

    Specialist

    Specializes in dissecting, analyzing and reporting on important data streams,

    such as customer data, supply chain data, transaction data and histories,

    and others.

    Data Warehousing

    Specialist

    Specializes in assembling and analyzing data from multiple operational

    systems (orders, transactions, supply chain information, customer data and

    so forth) to establish data history, analyze trends, generate reports and

    forecasts, and support general ad hoc queries.

    Top 5 Database Certifications.

      OCP: Oracle Certified Professional.

      ICCP CDMP: Certified Data Management Pro.

      Microsoft SQL Server Database Certifications.

     

    IBM Information Management Certifications.

      MongoDB NoSQL Certifications.

    Career In Database

  • 8/18/2019 Ahmed Ali [Database Design & Concepts]

    37/37