You are on page 1of 24

HUTECH INSTITUTE OF INTERNATIONAL EDUCATION

CBDB4103

INTERMEDIATE DATABASE

FULL NAME: TRUONG PHAM TAN PHAT

CLASS: 21BOIT01

STUDENT ID: 2154030072

EMAIL: phattruong.mt.23@gmail.com

LECTURER: Le Ngoc Hieu


Contents
1. Introduction ................................................................................................................. 3
2. Body.............................................................................................................................. 8
a. Data base name: Roombooking ............................................................................. 8
b. Table creation: 04 tables ......................................................................................... 9
c. Write the SQL code (or using GUI) to insert data into all tables: .................... 14
d. SQL Statement (a) List full details of all hotels .................................................. 17
e. SQL Statement (b) List the number of rooms in each hotel that are located in
Hanoi ............................................................................................................................. 17
f. SQL statement (c): List all double and family rooms with a price below
RM150 per night, in ascending order of price ........................................................... 18
g. SQL statement (d): List the details of all guests from Long An that make
booking more than twice.............................................................................................. 19
h. SQL statement (e): List all the detail of guests who is make a booking at the
Hilton Hotel, alphabetically order by name .............................................................. 19
i. SQL statement (f): Retrieve the average price of the room for each hotel ...... 20
j. Statement (g): Update the price for all rooms with a rise of 5% ...................... 20
k. Form creation......................................................................................................... 21
3. Conclusion ................................................................................................................. 23
4. References .................................................................................................................. 24
1. Introduction
Background: The Redwood City, California-based Oracle Corporation is a global
American company specializing in computer technology. The business focuses on creating,
promoting, and supplying database software, cloud services, and hardware solutions.
Oracle was founded 1977 by Larry Ellison, Bob Miner, and Ed Oates. With over 136,000
workers and projected 2020 sales of $40 billion, Oracle has grown to become one of the
largest software businesses in the world.

One of the company's flagship products is Oracle Database, a relational database


management system. This database software, which has become the industry standard for
handling data in mission-critical corporate applications, is dependable, secure, and
reasonably priced. Many enterprises and organizations, including banks, airlines,
telecommunications firms, and government agencies, use Oracle Database to handle their
data.

Oracle provides a wide range of cloud services, such as infrastructure as a service (IaaS),
platform as a service (PaaS), and software as a service (SaaS), in addition to its database
solutions. These services make it possible for businesses of all sizes to relocate their IT
infrastructure to the cloud, doing away with the requirement for hardware and software on-
premises. Oracle Cloud has a broad range of products and services that support the
development of cutting-edge applications, data analysis, and process automation.

The Java platform and programming language are other essential item in Oracle's portfolio.
Java is a programming language that developers widely use to create various software
applications, especially in business settings. The Java ecosystem has been driven by Oracle,
which is also responsible for the platform's evolution and improving Java applications'
security.

Oracle provides a variety of hardware devices in addition to its software offerings, such as
servers, storage, and networking tools. These systems, frequently used in conjunction with
its software solutions, assist enterprises in developing high-performance computing
environments capable of reliably and swiftly processing enormous amounts of data.

Oracle has also been investing more in cutting-edge technologies like artificial intelligence
and machine learning to improve its software products. The business has unveiled a
selection of AI and machine learning solutions intended to assist organizations in making
better decisions by automating some business operations, identifying patterns and insights
in vast amounts of data, and more.

One of its main advantages is Oracle's emphasis on offering comprehensive end-to-end


solutions that may meet various customer demands. Oracle provides a solution to assist
any business, whether it wants to manage its backend data infrastructure, create mission-
critical apps, or shift its IT infrastructure to the cloud. Oracle can meet the demands of a
wide variety of international clients by providing a comprehensive range of goods and
services.

As a result of its growth from a start-up, Oracle Corporation is now one of the world's most
prominent and most influential technology firms. Oracle continues to be a major player in
the software sector and a significant supplier of infrastructure and cloud solutions to
businesses worldwide, thanks to its focus on offering complete solutions and ongoing
innovation. (Wikipedia, 2023)

(Wikipedia, Oracle Corporation, 2023) products and services: In addition to creating,


producing, and selling hardware and software products, Oracle offers its customers
supplemental services (including hosting, financial services, training, and consulting).
Oracle's portfolio has grown significantly as a result of acquisitions.

The following other database technologies have been created by and are owned by Oracle
Corporation:

- With Berkeley DB's integrated database processing,


