3.1. Analysis and design of National Computer Level 3 Database Examination (ER diagram)

Test question one:

Assume that you want to build a database about a professional basketball league and need to manage the following information:
each team has a team name and city;
each player has a player name and salary;
each game has a game number, game time, game results, The home team participating in the game, the away team participating in the game.
The underlined attributes are unique identifiers. Other requirements that need to be met are as follows:
each player belongs to only one team, each team has multiple players;
each player can participate in multiple games, multiple players participate in each game, and players participating in each game will There are corresponding statistics, including scores and rebounds.
Please try to draw the corresponding ER diagram based on the above description. (7 points)
Convert the ER diagram you drew into the corresponding relationship pattern and point out its primary key. (3 points)

ER diagram:
Insert image description here

Relationship model
Team ( team name , city)
Player ( player number , player name, salary, team number)
Game ( game number , game time, game result, home team, away team)
Data statistics items ( data Statistics item number , data statistics item name)
data statistics ( serial number, game number, player number, data statistics item number )

Question 2:

Suppose we want to build an academic paper database and store the following information:
· Academic journals have journal numbers, journal names, and issuing units; · Authors have author numbers, author names, and emails;
· Papers have paper numbers, paper titles, abstracts, and text ;
Each paper can only be accepted by one journal, and each journal can accept multiple papers;
Each paper can have multiple authors, and each author can write multiple papers;
Each paper can cite multiple other papers, and each paper can be cited by multiple other papers. The underlined attributes are the identity attributes of the entity.
(1) Please draw the corresponding ER diagram based on the above description.
(2) Convert the above ER diagram into a relationship pattern that satisfies 3NF.

ER diagram:
Insert image description here

Relationship pattern:
Academic journal ( journal number , journal name, issuing unit)
Author ( author number , author name, email)
Paper ( paper number , paper title, abstract, text, journal number)
Owned/written ( author number , paper number )
citation ( paper number , cited paper number)

Question three:

Insert image description here
ER diagram:
Insert image description here
relationship model:
teacher ( teacher number , teacher name)
course ( course number , course name)
course start ( teacher number , course number, course start time, course start location)

Question 4:

Insert image description here
ER diagram:
Insert image description here

Question five:

Insert image description here
ER diagram:
Insert image description here

Question 6:

Insert image description here
ER diagram:
Insert image description here

Relationship model:
Account ( account number , account name)
Loan note ( loan number , loan amount)
Installment note ( instalment number , installment amount)
Loan ( loan number , loan amount)
Repayment ( account number , installment number) , repayment date)

Question 7:

Insert image description here

is 图
Insert image description here

Question 8:

Insert image description here
ER diagram:
Insert image description here

Question 9:

Insert image description here
ER diagram:
Insert image description here

Relationship mode:
User ( user number , name, mobile phone number)
Group ( group number , group name, user number)
Post ( post number , posting time, text, user number, group number)
Join/Own ( user number , group number )

Question 10

Insert image description here
er diagram
Insert image description here
relationship model:
airport ( airport number , city)
flight ( flight number , departure time, flight time, airport number)
aircraft ( aircraft number , model, number of passengers)
pilot ( pilot number , name, aircraft number)
flying ( Flight record , aircraft number , flight number )

Question 11

Insert image description here
er diagram
Insert image description here
relationship model
Customer ( customer name , contact number, delivery address)
Product ( product name , category)
Store ( store name , credibility, registered address)
Sales ( store name , product name , sales price)
Purchase price ( customer name , Store name , product name , purchase price)

Question 12

Insert image description here

er diagram:
Insert image description here
relationship model
product ( product name , specifications)
employee ( employee name , gender, salary)
process ( process number , required materials, processing requirements, processing time, downstream process number)
downstream process ( process number , required materials, Processing requirements)

Question 13

Suppose a commercial unit needs to establish a business database to handle sales accounting. The data it records include: customer name, unit and phone number; product name, model, origin and unit price; quantity and date of a certain product purchased by a customer. Assume that there is no customer with the same name, no product of the same model, and the phone number is public. Customers can buy the same product on different dates.
(1) Please draw the business ER diagram model of the unit and optimize it. (6 points)
(2) Replace the ER model with a relational model and normalize it to 3NF. (4 points)

ER图
Insert image description here

Relationship model
Customer ( name , unit, phone number)
Product ( model , name, origin, unit price)
Purchase ( name, model , quantity, date)

Question 14

Insert image description here

ER图
Insert image description here

Relationship model
Teacher ( teacher number , teacher name, superior teacher number)
Professional title ( professional title name , salary)
Course ( course number , course name, credits, teacher number)
Textbook ( textbook number , textbook name, publisher, course number)

Guess you like

Origin blog.csdn.net/weixin_44391817/article/details/132390516