tailieunhanh - Hướng dẫn sử dụng MySQL part 8

Một khi bạn cài đặt phần mềm quản trị CSDL của bạn trên máy tính của bạn, nó có thể rất hấp dẫn để chỉ nhảy ngay vào việc tạo ra một cơ sở dữ liệu mà không cần suy nghĩ nhiều hoặc quy hoạch. Như với bất kỳ phát triển phần mềm, cách tiếp cận này đặc biệt quảng cáo chỉ làm việc với các đơn giản nhất của vấn đề. Nếu bạn mong đợi cơ sở dữ liệu của bạn để hỗ trợ bất kỳ loại phức tạp, một số quy hoạch và thiết kế chắc chắn sẽ. | DRAFT 8 24 01 8 Database Design Once you install your DBMS software on your computer it can be very tempting to just jump right into creating a database without much thought or planning. As with any software development this kind of ad hoc approach works with only the simplest of problems. If you expect your database to support any kind of complexity some planning and design will definitely save you time in the long run. You will need to take a look at what details are important to good database design. Database Design Primer Suppose you have a large collection of compact discs and you want to create a database to track them. The first step is to determine what the data that you are going to store is about. One good way to start is to think about why you want to store the data in the first place. In our case we most likely want to be able to look up CDs by artist title and song. Since we want to look up those items we know they must be included in the database. In addition it is often useful to simply list items that should be tracked. One possible list might include CD title record label band name song title. As a starting point we will store the data in the table shown in Table 2-1. Table 2-1 A CD Database Made Up of a Single Table continued Band Name CD Title Record Label Songs Stevie Wonder Talking Book Motown You Are the Sunshine of My Life Maybe Your Baby Superstition . . . Miles Davis Quintet Miles Smiles Columbia Orbits Circle . . . Wayne Shorter Speak No Evil Blue Note Witch Hunt Fee-Fi-Fo-Fum Herbie Hancock Headhunters Columbia Chameleon Watermelon Copyright 2001 O Reilly Associates Inc. 1 DRAFT 8 24 01 Herbie Hancock Maiden Voyage Blue Note Man . . . Maiden Voyage For brevity s sake we have left out most of the songs. At first glance this table seems like it will meet our needs since we are storing all of the data we need. Upon closer inspection however we find several problems. Take the example of Herbie Hancock. Band Name is repeated twice once for .

TỪ KHÓA LIÊN QUAN