Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

‫االسم والشهرة‬:--------------------

‫الجمهورية اللبنانية‬
‫اإلمتحانات الرسمية لشهادة االجازة الفنية‬ ‫وزارة التربية والتعليم العالي‬
‫ األولى‬2021 ‫لدورة عام‬ ----------------------:
‫المرشحللتعليم المهني والتقني‬ ‫رقم‬
‫المديرية العامة‬
=========
)‫أ‬6905( ‫ فرع األنظمة والشبكات‬:‫ المعلوماتية‬: ‫اإلختصاص والرمز‬
)8( : ‫المعدل‬ ‫ قواعد المعطيات‬: ‫المادة‬
‫ ساعتان‬: ‫المدة‬ ‫ ال شيء‬:‫المستندات المسموح بها‬

‫"اإلجابات على "كراس اإلجابة‬


Treat the following questions:

I- Choose the correct answer: (1pt/ correct answer)

1- What does the acronym SQL stand for?


a- Simple Quote Lips
b- Structured Query Language
c- Simple Quite Language
d- Simple Quittance de Loyer
2- What is a database?
a- It is the set of created sheets with Excel; these sheets contain cells that can be linked together by formulas.
b- It is a set of rows and columns.
c- It is a structured set of data, on which we can perform processing and allow to extract information.
d- It is a collection of documents created with Word, linked together by hyperlinks.
3- What are SQL queries used for?
a- Insert constraints
b- Select data
c- Ask questions to a user
d- All of the above
4- In the WHERE clause, the IN condition:
a- Search by zero value
b- Search by an approximate value
c- Search in an interval between 2 values
d- Search in a given set
5- Which clause is used to modify an existing field in a table?
a- ALTER
b- FROM
c- SELECT
d- DELETE
6- At what doesn’t serve a view?
a- To ensure the logic independence
b- To ensure failure tolerance
c- To simplify the complex queries
d- To ensure the data confidentiality.
7- What is a foreign key?
a- A table field present in all the tables of database.
b- A table field that refers to a field that is a primary key in another table.
c- A table field belonging to a table in another database.
d- None of the above.
8- In a database, to select all records in a table "PRODUCTS", choose the appropriate SQL query:
a- select distinct ID from PRODUCTS;
b- select * from PRODUCTS where reference not null;
c- select * from PRODUCTS;
d- select * where PRODUCTS;
9- What part of SQL does REVOKE order belong to?
a- DML : Data Manipulation Language
b- DDL : Data Definition Language
c- DAL : Data Access Language
d- DCL : Data Control Language
10- With which query clause is the keyword ADD used?
a- FROM
b- WHERE
c- ALTER
d- ORDER BY

1/2
)‫أ‬6905( ‫ فرع األنظمة والشبكات‬:‫ المعلوماتية‬: ‫اإلختصاص والرمز‬
‫ قواعد المعطيات‬: ‫المادة‬

II- Open Questions: (1pt/ question)

Consider the following relational schema:

Item Order Supplier


ItemCode SuppCode SuppCode
Description ItemCode SupName
Quantity PurchasePrice Country
SalesPrice OrderQuantity
ExpiryDate DeliveryDate

Primary keys are underlined


Foreign keys are in italic

1- Create ORDER table, knowing that all fields are not empty and that the primary key is composed (SuppCode, ItemCode)

2- Create a sequence SEQSUPP for the SUPPLIER table, which starts at 500 and jumps from 2 to 2.

3- Using the sequence created for the primary key of SUPPLIER table, add a new supplier
(Walid, 03222222, Beirut).

4- Display the code and the description of items having a quantity in stock less than 3.

5- Display the code and the description of expired items.

6- Display the descriptions of items having an expiry date less than delivery date.

7- Remove the field DateExpir from the ITEM table.

8- Display the description of items with the difference between the sale prices and the purchase prices, in integer number.

9- Display the description of the item having the highest SalesPrice.

10- Display the names of suppliers having orders to deliver in December 28, 2021.

2/2

You might also like