Sunteți pe pagina 1din 32

Introduction

This assignment is expanded report which is essentially data base system nothing
more than a computerized records keeping system. The user of system will be
given facilities to perform a verify of operations data record such as inserting,
retrieving, updating and deleting data.

This reports will be 4 tasks,

Describe for given scenario of Hotel room booking and Critical review.
Design a database via entity relationship diagram with Microsoft SQL
server,
Implementation of SQL server database via DDL and DML,
Demonstrate advance SQL server features.

Design database model , that use of Microsoft SQL server 2008,Microsoft visual Studio
versions, C# programming Language, and ASP.net .

This database was created with a future plan to use it online room booking system
via web application. This system enhancing study enabled customers to book
reservations for whatever system they want to place them where before lodging. The
database will also provide large number of reports and information.

Case study
3.1. Case Study Scenario
Hotel room booking is designed to hold information relating to a system. It is
needed to defined facts are the requirements which the database must meet and
should agreed between database user and the database designer prior to physical
creation. System will facilities some of the below functions and more,

Details of Hotel room facilities


Room types

Room facilities

1|Page
Room band

Room prices

Customer and Guest details


Room Booking details
Total rooms

Booking room list

Available rooms

Keep track of the Bookings Payments Details


Payment Methods

Discount

A local hotel needs a database that keeps track of its booking current, future,
achieved , rooms and guest. Database will design several tables which is connected
to each other base on the relationships.

Additional Considerations
This database will be implementing with a future plan to use it online room booking
system via web application. This system enhancing study enabled customers to book
reservations for whatever system. They want to place then where before lodging.

Additionally this database will be supposed to implement the storage of guest details so
that larger collection

Deliverables
Advanced Database system is ICA ,that regarded as a contribution to a my personal
development. By developing this assignment , I have achieved the below knowledge
areas.

3.3.1. Microsoft SQL Sever Database

2|Page
Installing Microsoft SQL Server 2008 management studio
successfully in my computer.
Learn about Entity Relationship Diagrams.
Learn about Normalization.
Creating database to the Hotel Room Booking with functional
relationship in database including features for a real world.
Creating Partial ER diagram to understand and depicting of the room
booking database.
Creating tables.
Creating Primary Keys.
Creating foreign keys.
Creating relationship between the tables Creating Constraints &
Triggers.
Creating a stored procedures.
Creating queries for the database to get required details.
Show understanding of SQL programming code such as DDL AND
DML.
Demonstrate advanced SQL server features.

3.3.2. Other Deliverables


When asking questions of the database may need know,

How many rooms currently available for booking?


What facilities are available in particular rooms?
Which guests are booked in this week?

5.1. Full Entity Relation ship Diagram

Figure 1.0 : Full Entity Relation ship Diagram

3|Page
5.5.1 Table Customer
Below are the screenshots of the DB HOTEL RESERVE . They will display the
table design , data types of the field ,primary key, Foreign key, as well as
constraints imposed. Each table design screenshot is followed with some
sample data screen show.

5.5.2. All tables with ERD Diagrams


Below is how the database looked liked inside the object Explorer panel under
Microsoft SQL Server 2008,management studio.

Five Database Diagram Seventeen Data tables


Five Views
One Stored Procedures

4|Page
5|Page
Figure 6.0 DB HotelReserve
inside the object explorer Panel

Figure 7.0: DB HotelReserve view inside the object explorer panel

6|Page
5.5.3. Table Guest

Below will display the design of Table Customer inside the object Explorer
panel, design window and sample data retrieved with a system generation
DML statement.

Figure 8.0: Create table statement

5.5.4. Table Guest in Object explorer

7|Page
Figure 9.0: Table Guest in Object explorer

5.5.5. Table Guest Design view

Figure 10.0: Table Guest Design view

8|Page
5.6.6. Table Guest Sample Data

Figure 11.0: Table Customer with Data


retrieved
NOTE : Above screenshot of data is based on the SQL DML statement
generated by the system.SQL statements will be displayed with in this report
when it comes later topics.

7.7. Select Tables with Condition


Below SQL code will display an instance where a table is selected view
records. But the records are filtered based on condition .

9|Page
7.8. Alter Tables- Adding Column for the
table
Below SQL will add a dummy column for the
table.

7.9. Delete Columns


Below SQL Code will delete the column from a table.

7.10. View With where clause


Below is a bit advanced SQL code which can filter the result .

10 | P a g e
7.11. Insert Data within a table

7.12. Create Primary key


Below code will alter the table to add a primary key to the table guest.

7.13. Create Foreign key


Below SQL will display how a foreign key is created . this will connect to two
tables.

11 | P a g e
7.14. Create Constraints

7.14. Create Stored Procedures


Below SQL will create a stored procedure called spgetBooking to search
booking

7.15. Create Trigger

Below SQL will show you a trigger created for the INSERT active of Booking
table.

12 | P a g e
7.16. Create Index

Below Display create index in Guest table.

Create a my first SSIS Package

Create new Project

13 | P a g e
Figure
23.0. Create New Project

Select Business Intelligence


Select Integration Services

Select Integration service project then OK.

14 | P a g e
Figure 24.0. Integration Service project

15 | P a g e
Figure 25.0. Create Data Flow Task

26.0. Create to Script Task and Data flow Task

16 | P a g e
Figure

26.0. Connecting to Task

In this task add a flat file connection Manager,

Figure 28.0 Configuring Flat file Manager

Add and configure OLE DB connection manager


Figure 29.0. OLE DB connection manager

Adding Multicast

17 | P a g e
Figure 30.0.

Adding multicast

Connecting to data flow tasks

Figure 31.0. Connecting to data flow tasks


New data connection Manager

18 | P a g e
Figure 32.0 New Data Connection Manager
Connecting to simple database and setting to column

Figure 33.0 Connecting to the Table and setting to column

Change the column in table

19 | P a g e
Figure 34.1. Change the column in table

Figure 35.0. selecting column name

20 | P a g e
Figure36.0. OLE DB connection manager

21 | P a g e
Figure 37.0. Selecting Server Name

Figure38.0. Create a Table

22 | P a g e
Figure 39.0. Run Data flow Tasks

Figure 40.0. View Data Sucessfully Migration

8.1. Microsoft SQL Server Analysis Service-SSAS


Creating a sample database with Microsoft SQL server 2014.It will let us analyze data.

Figure 41.0 Select Analysis and Data


Source Views

23 | P a g e
Figure 42.0 Select a Data
source

Figure 43.0 Data Connection Error

8.2. SQL Server Reporting Service-SSRS


It will let us create reports from analyze data and present it to end user.

24 | P a g e
Figure 44.0 open
visual Studio

25 | P a g e
This error (and some other errors) cam repeatedly for various restore scenarios! I could not
restore the database from .BAK files; although the backup file was created successfully! Most
online resource I referred didnt work for me either!

26 | P a g e
Figure 45 .0 New Project

27 | P a g e
Figure 46.0 Select ADO.NET Entity Data Model

Figure47.0 Choose Model


Content

28 | P a g e
Figure 48.0 Choose Data Connection

29 | P a g e
Figure 49.0 Add Connection

Figure 50.0 Choose Database


Objects

30 | P a g e
Figure 51.0 View a Tables

Figure 52.0 View Model Data

Figure 53.0 Query View in Hotel

Reserve Database

31 | P a g e
Figure 54.0 Display a data in Table
Customer

Figure55.0 Display Error Massage

32 | P a g e

S-ar putea să vă placă și