11. Databases Flashcards
What are the drawback of storing data in one file and in folder?
Storing data in one file:
• Unsecure
• Inefficient
• Hard to find and delete
• Hard to correct
• Lack of control
Storing data in folders:
• Data becomes redundant. There is now a duplication across the files
• Data has to be rewritten if there will be a big change to its structure or data itself.
• Extracting big amounts of data would be a complex task
What is a primary key?
A primary key may be a single attribute or a combination of attributes that are unique to a particular table.
Secondary key vs Candidate key.
In some cases there may be more than one attribute for which unique values are guaranteed. In this case, each one is a candidate key and one will be selected as the primary key. A candidate key that is not selected as the primary key is then referred to as a secondary key
What is a Foreign key?
Foreign key - a primary key that is used from another table that is in relation with the used one
What is a query?
The query is the mechanism for extracting and manipulating data from the database.
What does DBMS provide?
The DBMS provides software tools through a developer interface. These allow for tables to be created and attributes to be defined together with their data types.
What is SQL?
SQL is the programming language provided by a DBMS to support all of the operations associated with a relational database.
What is DDL?
Data Definition Language (DDL) is the part of SQL provided for creating or altering tables. These commands only create the structure. They do not put any data into the database.
What is DML?
• Data Manipulation Language (DML):
1. Insert data into the tables when the database is created
2. Modification and removal of data in the database
3. The reading of data stored in the database
How is a row referenced in the table?
A tuple.
What is an attribute of a database?
In general, an attribute is a characteristic or a feature of data that corresponds to a column name in a table.
What is Relation?
Relation is a similarity between to things. A property that makes them relate to one another.