- Oracle RDB is a relational database management system on the OpenVMS
operating system. In 1994, Oracle purchased Rdb from Digital Equipment
Corporation. Since then, Oracle has significantly improved this software, and as of
2008, development has continued.
- Using in-memory database operations, TimesTen
- Oracle Essbase is a multidimensional database management system with the
Hyperion Essbase legacy.
- MySQL, a relational database management system created by MySQL AB and
distributed under the GNU General Public License,
- A scalable, distributed key-value NoSQL database is Oracle.
- Middleware: Application servers, systems integration, business process
management (BPM), user interface, content management, identity management, and
business intelligence (BI) tools are just a few of the middleware components in the
Oracle Fusion Middleware family.
- Search Oracle Secure Enterprise
- Users of Oracle's enterprise search engine, Oracle Secure Enterprise Search (SES),
may look for material in various places, including web pages, XML files, file
servers, content management systems, and more. Databases, business intelligence
systems, customer relationship management systems, enterprise resource planning
systems, and content.
- Oracle Honeycomb: The 2008-released Oracle Beehive collaboration tool combines
conferencing, email, calendars, and instant messaging with team workspaces
(including wikis, team scheduling, and file sharing). Customers can use Beehive as
licensed software or as a service (SaaS).

According (Accgroup, 2023) , advantages of Oracle: Oracle is well renowned for its
dependable database management system. It is also scalable. One of the market's most
reliable and scalable databases is Oracle Database, the company's flagship database
solution. It can accommodate several concurrent users, swiftly execute transactions, and
manage massive data. Oracle's database management system offers advanced security
features, backup and recovery capabilities, and support for many data types and formats.
The platform for Building, Integrating, and Managing Enterprise Applications: Oracle's
middleware solutions offer a complete platform. Application servers, service-oriented
architecture (SOA), business process management (BPM), and integration tools are some
of the technologies included in this platform. The middleware platform from Oracle makes
it possible for companies to develop, release, and manage applications rapidly and
effectively, with improved performance, dependability, and scalability.

Cloud solutions, the Infrastructure-as-a-Service (IaaS), Platform-as-a-Service (PaaS), and


Software-as-a-Service (SaaS) products offered by Oracle's cloud services are diverse.
These technologies help companies lessen their dependency on on-premises infrastructure
by enabling them to migrate their apps and data to the cloud. With its extensive
technological stack as the foundation, Oracle's cloud platform offers users a smooth,
integrated cloud experience.

Corporate resource planning (ERP), customer relationship management (CRM), human


capital management (HCM), and supply chain management (SCM) solutions are all
included in Oracle's complete portfolio of corporate applications. These apps provide
enterprises with a comprehensive solution for their business needs since they are
completely integrated with Oracle's database and middleware technology.

Oracle has operations in more than 175 countries and has a worldwide footprint. As a result
of the company's extensive network of partners, clients, and developers, its products and
solutions are supported by a global ecosystem. Due to Oracle's widespread presence,
companies of all sizes may use its keys.

Industry-specific Solutions, Oracle offers solutions tailored to specific industries in various


verticals, including finance, healthcare, manufacturing, and retail. These solutions are
created to solve each sector's particular issues, giving organizations a solution especially
suited to their needs.

Integration capabilities, Oracle's technologies are made to be quickly integrated with


products and services from other companies. It is simple for businesses to combine the
company's solutions with pre-existing systems and applications thanks to the various
integration tools and technologies the company offers.

(Sullivan, 2023), disadvantages of Oracle: One of the most expensive RDBMS products
on the market is Oracle. Some firms, especially smaller ones, may find the license and
support expenses exorbitant. Additionally, some of the more complex features have an
additional cost, which can dramatically raise the total price of the items.

Complexity, Oracle is a well-developed database system. To effectively manage and


administer it, particular knowledge and abilities are needed. This can be a major obstacle
for many firms, especially those with limited resources.

Performing poorly, Comparing Oracle to other RDBMS solutions, processing data might
occasionally need to be more active. This is especially true when handling massive datasets
or doing complex queries. Long wait times and poor productivity may arise from this.

Support problems, Compared to competing RDBMS solutions, Oracle's support is


somewhat subpar. Businesses that depend on the software for crucial operations may find
this frustrating.

Maintenance and upkeep of an Oracle database can be time- and money-consuming. It


needs frequent upgrades and fixes, which can be challenging for companies with little
funding.

Oracle databases may go down for various causes, including hardware failure, software
flaws, or human mistakes. Because downtime can result in lost income and productivity, it
can be expensive for enterprises.

Difficulties with compatibility and combining Oracle databases with other software
solutions might be challenging. This may be a great difficulty for companies that use
various software programs to handle multiple elements of their operations.
Security issues of Oracle security have been questioned due to several security lapses in
the past. Businesses that use the software to store confidential information might be
vulnerable to cyber-attacks.

Small scale ability although Oracle is renowned for its scalability, scaling up or down fast
can be difficult. Oracle may make it difficult for businesses that must swiftly scale up their
operations.

Due to the expense and complexity of the deployment, once a firm uses Oracle, it may
take time to transition to another RDBMS solution. As a result, businesses may be exposed
to vendor lock-in.

