Chapter 02-Database 3CS
Chapter 02-Database 3CS
Level #3
Chapter #2
Database
2020
Q1. What is the difference between Flat-file and relational database?
Flat File:
Contains only one table for all data.
Result in high levels of data redundancy.
Example:
Relational database:
Is a relationship among relations (Tables).
Consists of a collection of tables, each of which is assigned a unique name.
Example:
1 DataBase 2020
5) Index: A collection of data and reference information used to locate records
more quickly in a table.
6) View: One of the objects in databases. A stored SQL SELECT statement, used to
make data access simple.
7) A trigger: A group of SQL statements that executed automatically when specified
events occur.
8) Relation schema: Consists of name of a table and list of its attributes.
Q3. What is the difference between Super Key, candidate key, primary key
and foreign key?
عبارة عن مجموعة األعمدة (عمود واحد او اثنين او اكثر ( والتي من الممكنSuper Key
.ان تعرف أي صف فريد داخل الجدول
يتم اختياره كمفتاحSuper Key األقل في عدد األعمدة داخل الCandidate key
.مرشح
Candidate Key هو العمود الذى يتم اختياره من الـPrimary Key
PK ⊂ CK ⊂ SK
عباره عن عمود ال بد ان يكون مفتاح أساسي في جدول اخر ويكونForeign key
.من نفس النوع ويستخدم ف العالقة بين الجدولين
2 DataBase 2020
Q5. Rewrite the following queries using relational algebra and write output.
3 DataBase 2020
4 DataBase 2020