Post by Mayayana| If you do it all in one table, it's non-relational.
Maybe I've got it wrong, but I don't see it that way.
Select Song.Singer WHERE Song.Name is "xyz"
AND Song.Album is "My Music"
It allows me to return specific records based on
relationships between data elements. It allows me
to return any specific data or patterns that I want
to. I don't see how you can do that better using
multiple tables.
But, I'm not talking about doing queries, you are. <BG> I'm talking
about having to enter the same data over and over and over and over and
over and over and over and over and over and over and over and over and
over and over and over and over and over and over and over and over and
over and over and over and over and over and over. LOL (Sorry,
couldn't resist that! LOL)
Post by Mayayana| This is where "queries" comes in, you can create a search that covers
| all 3 tables to get the answer you're looking for.
|
But my query above achieves that with only
one table.
And, it works, when the database is simple and small. But relational
databases with their related queries are for databases that are massive
in size, and complex in need.
That's why I don't want one. <G>
Post by MayayanaI get the idea of tables being connected but
can you give an actual example?
I've never needed to do anything as complex as in the screenshot I
linked. I think I've done only two relational databases, one for my
employer in the early '90's (?), the other a music collection for my
inlaws in 2001 or 2002.
By the time I finished the music collection, there were around 35,000
records. Fortunately, I had multiple spreadsheets of info I could
import. But when it was finished, they had to add more CD's, one
track/record at a time. I have no clue how many more records have been
added, but I'm sure they like having to add the artist just once for
each album. Fact is, they probably don't have to add any new artists,
they probably already have the artist in the database.
Post by MayayanaI've never been
trained in this or done it professionally and I
just don't see why tables need to be so complex.
The PNG sample you linked seems to be a different
case, with a large amount of data needed for
each entry.
I have no idea why that database in the PNG is that complex. A question
for the author(s).
Post by MayayanaBut that seems to me more
expensive rather than less. Something to be
avoided where possible. In other words, something
to be used only when the complexity of data
warrants it.
The crossover point of expense does depend on the amount and type of
data that needs to be processed. As I said, I don't need a relational
database for my project.
Post by MayayanaFor instance, if enough fields are needed to
justify multiple tables then that makes sense, but
in a case where you only need, say, 7 fields to
store all relevant customer data, it would be
excessive complication to store it in multiple
tables.
Exactly. Which is why I started looking for a non-relational database. :-)
Post by Mayayana(The sample in the PNG is actually unlikely.
The separate Address table makes sense at first
glance. But for a typical address entry one would
only need street and city, not 2 streets, district,
and city. With only 2 address fields it can go in
the customer table, thus also doing away
with the unique key field in the Address table.
Since address is part of the basic customer data
there's really no reason to store it in another table.)
But, look at the Customer Data. It includes country, so they obviously
have to deal with foreign addresses. Don't some of their addresses have
two streets? I know some US addresses need two street street fields.
Based on the Views section we can see, I'm thinking it's some sort of
database for a chain of video stores, such as Blockbuster or Hollywood,
and who knows where those stores are.
Post by MayayanaIf John Doe only has one entry in the Album
table I can see that being efficient, but I don't
see how it's going to be efficient in practice,
over just having 5 fields for each song in a single
table. You'll need extra fields to connect the
tables, so I don't see where the idea of saving
space comes in. How, specifically, are you going
to set up the tables for songs in a way that's
better than setting them up as a single table,
given that you only have 5 data elements for each
song in the first place?
If you only have one, yes. But what if you have to type John Doe, into
two fields, 500 times? How much time is it going to take you to do that?
Keeping it simple, let's say the two fields, one for John, one for Doe.
But, not every name is that short. What if the artist's name is
Frederick Flintstone? You have to make the field long enough to hold
any conceivable name. What about middle names. What if the artist name
is John Jacob Jingleheimer Schmidt? I don't know if there's anyone with
that name, but it is the name of a song. <G>
Let's say you make the first name field 25 bytes, and the last name
field is 50 bytes. Last names do tend to be longer. Plus however many
bytes are needed for the program to keep track of everything, which I'll
ignore.
We now have 75 bytes reserved for first and last name for each record.
The database I made for my inlaws had around 35k of records. Each
record has 75 bytes for the name. 35k X 75 = 2,625,000 bytes reserved
on the HD for just first and last name.
If you knew my inlaws, you'd know it's not inconceivable (the favorite
word of Vizzini in The Princess Bride) to have 10 albums by John Doe.
Albums seem to average 15 tracks. If you use a non-relational database,
for those 10 albums of 15 tracks, you'll have 75 bytes X 10 albums X 15
tracks for a total of 11,250 bytes used when you could have just 75
bytes used. And when the information is put in track by track, that's a
lot of typing you have to do.
Want to volunteer to do that much typing? :-)
Depending on what you are doing, it may not be necessary to create a
special field for the link. You just have to have the same field in
both tables.
Post by MayayanaWhat are the fields in Song, Album and Singer
tables, and what is the query to find out who
sings "xyz" on an album named "My Music"? And
how would that be superior to a single table?
I have no idea what I did 16+ years ago. I'd probably start with 50 for
the song, and 50 for the artist. There are some long names out there,
and I don't know the longest. Look at John Jacob Jingleheimer Schmidt
for a song title, and Nitty Gritty Dirt Band for the artist, or Eddy
Arnold and the Arizona Plowboys for the artist.
Post by MayayanaThere are also wide differences in what data
one needs to store. For instance, I created a database
with one table of 55,000 records to provide ZIP
codes and area codes in the US. Each entry has
a key field, ZIP code, city, state, and area code.
I can do a query to match up cities, ZIP codes
and area codes in either direction. I can also return
multiples, such as all ZIP codes used in NYC. And
it works instantly. How could that be improved by
having more than one table?
If that's all the information you need, you don't need multiple tables.
And it's not a lot of work if the information has already been typed in
by someone. Did you type in each of those 55,000 records?
But your database isn't tied to keeping track of shipping, shipping
costs, labor, transportation, inventory, etc. This is the type of
project where you need a relational database.
But... How many times do I have to say it... I don't need a relational
database. So why are we discussing using a relational database for my
small project? <G>
Post by Mayayana|
| All of the suite, or just Monobase?
|
Just Monobase. The whole thing looks interesting.
I'd never heard of it before. But I use Libre Office and
am not in the market for a replacement.
I tried the word processor years ago, very different user interface at
that time.
I used to use Libre Office years ago, but left when they told me the
bugs I reported were not important. The attitude pissed me off. I
began to wonder why I wanted to deal with that attitude, trying to use
broken features that were important to me. So I went elsewhere.
Eventually, I realized not everyone needs an office suite with thousand
of features, so why was I looking at suites of MS Office calibre? So,
just like I did in my 8 bit days, I tried a lot of programs, to find one
that I liked to use, and wasn't overblown for my needs.
I've settled on Softmaker Office 2016, which cost me about 2/3 what
Office Home and Student/Business would have cost me, and doesn't include
things I don't need. :-)
OH!! BTW, did you notice the screenshot is from a Mac? LOL
--
Ken
Mac OS X 10.11.6
Firefox 59.0.1 (64 bit)
Thunderbird 52.6.0
"My brain is like lightning, a quick flash
and it's gone!"