Music library MySQL database(音乐库 MySQL 数据库)
问题描述
我需要帮助在 MySQL 中为音乐数据库构建表.我不确定如何将这些信息放在表格中.
I need some help building a table(s) for a music database in MySQL. I am unsure on how to lay this information out in a table.
这是我想存储在数据库中的信息.
Here is the info I would like to be stored in the database.
Artist Name
Album Name
Release Date
Genre
Picture URL (album artwork)
Track Number
Trank Name
Track Playtime
Lyric (optional, But would like to have it someday)
etc.
基本上任何与组织数字音乐有关的事情.我是数据库的新手,我有一些想法.但如果我要学习,我不妨学习正确的做法.
Basically anything that has to do with organizing digital music. I'm new to databases and I have some ideas. But if I'm going to learn I might as well learn the right way of doing it.
任何关于如何设计我的桌子的想法都会很棒.
Any thoughts on how to design my table(s) would be awesome.
推荐答案
这样的事情最好开始.它为艺术家、专辑(包含艺术家和流派的关键字)、曲目(包含专辑的关键字)和流派指定了一个表格.
Something like this would be good to start with. It specifies a table for artists, albums (with keys into artists and genres), tracks (keyed into albums), and genres.
Table artists
----
id (primary key),
name
description
years_active
otherinfo (whatever you need)
Table albums
----
id (primary key)
artistid (foreign key to artists table)
name,
releasedate
genreid (foreign key to genres table)
picture
Table tracks
----
id (primary key)
albumid (foreign key to albums table)
name
override_artist (overrides album artist if not null)
playtime
lyric
otherstuff as needed
Table genres
----
id (primary key)
name
description
这篇关于音乐库 MySQL 数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:音乐库 MySQL 数据库


- 在SQL中,如何为每个组选择前2行 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- SQL 临时表问题 2022-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 更改自动增量起始编号? 2021-01-01