Oracle is an advanced system trusted by large corporations. In this course, I also learned
and learned a part about Oracle. Here are the answers to some of the homework questions
I've been given.

2. Body
a. Data base name: Roombooking

Figure 1: Database name


Figure 2: Create table Roombooking

b. Table creation: 04 tables


Hotel table
Code:
create table hotel (

hotelNo number(6),

hotelName varchar2(25),

city varchar2(20),

managerName varchar2(20),

numOfStaff number(25),
constraint hoNo_prim PRIMARY KEY (hotelNo)
);
Figure 3: The code image for Hotel table

Guest table
Code:
create table guest (

guestNo number(6),

guestName varchar2(10),

address varchar2(20),

phone number(10),

CONSTRAINT guNo_prim PRIMARY KEY (guestNo)


);

Add foreign key:


alter table booking
add constraint fk_guest FOREIGN KEY (guestNo)
REFERENCES guest (guestNo);

Figure 4: The code image for Guest table


Room table
Code:
create table room (

roomNo number(6),

hotelNo number(6) constraint hoNo_fk REFERENCES hotel (hotelNo),

room_type varchar2(20),
price number(6),

room_description varchar2(30),
CONSTRAINT roNo_prim PRIMARY KEY (roomNo)
);

Figure 5: The code image for Room table

Booking table
Code:
create table booking (
bookingNo number(6),

guestNo number(6),

roomNo number(6) constraint roomNo_fk REFERENCES room (roomNo),

hotelNo number(6) constraint hotelNo_fk REFERENCES hotel (hotelNo),

dateBooking date,

dateCheckin date,

dateCheckout date,

booking_description varchar2(25),

numberGuest number(25),
CONSTRAINT boNo_prim PRIMARY KEY (bookingNo)
);
Figure 6: The code image for Booking table

c. Write the SQL code (or using GUI) to insert data into all tables:
Hotel table:
Figure 7: Data of Hotel table

Guest table:

Figure 8: Data of Guest table

Room table
Figure 9: Data of Room table

Booking table
Figure 10: Data of Booking table

d. SQL Statement (a) List full details of all hotels

Figure 11: List full details of all hotels code

Figure 12: Result of list full detail code

e. SQL Statement (b) List the number of rooms in each hotel that are located
in Hanoi

Figure 13: List the number of rooms in each hotel that are located in Hanoi code
Figure 14: Result of list the number of rooms in each hotel that are located in Hanoi code

f. SQL statement (c): List all double and family rooms with a price below
RM150 per night, in ascending order of price

Figure 15: List all double and family rooms with a price below RM150 per night, in
ascending order of price code

Figure 16: Result of all double and family rooms with a price below RM150 per night, in
ascending order of price
g. SQL statement (d): List the details of all guests from Long An that make
booking more than twice

Figure 17: List the details of all guests from Long An that make booking more than twice
code

Figure 18: Result of list the details of all guests from Long An that make booking more
than twice

h. SQL statement (e): List all the detail of guests who is make a booking at
the Hilton Hotel, alphabetically order by name

Figure 19: List all the detail of guests who is make a booking at the Hilton Hotel,
alphabetically order by name code
Figure 20: Result of list all the detail of guests who is make a booking at the Hilton
Hotel, alphabetically order by name

i. SQL statement (f): Retrieve the average price of the room for each hotel

Figure 21: Retrieve the average price of the room for each hotel code

Figure 22: Result of retrieve the average price of the room for each hotel

j. Statement (g): Update the price for all rooms with a rise of 5%

Figure 23: Update the price for all rooms with a rise of 5% code
Figure 24: Result of update the price for all rooms with a rise of 5%

k. Form creation

Figure 25: Form of Booking


Figure 26: Form of Hotel

Figure 27: Form of Guest

Figure 28: Form of Room


3. Conclusion
Oracle is a program that major enterprises should use and one that students should
master. I've just done the homework questions and the introduction. This course has
assisted me in learning more about databases and how to utilize Oracle, which are crucial
components of any student's Information Technology major.
4. References
Accgroup. (2023, 06 10). Review of advantages and disadvantages, instructions for use
and quotation of accounting software Oracle updated 2023. Retrieved from
Accgroup: https://accgroup.vn/phan-mem-ke-toan-oracle/
Sullivan, D. (2023, 06 10). Advantages & Disadvantages of Oracle SQL. Retrieved from
Techwalla: https://www.techwalla.com/articles/advantages-disadvantages-of-
oracle-sql
Wikipedia. (2023, 06 10). Oracle Corporation. Retrieved from Wikipedia:
https://vi.wikipedia.org/wiki/Oracle_Corporation
Wikipedia. (2023, 06 10). Oracle Corporation. Retrieved from Wikipedia:
https://vi.wikipedia.org/wiki/Oracle_Corporation

You might also like