1/199
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
What is data modeling?
The process of creating a specific data model for a determined problem.
What is a data model?
A simple representation of complex, real-world data structures, often graphical.
What is a model?
An abstraction of a more complex real-world object or event.
What type of process is data modeling?
An iterative and progressive process.
What does iterative mean in data modeling?
The model is repeatedly reviewed and refined as requirements become clearer.
What are the three requirements of an implementation-ready data model?
A description of the data structure, enforceable rules for data integrity, and a data manipulation methodology.
What guarantees data integrity in an implementation-ready data model?
A set of enforceable rules.
What guarantees data integrity in an implementation-ready data model?
A set of enforceable rules.
What are the four basic building blocks of all data models?
Entities, attributes, relationships, and constraints.
What is an entity?
A person, place, thing, idea, or event about which data will be collected and stored.
What should an entity always represent?
One theme of data.
What is an attribute?
A characteristic of an entity
What is a relationship?
An association among entities.
What is a constraint?
A restriction placed on data to ensure data integrity.
What are the three relationship types?
One-to-one (1:1), one-to-many (1:M), and many-to-many (M:N).
What is a one-to-one (1:1) relationship?
One instance of an entity is associated with one instance of another entity.
What is a one-to-many (1:M) relationship?
One instance of an entity can be associated with many instances of another entity.
What is a many-to-many (M:N) relationship?
Many instances of one entity can be associated with many instances of another entity.
A customer may have many cars, but each car belongs to only one customer. What relationship is this?
One-to-many (1:M)
What are the entities in the customer-and-car example?
CUSTOMER and CAR
A student may take many classes, and each class may have many students. What relationship is this?
Many-to-many (M:N)
What are the entities in the student-and-class example?
STUDENT and CLASS
Each department is managed by one employee, and each manager can manage only one department at a time. What relationship is this?
One-to-one (1:1)
What are the entities in the department-and-manager example?
DEPARTMENT and EMPLOYEE
What is the constraint in the department-and-manager example?
Each manager can manage only one department at a time.
Give an example of an attribute for the CUSTOMER entity.
CUSTOMER_NAME or CUSTOMER_ID
Give an example of an attribute for the CAR entity.
CAR_ID, MAKE, or MODEL
In the student-and-class example, what is the relationship?
A STUDENT enrolls in a CLASS
What is a business rule?
A brief, precise, and unambiguous description of a policy, procedure, or principle.
What do business rules describe?
Characteristics of data as viewed by the organization.
What do business rules help database designers establish?
Entities, relationships, and constraints.
How should business rules always be written?
In business-focused, non-technical language.
What are five sources of business rules?
Executives, managers, policy makers, written documentation, and end-user interviews.
Executives, managers, policy makers, written documentation, and end-user interviews.
They standardize the company's view of data, facilitate communication, and help create accurate data models.
What do nouns generally translate into when analyzing business rules?
Entities
What do verbs generally translate into when analyzing business rules?
Relationships among entities
Are relationships unidirectional or bidirectional?
Always bidirectional
What two questions should be asked to determine a relationship type?
How many instances of B relate to one A, and how many instances of A relate to one B?
A customer may generate many invoices, but each invoice belongs to one customer. What relationship is this?
One-to-many (1:M)
What are the entities in the customer-and-invoice business rule?
CUSTOMER and INVOICE
What is the relationship verb in the customer-and-invoice example?
Generates
What do business rules help designers understand?
The nature, role, and scope of data and business processes
What relationship details do business rules help designers develop?
Appropriate relationship participation rules and constraints.
What are the three requirements for entity names?
Be descriptive, use familiar terminology, and use singular nouns
Should entity names be singular or plural?
Singular
What is the preferred attribute name: CUSTOMER_NAME or C_NAME?
CUSTOMER_NAME because it is more descriptive
What are two benefits of proper naming conventions?
They facilitate communication and promote self-documentation.
Why is storing a full customer name in one attribute a liability?
It makes separating individual attribute values difficult.
What is the best practice for storing attributes with multiple components?
Break them into atomic, component parts.
How should a customer name be stored according to the slide's best practice?
As separate attributes, such as CUSTOMER_FNAME and CUSTOMER_LNAME.
What should every record have?
A unique identifier.
What is the purpose of a unique identifier?
To distinguish one record from all other records in the file.
What are the attribute name length limits mentioned for SQL Server and MySQL?
SQL Server: 128 characters; MySQL: 64 characters. |
A painter can paint many paintings, but each painting has only one painter. What relationship is this?
One-to-many (1:M)
A painter has a studio, and each studio is occupied by only one painter. What relationship is this?
One-to-one (1:1)
Scenario:
A painter can paint many paintings. Each painting is painted by only one painter.
A painter has a studio. Each studio is occupied by only one painter.
A painter can exhibit paintings at more than one gallery at a time.
What entities are involved in the painter practice problem?
PAINTER, PAINTING, STUDIO, and GALLERY.
Scenario:
A painter can paint many paintings. Each painting is painted by only one painter.
A painter has a studio. Each studio is occupied by only one painter.
A painter can exhibit paintings at more than one gallery at a time
What relationship exists between PAINTER and PAINTING?
PAINTER paints PAINTING.
Scenario:
A painter can paint many paintings. Each painting is painted by only one painter.
A painter has a studio. Each studio is occupied by only one painter.
A painter can exhibit paintings at more than one gallery at a time
What relationship exists between PAINTER and STUDIO?
PAINTER occupies STUDIO
Scenario:
A painter can paint many paintings. Each painting is painted by only one painter.
A painter has a studio. Each studio is occupied by only one painter.
A painter can exhibit paintings at more than one gallery at a time
What relationship exists between PAINTER and GALLERY?
PAINTER exhibits paintings at GALLERY
A small online bookstore wants to build a database to manage its customers, books, and orders
What information must the online bookstore database track?
Available books, customers and their orders, and customer payments.
What should you evaluate in AI-generated business rules?
Whether they describe reasonable business requirements, are clearly written, and identify useful entities, relationships, and constraints.
Why should AI-generated business rules be evaluated before database design?
To ensure they represent valid business requirements rather than merely technical details
What was the first-generation data model?
File system, 1960s–1970s.
What models were introduced in the second generation?
Hierarchical and network models, 1970s.
What model was introduced in the third generation?
Relational model, mid-1970s.
What models emerged in the fourth generation?
Object-oriented and object/relational models, mid-1980s.
What characterized the fifth generation?
XML and hybrid DBMS, mid-1990s.
What characterized the sixth generation?
NoSQL, key-value stores, and column stores, early 2000s.
what was the first data model?
Hierarchical model.
What structure does the hierarchical model use?
An upside-down tree.
Why was the hierarchical model developed?
To manage large amounts of data for complex manufacturing projects.
What are disadvantages of the hierarchical model?
Complex implementation, difficult management, lack of structural independence, and no standards.
Why was the network model created?
To represent complex data relationships more effectively.
How does the network model differ from the hierarchical model?
It allows a record to have more than one parent
What three database concepts emerged with the network model?
Schema/subschema, DML, and DDL.
What does DML stand for?
Data Manipulation Language
What does DDL stand for?
Data Definition Language.
What are disadvantages of the network model?
Cumbersome design, structural dependence, and lack of ad hoc query capability.
Which model improved database performance and imposed a database standard?
Network model
Who developed the relational model, and when?
E. F. Codd at IBM in 1970.
What mathematical concept forms the foundation of the relational model?
Set theory, specifically a relation.
What is a relation?
A matrix consisting of row/column intersections, also called a table.
What is a tuple?
One row in a relation.
What is an attribute in a relational table?
One column in a relation.
What system implements the relational data model?
Relational Database Management System (RDBMS).
What is an important advantage of an RDBMS?
It hides the complexities of the relational model from users.
How does the user see a relational database?
As a collection of tables containing data.
What is a relational schema or relational diagram?
A graphical representation of relations, attributes, and relationships.
What does SQL stand for?
Structured Query Language
What are the three components of an SQL-based relational database application?
End-user interface, collection of tables, and SQL engine.
What is the purpose of the end-user interface?
Allows end users to interact with data.
What does the SQL engine do?
Executes all queries.
How are rows in different relational tables related?
Through common values in common attributes
What major advantage does SQL provide?
It makes retrieving data easier than in earlier database environments.