13.07.2015 Views

Software Engineering for Internet Applications - Student Community

Software Engineering for Internet Applications - Student Community

Software Engineering for Internet Applications - Student Community

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

stored. Suppose by contrast you were poking around in an unfamiliardatabase and encountered this table definition:create table address_book (address_book_idinteger primary key,user_id not null referencesusers,first_names varchar(30),last_name varchar(30),emailvarchar(100),email2varchar(100),line1varchar(100),line2varchar(100),city varchar(100),state_province varchar(20),postal_code varchar(20),country_code char(2) referencescountry_codes(iso),phone_home varchar(30),phone_work varchar(30),phone_cell varchar(30),phone_other varchar(30),birthdate date,days_in_advance_to_remind integer,date_last_reminded date,notes varchar(4000));Note the use of ISO countryThe author's source code comments codes, constrained by referencehave been stripped out yet it is to a table of valid codes, toreasonably clear that this table exists represent country in the tableabove. You don't want recordsto support an online address book.with "United States", "US", "us",Moreover the purpose of each"USA", "Umited Stares", etc.column can be inferred from its These are maintained by thename. Quite a few columns will be ISO 3166 Maintenance agency,NULL <strong>for</strong> each address book entry from which you can downloadbut not so many that the table will be the most current data in textabsurdly sparse. Because NULL <strong>for</strong>mat. Seecolumns take up so little space in the http://www.iso.ch/iso/en/prodsservices/iso3166ma/index.html.database you shouldn't decidebetween skinny and fat based on presumed data storage efficiency.Skinny is good when you are storing wildly disparate data on eachuser, such that you'd expect more than 75 percent of columns to beNULL in a fat data model. Skinny can result in strange-looking SQLqueries and data dictionary opacity.80<strong>for</strong> the person typedate_of_birth, title<strong>for</strong> the language typesyntax_example, garbage_collection_p (whether thelanguage has automatic storage allocation like Lisp ormemory leaks like C), strongly_typed_p,type_inferencing_p, lexical_scoping_p, date_first_used<strong>for</strong> the publication typethis is <strong>for</strong> storing references to books and journal articles soyou want all the fields that you'd expect to see whenreferencing something; include also an abstract field<strong>for</strong> the data structure typecomplexity_<strong>for</strong>_insertion, complexity_<strong>for</strong>_retrieval (varcharscontaining "O(1)", "O(N)", etc.)<strong>for</strong> the system typeexamples of systems are "Multics", "Xerox Alto", "TCP/IP","MIT Lisp Machine", "Apple Macintosh", "Unix", "World WideWeb". Includes fields <strong>for</strong> date_of_conception, date_of_birth,organization_name, open_source_p. No need to includefields <strong>for</strong> the names of developers because we can insteaduse links to objects of type person to represent primedevelopers or promoters.<strong>for</strong> the problem typeexamples of problems are "traveling salesman", "diningphilosophers", "sort", "query <strong>for</strong> inclusion in sorted list". We'llwant elements <strong>for</strong> storing initial conditions and solutioncriteria. In general, objects of type problem will be linked toobjects of type algorithm (algorithms that solve theproblem), publication (papers that set <strong>for</strong>th the problem),and person (people who were involved in stating or solvingthe problem)<strong>for</strong> the algorithm typeexamples include "Quicksort" and "binary search" elements<strong>for</strong> pseudo_code and high_level_explanation. In general,objects of type algorithm will be linked to objects of typeproblem (what need the algorithm addresses), publication(papers that describe the algorithm or implementations of it),and person (people who were involved in developing thealgorithm)For an example of what a completed system of this nature might looklike, visit Paul Black's Dictionary of Algorithms, Data Structures, andProblems at http://www.nist.gov/dads/.269

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!