Fundamentals of Databases Flashcards
What is a data model?
A data model is an abstract model that determines what things to store in a database and what information should be recorded about them.
What are entities and attributes in database design?
In database design, an entity is a thing about which data is stored, such as a customer. Attributes are characteristics or information about entities, like the customer’s name or address.
How are entities and their attributes stored in a database table?
Entities are stored as rows in a table, and the fields of each row hold the attributes of the entity.
What is an entity identifier?
An entity identifier is a unique attribute given to each entity in a table, typically used as a primary key to ensure uniqueness.
What is the primary key?
Customer (CustomerID, CustomerName, CustomerAddress, CustomerEmail)
CustomerID
What is an entity description?
An entity description is used to describe how information about an entity is stored in a database table. It lists the entity’s attributes, with the entity identifier typically underlined.
What are the three degrees of relationship between tables in a database?
The three degrees of relationship are one-to-one, one-to-many, and many-to-many.
What are primary and foreign keys in a database?
A primary key is an attribute that uniquely identifies an entity in a table. A foreign key is an attribute in one table that references the primary key of another table.
What is database normalization?
Database normalization is the process of organizing a database to eliminate redundancy and improve data integrity. It involves removing repeating or duplicated data.
What are the three levels of database normalization?
The three levels of normalization are first normal form (1NF), second normal form (2NF), and third normal form (3NF).
What are the main SQL commands?
The main SQL commands are SELECT, UPDATE, INSERT, and DELETE
What is the SELECT command used for in SQL?
The SELECT command is used to retrieve data from a database table based on specified condition
What is the UPDATE command used for in SQL?
The UPDATE command is used to modify the attributes of existing entities in a database table.
What is the DELETE command used for in SQL?
The DELETE command is used to remove entities from a database table based on specified conditions.
What is the INSERT command used for in SQL?
The INSERT command is used to add new records (entities) to an existing database table